Skip to content

Commit

Permalink
Make the header more informative: AD prints the number of high-qualit…
Browse files Browse the repository at this point in the history
…y bases
  • Loading branch information
pd3 committed Apr 29, 2019
1 parent 44c86bb commit d60bac4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions mpileup.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,17 +553,17 @@ static int mpileup(mplp_conf_t *conf)
if ( conf->fmt_flag&B2B_FMT_SP )
bcf_hdr_append(conf->bcf_hdr,"##FORMAT=<ID=SP,Number=1,Type=Integer,Description=\"Phred-scaled strand bias P-value\">");
if ( conf->fmt_flag&B2B_FMT_AD )
bcf_hdr_append(conf->bcf_hdr,"##FORMAT=<ID=AD,Number=R,Type=Integer,Description=\"Allelic depths\">");
bcf_hdr_append(conf->bcf_hdr,"##FORMAT=<ID=AD,Number=R,Type=Integer,Description=\"Allelic depths (high-quality bases)\">");
if ( conf->fmt_flag&B2B_FMT_ADF )
bcf_hdr_append(conf->bcf_hdr,"##FORMAT=<ID=ADF,Number=R,Type=Integer,Description=\"Allelic depths on the forward strand\">");
bcf_hdr_append(conf->bcf_hdr,"##FORMAT=<ID=ADF,Number=R,Type=Integer,Description=\"Allelic depths on the forward strand (high-quality bases)\">");
if ( conf->fmt_flag&B2B_FMT_ADR )
bcf_hdr_append(conf->bcf_hdr,"##FORMAT=<ID=ADR,Number=R,Type=Integer,Description=\"Allelic depths on the reverse strand\">");
bcf_hdr_append(conf->bcf_hdr,"##FORMAT=<ID=ADR,Number=R,Type=Integer,Description=\"Allelic depths on the reverse strand (high-quality bases)\">");
if ( conf->fmt_flag&B2B_INFO_AD )
bcf_hdr_append(conf->bcf_hdr,"##INFO=<ID=AD,Number=R,Type=Integer,Description=\"Total allelic depths\">");
bcf_hdr_append(conf->bcf_hdr,"##INFO=<ID=AD,Number=R,Type=Integer,Description=\"Total allelic depths (high-quality bases)\">");
if ( conf->fmt_flag&B2B_INFO_ADF )
bcf_hdr_append(conf->bcf_hdr,"##INFO=<ID=ADF,Number=R,Type=Integer,Description=\"Total allelic depths on the forward strand\">");
bcf_hdr_append(conf->bcf_hdr,"##INFO=<ID=ADF,Number=R,Type=Integer,Description=\"Total allelic depths on the forward strand (high-quality bases)\">");
if ( conf->fmt_flag&B2B_INFO_ADR )
bcf_hdr_append(conf->bcf_hdr,"##INFO=<ID=ADR,Number=R,Type=Integer,Description=\"Total allelic depths on the reverse strand\">");
bcf_hdr_append(conf->bcf_hdr,"##INFO=<ID=ADR,Number=R,Type=Integer,Description=\"Total allelic depths on the reverse strand (high-quality bases)\">");
if ( conf->gvcf )
gvcf_update_header(conf->gvcf, conf->bcf_hdr);

Expand Down
2 changes: 1 addition & 1 deletion test/mpileup/indel-AD.1.out
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
##INFO=<ID=I16,Number=16,Type=Float,Description="Auxiliary tag used for calling, see description of bcf_callret1_t in bam2bcf.h">
##INFO=<ID=QS,Number=R,Type=Float,Description="Auxiliary tag used for calling">
##FORMAT=<ID=PL,Number=G,Type=Integer,Description="List of Phred-scaled genotype likelihoods">
##FORMAT=<ID=AD,Number=R,Type=Integer,Description="Allelic depths">
##FORMAT=<ID=AD,Number=R,Type=Integer,Description="Allelic depths (high-quality bases)">
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT sample
000000F 392 . C <*> 0 . DP=1;I16=1,0,0,0,32,1024,0,0,60,3600,0,0,0,0,0,0;QS=1,0;MQ0F=0 PL:AD 0,3,32:1,0
000000F 393 . A <*> 0 . DP=1;I16=1,0,0,0,32,1024,0,0,60,3600,0,0,1,1,0,0;QS=1,0;MQ0F=0 PL:AD 0,3,32:1,0
Expand Down
12 changes: 6 additions & 6 deletions test/mpileup/mpileup.5.out
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
##FORMAT=<ID=PL,Number=G,Type=Integer,Description="List of Phred-scaled genotype likelihoods">
##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Number of high-quality bases">
##FORMAT=<ID=SP,Number=1,Type=Integer,Description="Phred-scaled strand bias P-value">
##FORMAT=<ID=AD,Number=R,Type=Integer,Description="Allelic depths">
##FORMAT=<ID=ADF,Number=R,Type=Integer,Description="Allelic depths on the forward strand">
##FORMAT=<ID=ADR,Number=R,Type=Integer,Description="Allelic depths on the reverse strand">
##INFO=<ID=AD,Number=R,Type=Integer,Description="Total allelic depths">
##INFO=<ID=ADF,Number=R,Type=Integer,Description="Total allelic depths on the forward strand">
##INFO=<ID=ADR,Number=R,Type=Integer,Description="Total allelic depths on the reverse strand">
##FORMAT=<ID=AD,Number=R,Type=Integer,Description="Allelic depths (high-quality bases)">
##FORMAT=<ID=ADF,Number=R,Type=Integer,Description="Allelic depths on the forward strand (high-quality bases)">
##FORMAT=<ID=ADR,Number=R,Type=Integer,Description="Allelic depths on the reverse strand (high-quality bases)">
##INFO=<ID=AD,Number=R,Type=Integer,Description="Total allelic depths (high-quality bases)">
##INFO=<ID=ADF,Number=R,Type=Integer,Description="Total allelic depths on the forward strand (high-quality bases)">
##INFO=<ID=ADR,Number=R,Type=Integer,Description="Total allelic depths on the reverse strand (high-quality bases)">
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT HG00100 HG00101 HG00102
17 100 . C <*> 0 . DP=18;ADF=17,0;ADR=0,0;AD=17,0;I16=17,0,0,0,688,29762,0,0,958,55682,0,0,332,7446,0,0;QS=3,0;MQ0F=0 PL:DP:SP:ADF:ADR:AD 0,27,189:9:0:9,0:0,0:9,0 0,9,108:3:0:3,0:0,0:3,0 0,15,134:5:0:5,0:0,0:5,0
17 101 . C <*> 0 . DP=18;ADF=17,0;ADR=0,0;AD=17,0;I16=17,0,0,0,650,27530,0,0,958,55682,0,0,331,7303,0,0;QS=3,0;MQ0F=0 PL:DP:SP:ADF:ADR:AD 0,27,182:9:0:9,0:0,0:9,0 0,9,99:3:0:3,0:0,0:3,0 0,15,132:5:0:5,0:0,0:5,0
Expand Down

0 comments on commit d60bac4

Please sign in to comment.