variantContext: Gather variant context around single nucleotide variants

Description Usage Arguments Value Methods (by class) Examples

Description

The variant context is defined by gathering the nucleotides upstream and downstream of a variant. This if often the first step in building a mutation spectrum analysis.

Usage

1
2
3
4
5
6
7
variantContext(VARIANTS, FASTA, ...)

## S4 method for signature 'VCF,FaFile'
variantContext(VARIANTS, FASTA, ...)

## S4 method for signature 'VRanges,FaFile'
variantContext(VARIANTS, FASTA, ...)

Arguments

variants

A VCF-class object

fasta

A FaFile object that describes the fasta file location of the reference sequence

extendBy

The number of bases on either side of the altered base to capture. The altered base will be placed in the center of the context. For example, the default value of 1 will result in contexts of length 3. Specifying 2 will result in contexts of length 5, etc.

Value

A VariantContext object.

Methods (by class)

Examples

1
2
3
4
5
6
library(VariantAnnotation)
fl <- system.file("extdata", "chr22.vcf.gz", package="VariantAnnotation")
param <- ScanVcfParam(info=c("DP"))
vcf = readVcf(fl,"hg19",param=param)
seqlevels(vcf) = paste0('chr',seqlevels(vcf))
variantContext(vcf,fasta=FaFile('/data/CCRBioinfo/public/GATK/bundle/2.3/hg19/ucsc.hg19.fasta'))

seandavi/MutationTools documentation built on May 29, 2019, 4:32 p.m.