Hello,
This is probably a trivial question but it took me some time to figure out ways which are not pretty and sometimes produce errors so I’m looking for help here… I have 2 vcf files and I want to annotate one with another. The fields in both vcfs are similar but I have different coverage in the second vcf and I want to add this coverage to the 1st vcf while not loosing current dp value for vcf1.
I managed to do it in a way that I did copy the info field from 2nd vcf into the 1st one
bcftools annotate --set-id +'%INFO' file2.vcf.gz > newfile2.vcf
and then
bcftools annotate -a newfile2.vcf.gz -c +.ID file1.vcf.gz > result.vcf
Now I would like to filter via DP from info field but I have no idea how :)
Probably there is an easier solution to this problem…
I would strongly need help here
If you want to just remove the lines you can use expressions like
-i 'FORMAT/DP>20'
with theview
command. If you want to tag them you can use thefilter
command with soft filter parameter.