getMT: grab the mitochondrial reads from a BAM & estimate their...

Description Usage Arguments Value Examples

View source: R/getMT.R

Description

This purely a convenience function, and an incredibly convenient one at that. FIXME: this function is still useful, but it desperately needs refactoring.

Usage

1
getMT(bam, filter = FALSE, plotMAPQ = FALSE, ...)

Arguments

bam

a BAM filename, or DataFrame/SummarizedExperiment with $BAM

filter

filter on bam$mtCovg? (default is FALSE, don't filter)

plotMAPQ

plot distribution of mitochondrial mapping quality? (FALSE)

...

additional args to pass scanBamParam(), such as mapqFilter

Value

1

Examples

1
2
3
4
library(MTseekerData)
BAMdir <- system.file("extdata", "BAMs", package="MTseekerData")
patientBAMs <- paste0(BAMdir, "/", list.files(BAMdir, pattern="^pt.*bam$"))
(mal <- getMT(patientBAMs[1]))

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