scanMT: Figure out where the mitochondrial reads in a BAM are, so we...

Description Usage Arguments Value Examples

View source: R/scanMT.R

Description

This purely a convenience function, and an incredibly convenient one at that.

Usage

1
scanMT(bam, chrM = "(rCRS|chrM|MT)", ...)

Arguments

bam

BAM (must be indexed!) file(s) or object(s) with a @bam slot

chrM

search pattern for mitochondrial contig ("(rCRS|chrM|MT)")

...

additional args to pass scanBamParam(), such as mapqFilter

Value

1
     a ScanBamParam object for the BAM(s) to use with pileup() 

Examples

1
2
3
4
5
6
7
8
9
library(MTseekerData)
BAMdir <- system.file("extdata", "BAMs", package="MTseekerData")
BAMs <- paste0(BAMdir, "/", list.files(BAMdir, pattern=".bam$"))

sbp <- scanMT(BAMs[1])
show(sbp) 

sbps <- scanMT(BAMs, mapqFilter=20)
show(sbps) 

trichelab/MTseeker documentation built on March 8, 2021, 6:20 p.m.