This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Convert VCF dosage file into dosage only file

Hi,

Is it possibly to only output dosages from a generated vcf dosage file from minimac?

Input format is

##fileformat=VCFv4.1
##filedate=2017.7.5
##source=Minimac3
##contig=<ID=29>
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
##FORMAT=<ID=DS,Number=1,Type=Float,Description="Estimated Alternate Allele Dosage : [P(0/1)+2*P(1/1)]">
##INFO=<ID=AF,Number=1,Type=Float,Description="Estimated Alternate Allele Frequency">
##INFO=<ID=MAF,Number=1,Type=Float,Description="Estimated Minor Allele Frequency">
##INFO=<ID=R2,Number=1,Type=Float,Description="Estimated Imputation Accuracy">
##INFO=<ID=ER2,Number=1,Type=Float,Description="Empirical (Leave-One-Out) R-square (available only for genotyped variants)">
#CHROM  POS ID  REF ALT QUAL    FILTER  INFO    FORMAT  1242658141  1364665948  1242658615
29  11  Chr29:11    A   G   .   PASS    .   GT:DS   0|0:0.193   0|0:0.193   0|0:0.193

Is there an option in vcftools to output the dosages for each genotype seperatly, without the genotype call?

vcf dosage minimac

1 answer

bcftools query -f "%CHROM\t%POS[\t%DS]\n" minimac3.dose.vcf.gz

Missing an \n at the end :):

bcftools query -f "%CHROM\t%POS[\t%DS]\n" minimac3.dose.vcf.gz

Log in to answer this question.