How to Get only one annotation with the SnpEff annotation?
1
0
Entering edit mode
6.4 years ago

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.

SNP annotation SnpEff variation • 2.5k views
ADD COMMENT
1
Entering edit mode

a variant can overlap multiple transcripts with different consequences; So why would you want to do this ?

ADD REPLY
0
Entering edit mode

Yeah you are right but for some reason I only would like to get only the first annotation. :)

ADD REPLY
0
Entering edit mode
6.4 years ago

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
ADD COMMENT

Login before adding your answer.

Traffic: 2275 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6