formatVCF {sesame}R Documentation

Convert SNP from Infinium array to VCF file

Description

Convert SNP from Infinium array to VCF file

Usage

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

Arguments

sdf

SigDF

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

sesameDataCache("EPIC") # if not done yet
sdf <- sesameDataGet('EPIC.1.SigDF')

annoS <- sesameDataGetAnno("EPIC/EPIC.hg19.snp_overlap_b151.rds")
annoI <- sesameDataGetAnno("EPIC/EPIC.hg19.typeI_overlap_b151.rds")
## output to console
head(formatVCF(sdf, annoS=annoS, annoI=annoI))


[Package sesame version 1.12.9 Index]