formatVCF {sesame} | R Documentation |
Convert SNP from Infinium array to VCF file
formatVCF(sdf, vcf = NULL, refversion = "hg19", annoS = NULL, annoI = NULL)
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 |
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"'
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))