MVRanges-methods: wrap a VRanges for mitochondrial use

Description Usage Arguments Value Utility methods Annotation methods Visualization methods Examples

Description

Usually the MVRanges constructor will be called by callMT().

Many of these methods can be dispatched from an MVRangesList OR an MVRanges. In such cases, the method will usually, but not always, be apply()ed.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
MVRanges(vr, coverage = NA_real_)

## S4 method for signature 'MVRanges'
genomeCoverage(x)

## S4 method for signature 'MVRanges'
coverage(x)

## S4 method for signature 'MVRanges'
type(x)

## S4 method for signature 'MVRanges'
genes(x)

## S4 method for signature 'MVRanges'
snpCall(object)

## S4 method for signature 'MVRanges'
pos(x)

## S4 method for signature 'MVRanges'
show(object)

## S4 method for signature 'MVRanges'
annotation(object)

## S4 method for signature 'MVRanges'
getAnnotations(annotations)

## S4 method for signature 'MVRanges'
encoding(x)

## S4 method for signature 'MVRanges'
filt(x)

## S4 method for signature 'MVRanges'
genome(x)

## S4 method for signature 'MVRanges,missing,missing'
locateVariants(query,
  filterLowQual = FALSE, ...)

## S4 method for signature 'MVRanges'
tallyVariants(x, filterLowQual = TRUE, ...)

## S4 method for signature 'MVRanges,missing,missing,missing'
predictCoding(query, subject,
  seqSource, varAllele, ...)

## S4 method for signature 'MVRanges,missing,missing'
summarizeVariants(query, subject,
  mode, ...)

## S4 method for signature 'MVRanges,ANY'
plot(x, y, ...)

## S4 method for signature 'MVRanges'
consensusString(x, ...)

Arguments

vr

the VRanges

coverage

estimated coverage

x

an MVRanges

object

an MVRanges

annotations

an MVRanges

query

an MVRanges

filterLowQual

boolean; drop non-PASSing variants from locateVariants?

...

miscellaneous args, passed through

subject

a GRanges, usually

seqSource

a BSgenome, usually

varAllele

variant alleles

mode

miscellaneous arguments

y

another MVRanges

Value

an MVRanges

depends on the method invoked.

Utility methods

'pos' returns a character vector describing variant positions. 'filt' returns a subset of variant calls where PASS == TRUE (i.e. filtered) 'coverage' returns an Rle of coverage across the mitochondrial genome 'genomeCoverage' returns the estimated mitochondrial read coverage depth

Annotation methods

'type' returns a character vector describing variant type (SNV or indel) 'genes' retrieves a GRanges of mitochondrial gene locations for an MVRanges 'snpCall' retrieves single nucleotide variant polymorphisms PASSing filters 'annotation' gets (perhaps oddly) an MVRanges object annotated against rCRS 'getAnnotations' returns the GRanges of gene/region annotations for an MVR 'encoding' returns variants residing in coding regions (consequence unknown) 'locateVariants' annotates variants w/region, gene, and localStart/localEnd 'predictCoding' returns variants consequence predictions as one might expect 'tallyVariants' returns a named vector of variant types by annotated region. 'summarizeVariants' uses MitImpact to attempt annotation of coding variants. 'consensusString' edits rCRS to create a consensus genotype for eg Haplogrep

Visualization methods

'plot' creates a circular plot of mitochondrial variant calls with annotation

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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))
  locateVariants(mvr)
  predictCoding(mvr) 
} else { 
  message("You have not yet installed an rCRS reference genome.")
  message("Consider running the indexMTgenome() function to do so.")
  message("An example MVRanges is RONKSvariants$RO_1 from MTseekerData.")
}

# summarizeVariants can take too long to run, and requires internet access 

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