splitBAM: Split a bam file by given criteria

Description Usage Arguments Value Examples

View source: R/splitBAM.R

Description

Split a bam file by given criteria

Usage

1
2
splitBAM(bamFile, splitby = "strand", chrnameList = NULL, flagList = NULL,
  mapqList = NULL, outfile_prefix, nthreads = 20)

Arguments

bamFile

Bam file path

splitby

How to split the file ("strand","chr","flag","mapq")

chrnameList

list of Chromosomes to split by

flagList

List of samflags to split by

mapqList

List of mapq cutoffs to split by (reads with mapq greater than cutoff will be kept)

outfile_prefix

prefix for output filename

nthreads

Number of threads to use

Value

Splitted, sorted and indexed bam files

Examples

1
2
3
bam <- system.file("extdata", "test_2L2R.bam", package="vivlib")
splitBAM(bam = bam, splitby = "chr", chrnameList = NULL, flagList = NULL,
             mapqList = NULL, outfile_prefix = "test", nthreads = 20)

vivekbhr/vivlib documentation built on May 3, 2019, 6:13 p.m.