vcf2mvrl: Convert a VCF to an MVRangesList object

Description Usage Arguments Value Examples

View source: R/importVCF.R

Description

Convert a VCF to an MVRangesList object

Usage

1
2
3
4
5
6
7
vcf2mvrl(
  vcf_filename,
  bam_filename = NULL,
  gzip = TRUE,
  biscuit = FALSE,
  verbose = TRUE
)

Arguments

vcf_filename

A filename/path to the corresponding VCF

bam_filename

A filename/path to the corresponding BAM

gzip

Is the input gzipped? (TRUE; really ought not matter)

biscuit

Is the input VCF from biscuit? (FALSE)

verbose

Print all messages during progress? (TRUE)

Value

an MVRangesList

Examples

1
2
3
4
5
6
7
library(MTseekerData)
VCFdir <- system.file("extdata", package="MTseekerData")
VCF <- file.path(VCFdir, list.files(VCFdir, pattern="*.vcf.gz$"))
mvr <- vcf2mvrl(VCF)[[1]]
mvr$FILTER <- ifelse(totalDepth(mvr) >= 20, "PASS", ".")
mvr$PASS <- mvr$FILTER == "PASS"
filterMT(mvr)

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