bcftools icon indicating copy to clipboard operation
bcftools copied to clipboard

bcftools merge - preserve sample specific FILTER value in INFO

Open blajoie opened this issue 7 years ago • 4 comments

While merging VCFs, I find it convenient to preserve the sample-specific FILTER value for each sample. This seems to be lost by default. Is this the intention?

Is there a way to preserve the filter value in the INFO fields via bcftools? (FT?)

blajoie avatar Nov 14 '18 17:11 blajoie

Hello,

could you give an example? Are you talking about the FILTER column or a specific value in the INFO column?

fin swimmer

finswimmer avatar Nov 14 '18 20:11 finswimmer

Goal is to still have a VCF record level filter value, but then also retain the sample-specific filter values pre-merge (no where to go except INFO fields) e.g.

sample1 2 2744456 . A G 1 PASS DP=33; 1 GT:AD:DP:GQ:PL:SB 0/1:29,4:33:81:81,0,1906:19,10,1,3 sample2 2 2744456 . A G 1 DRAGENHardSNP DP=34; 1 GT:AD:DP:GQ:PL:SB 0/1:29,4:33:81:81,0,1906:19,10,1,3 sample3 2 2744456 . A G 1 PASS DP=35; 1 GT:AD:DP:GQ:PL:SB 0/1:29,4:33:81:81,0,1906:19,10,1,3

After merge (add FT info tag and carry-through sample-filter-column-value) 2 2744456 . A G 1 PASS DP=33; 1 GT:FT:AD:DP:GQ:PL:SB 0/1:PASS:29,4:33:81:81,0,1906:19,10,1,3 0/1:DRAGENHardSNP:29,4:33:81:81,0,1906:19,10,1,3 0/1:PASS:29,4:33:81:81,0,1906:19,10,1,3

blajoie avatar Nov 14 '18 20:11 blajoie

This is currently not supported. I can imagine adding this to the merge command as you are suggesting. Or it could be added as a more general feature, for example as a new filter -S <flt> functionality. This would, instead of resetting genotypes, add a per-sample FORMAT/FILTER tag based on the -i/-e expressions.

pd3 avatar Nov 17 '18 15:11 pd3

Hi. I was just curious if there are still plans for this functionality to be added? Thanks in advance.

dalbrach avatar Jul 29 '24 12:07 dalbrach