formatVCF: Convert SNP from Infinium array to VCF file

Description Usage Arguments Value Examples

View source: R/vcf.R

Description

Convert SNP from Infinium array to VCF file

Usage

1
formatVCF(sset, vcf = NULL, refversion = "hg19", annoS = NULL, annoI = NULL)

Arguments

sset

SigSet

vcf

output VCF file path, if NULL output to console

refversion

reference version, currently only support

annoS

SNP variant annotation, download if not given

annoI

Infinium-I variant annotation, download if not given hg19 and hg38 in human

Value

VCF file. If vcf is NULL, a data.frame is output to console. The data.frame does not contain VCF headers.

Note the vcf is not sorted. You can sort with awk '$1 ~ /^#/ print $0;next print $0 | "sort -k1,1 -k2,2n"'

Examples

1
2
3
4
5
6
sset <- sesameDataGet('EPIC.1.LNCaP')$sset

annoS <- sesameDataPullVariantAnno_SNP('EPIC','hg19')
annoI <- sesameDataPullVariantAnno_InfiniumI('EPIC','hg19')
## output to console
head(formatVCF(sset, annoS=annoS, annoI=annoI))

sesame documentation built on Nov. 15, 2020, 2:08 a.m.