This is a test version of Biostars. For the public version, visit https://www.biostars.org.
filtering sniffles variants for precise calls

Sniffles reports variants in vcf as IMPRECISE and PRECISE

##INFO=<ID=PRECISE,Number=0,Type=Flag,Description="Structural variation with precise breakpoints"

##INFO=<ID=IMPRECISE,Number=0,Type=Flag,Description="Structural variation with imprecise breakpoints"

how can I filter my VCF output from Sniffles to keep only precise variant calls?

sniffles vcf variation

1 answer

Use bcftools view -i/e, --include/--exclude EXPR Select/exclude sites for which the expression is true (see man page for details)

bcftools view -i 'INDEL=1'

For some reason I couldn't post the different options I had tried but I did try using bcftools view -i/e in different ways but could not get it to work because I'm not clear what I'm specifying is equal to what. For example, an INFO column in a vcf file for a particular variant might look like so....

PRECISE;SVTYPE=DEL;SVLEN=-61047;END=197292182;SUPPORT=7 etc. etc.

whereas all the other INFO fields have some name equal to some value e.g. SVTYPE=="DEL" which is easy to specify with bcftools, it only specifies either PRECISE or IMPRECISE so I don't know how to put this into a bcftools expression...

for instance bcftools view -i 'ID=="PRECISE"' does not work or 'FILTER=="PRECISE"' or just bcftools view -i 'PRECISE'

Does this make sense?

Log in to answer this question.