indexMTGenome: build and install GmapGenome.[organism].[mtGenome], currently...

Description Usage Arguments Details Value Examples

View source: R/indexMTGenome.R

Description

gmapR needs a reference genome index in order for it to call any variants. We support rCRS (and only rCRS) as that reference, at least for the moment. This function creates & installs a reference (rCRS, the default) Gmap index. In principle, hg19 and mm10 could be supported; in practice, support is poor. (Also, the Yoruban chrM in hg19 is a terrible reference for variant calling.) We would be grateful for a patch to add mm10/GRCm38 support; eventually, we plan to add it in ourselves (as one might have guessed from Mouse Mitocarta).

Usage

1
2
indexMTGenome(mtGenome = "rCRS", fa = NULL, organism = "Hsapiens",
  destDir = NULL, install = TRUE, unlink = FALSE)

Arguments

mtGenome

mitochondrial reference genome to index (default is rCRS)

fa

FASTA file (default is to find included 'mtGenome'.fa)

organism

organism whose mitochondrial genome is indexed (Hsapiens)

destDir

optional destination for the package ($HOME is default)

install

install the package after creation? (default is TRUE)

unlink

if an index package already exists, remove it? (FALSE)

Details

Note: this function creates a "skeleton key" rCRS index for contigs named 'chrM', 'MT', 'rCRS', 'NC_012920.1', and/or 'gi|251831106|ref|NC_012920.1|'. The point of this kludge is to allow gmapR to call variants against various styles of contig names, whether NCBI, UCSC, Genbank, or colloquial rCRS.

Value

the path to the created package as a character string

Examples

1
2
3
4
5
if (.Platform$OS.type != "windows") {
  mtGenome <- "rCRS"
  fa <- system.file(paste0("extdata/", mtGenome, ".fa"), package="MTseeker")
  indexMTGenome(mtGenome=mtGenome, fa=fa, destDir=tempdir())
}

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