How to Get only one annotation with the SnpEff annotation?
Dear All,
As you know when annotationg a vcf file each line might have more than one annotation but I would like to get only one annotation for a line? the first one only if possible.
So thanks in advance.
• 3,209 views
•
link
1 answer
using vcffilterjdk: http://lindenb.github.io/jvarkit/VcfFilterJdk.html
java -jar dist/vcffilterjdk.jar -e 'final String ann="ANN";List<Object> atts = variant.getAttributeAsList(ann); return atts.size()<=1 ? variant : new VariantContextBuilder(variant).attribute(ann,atts.get(0)).make();' input1.vcf
• 1 views
•
link
Log in to answer this question.
a variant can overlap multiple transcripts with different consequences; So why would you want to do this ?
Yeah you are right but for some reason I only would like to get only the first annotation. :)