HI Tom, Good find! Unfortunately, that didn't help, bcftools query doesn't seem to recognize the suggested syntax of FORMAT/DP4, if I've constructed the request in the appropriate manner.
$bcftools_htslib_path/bcftools query -f'%CHROM\t%POS\t%REF\t%ALT\t%DPR\t%FORMAT/DP4\n' results.vcf | head Error: no such tag defined in the VCF header: INFO/FORMAT The original call: $bcftools_htslib_path/bcftools query -f'%CHROM\t%POS\t%REF\t%ALT\t%DPR\t%DP4\n' results.vcf | head 1 10397540 T <X> 15,0 . 1 10397541 G <X> 15,0 . 1 10397542 C <X> 15,0 . 1 10397543 A <X> 15,0 . 1 10397544 G <X> 15,0 . 1 10397545 G <X> 15,0 . 1 10397546 C <X> 15,0 . 1 10397547 C <X> 16,0 . 1 10397548 A <X> 17,0 . 1 10397549 G <X> 17,0 . Thanks for the suggestion, Jonathan On Wed, Oct 29, 2014 at 3:28 PM, Thomas W. Blackwell <tbla...@umich.edu> wrote: > > The manpage for bcftools annotate -c suggests trying something like: > > bcftools query -f'%CHROM\t%POS\t%REF\t%ALT\t%FORMAT/DPR\t%FORMAT/DP4\n' > results.vcf | head > > Don't know where else in the manpage this appears. > > - tom blackwell - > > > On Wed, 29 Oct 2014, jbr950 wrote: > > Hello, >> I'd like to avoid writing my own parser, using stock 'bcftools query' >> for its intended purpose instead. >> >> I need to extract the DP4 field, and the command I'm issuing is not >> including it: >> >> First I check that DP4 is actually present in my vcf: >> >> grep "<X" results.vcf | head -2 >> 1 10397540 . T <X> 0 . >> DP=15;I16=11,4,0,0,535,19161,0,0,300,6000,0,0,238,4626,0,0; >> QS=1,0;MQSB=1;MQ0F=0;DPR=15,0 >> PL:DP4:DPR 0,45,146:11,4,0,0:15,0 >> 1 10397541 . G <X> 0 . >> DP=15;I16=11,4,0,0,514,17700,0,0,300,6000,0,0,235,4541,0,0; >> QS=1,0;MQSB=1;MQ0F=0;DPR=15,0 >> PL:DP4:DPR 0,45,146:11,4,0,0:15,0 >> >> >> >> Then I try bcftools query: >> $bcftools_htslib_path/bcftools query >> -f'%CHROM\t%POS\t%REF\t%ALT\t%DPR\t%DP4\n' results.vcf | head >> 1 10397540 T <X> 15,0 . >> 1 10397541 G <X> 15,0 . >> 1 10397542 C <X> 15,0 . >> 1 10397543 A <X> 15,0 . >> 1 10397544 G <X> 15,0 . >> 1 10397545 G <X> 15,0 . >> 1 10397546 C <X> 15,0 . >> 1 10397547 C <X> 16,0 . >> 1 10397548 A <X> 17,0 . >> 1 10397549 G <X> 17,0 . >> >> >> Is there a way to adjust my command, or is this a bug? >> >> Best, >> Jonathan >> >>
------------------------------------------------------------------------------
_______________________________________________ Samtools-help mailing list Samtools-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/samtools-help