callMT: call mitochondrial variants against rCRS from an...

Description Usage Arguments Details Value Examples

View source: R/callMT.R

Description

'callMTVars' is a helper function for callMT

Usage

1
2
3
4
callMT(mal, ..., parallel = FALSE, verbose = FALSE)

callMTVars(BAM, SIZE = 75, GENOME = "rCRS", CHR = "chrM",
  COV = NULL, verbose = FALSE)

Arguments

mal

an MAlignments (or, potentially, an MAlignmentsList)

...

other arguments to pass to VariantTools::callVariants

parallel

try to run in parallel? (FALSE; this is super unstable)

verbose

be verbose? (FALSE; turn on for debugging purposes)

BAM

the BAM filename (for callMTVars)

SIZE

the read length (for callMTVars; default is 75)

GENOME

the reference genome (for callMTVars; default is rCRS)

CHR

the mt contig name (for callMTVars; default is chrM)

COV

average read coverage (so we don't have to countBam)

Details

FIXME: transition gmapR from import to suggestion FIXME: use Rsamtools::pileup by default FIXME: optional haplogroup masking?

Value

an MVRanges (or, potentially, an MVRangesList)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(MTseekerData)
BAMdir <- system.file("extdata", "BAMs", package="MTseekerData")
BAMs <- paste0(BAMdir, "/", list.files(BAMdir, pattern=".bam$"))
(mal <- getMT(BAMs[1]))
if (requireNamespace("GmapGenome.Hsapiens.rCRS", quietly=TRUE)) {
  (mvr <- callMT(mal))
  filt(snpCall(mvr))
} else { 
  message("You have not yet installed an rCRS reference genome.")
  message("Consider running the indexMTgenome() function to do so.")
  message("The RONKSvariants object in MTseekerData is a result of callMT.")
}

MTseeker documentation built on Oct. 31, 2019, 3:20 a.m.