write_vcf | R Documentation |
Create VCFv4.3 file
write_vcf(filename, fixed, geno, other.meta = NULL)
filename |
VCF file name |
fixed |
character matrix with 8 columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER, INFO |
geno |
named list of genotype matrices, see Details |
other.meta |
optional, other metadata (without ##) besides INFO and FORMAT keys |
Several standard INFO key are recognized:
##INFO=<ID=REF,Number=A,Type=Character,Description=\"Array allele (A/B) in reference genome\">
##INFO=<ID=NS,Number=1,Type=Integer,Description="Number of samples with data">
##INFO=<ID=DP.AVG,Number=1,Type=Float,Description="Average Sample Depth">
##INFO=<ID=DP,Number=1,Type=Integer,Description="Total Depth">
##INFO=<ID=AB,Number=1,Type=Float,Description="Allelic Bias">
##INFO=<ID=SE,Number=1,Type=Integer,Description="Sequencing Error (PHRED)">
##INFO=<ID=OD,Number=1,Type=Integer,Description="OverDispersion (PHRED)">
##INFO=<ID=AF,Number=A,Type=Float,Description="Allele Frequency">
##INFO=<ID=AF.GT,Number=A,Type=Float,Description="Allele Frequency based on GT">
##INFO=<ID=AC,Number=A,Type=Integer,Description="Allele count in genotypes">"
##INFO=<ID=AN,Number=1,Type=Integer,Description="Total number of alleles">"
Every element of geno
is m x n matrix (m variants, n samples), e.g., AD, GT. The FORMAT field is created from the order and names of geno
. Sample names taken from colnames of geno
. Metadata for geno
is generated from the names of the list:
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
##FORMAT=<ID=AD,Number=R,Type=Integer,Description="Allele Depth">
##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Sample Depth">
##FORMAT=<ID=DS,Number=1,Type=Float,Description="Posterior Mean Dosage">
##FORMAT=<ID=GQ,Number=1,Type=Integer,Description="Genotype Quality">
Any additional metadata should be included without the ## prefix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.