distanceToPreviousVariant: Find the distance between each variant and the previous one

Description Usage Arguments Value Examples

Description

Given a VCF-class object, return a vector of distances between neighboring variants. This is useful for plotting defining Kataegis phenomenon in a set of variants. Distance for the first variant on each chromosome is NA.

Usage

1

Arguments

vcf

A VCF-class

Value

A vector of nrow(vcf)-1 giving the distance between each variant and the previous one.

Examples

1
2
3
4
5
6
require(VariantAnnotation)
fl <- system.file("extdata", "chr22.vcf.gz", package="VariantAnnotation")
param <- ScanVcfParam(fixed="ALT", geno=c("GT", "GL"), info=c("LDAF"))
vcf = readVcf(fl,"hg19",param=param)
d = distanceToPreviousVariant(vcf)
summary(d)

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