splitBAM_byIndex {icetea} | R Documentation

## Split the composite BAM file using internal indexes (MAPCap)

### Description

Split the composite BAM file using internal indexes (MAPCap)

### Usage

    splitBAM_byIndex(
      bamFile,
      index_list,
      outfile_list,
      max_mismatch = 0,
      ncores = 1
    )

### Arguments

`bamFile` | character. Path to a mapped BAM file
`index_list` | character. A list of indexes for splitting
`outfile_list` | character. A list of output file names (with order corresponding to that of index_list)
`max_mismatch` | integer. No. of mismatches allowed in index (maxium 1 recommended)
`ncores` | integer. Number of cores to use for parallel processing

### Value

Filtered files

### Examples

    bam <- system.file("extdata", "bam/embryo1.bam", package = "icetea")
    splitBAM_byIndex(bamFile = bam,
                     index_list = c("CAAGTG", "CAAGTT"),
                     outfile_list = c("test_filt1.bam","test_filt2.bam"),
                     ncores = 1)

[Package icetea version 1.8.0 Index]