MTcoverage: Mitochondrial genome coverage and plots for MAlignments or...

Description Usage Arguments Details Value Examples

View source: R/MTcoverage.R

Description

We co-opted the coverage method to retrieve approximate coverage depth across the mitochondrial genome in MAlignmentsList and MVRangeslist, so this function gives back what it was supposed to do (provide an Rle) and can allow for some subsetting (e.g. variant-supporting-read coverage) that may be of interest when interpreting results.

Usage

1
2
3
4
5
MTcoverage(x, ...)

plotMTCoverage(x, ref = c("rCRS", "NC_005089"), ...)

plotStrandedMTCoverage(x, ...)

Arguments

x

an MAlignments or MVRanges

...

other arguments to pass to GenomicAlignments::coverage()

ref

string denoting reference sequence to use

Details

The plotting functions can handle MAlignments or MVRanges objects directly.

plotMTCoverage does what one might expect, and plots (read or call) coverage.

plotStrandedMTCoverage does the same thing, but keeps track of which strand.

Value

1
     an RleList (or, invisibly for plot functions, a result list)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
library(MTseekerData)

data(RONKSreads)
MTcoverage(RONKSreads$RO_1)
plotMTCoverage(RONKSreads$RO_1)

data(RONKSvariants)
MTcoverage(RONKSvariants$RO_1)
plotMTCoverage(RONKSvariants$RO_1)

par(mfrow=c(1,2))
plotMTCoverage(RONKSreads$NKS_1)
title("Read coverage for normal kidney sample 1") 
plotMTCoverage(RONKSreads$RO_1)
title("Read coverage for renal oncocytoma sample 1") 

par(mfrow=c(1,2))
plotStrandedMTCoverage(RONKSreads$NKS_1)
title("Stranded read coverage for normal kidney sample 1") 
plotStrandedMTCoverage(RONKSreads$RO_1)
title("Stranded read coverage for renal oncocytoma sample 1") 

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