Question: How to Get only one annotation with the SnpEff annotation?
0
gravatar for mhmtgenc85
12 months ago by
mhmtgenc8530
Turkey
mhmtgenc8530 wrote:

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 snpeff variation annotation • 554 views
ADD COMMENTlink modified 12 months ago by Pierre Lindenbaum121k • written 12 months ago by mhmtgenc8530
1

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

ADD REPLYlink modified 12 months ago • written 12 months ago by Pierre Lindenbaum121k

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

ADD REPLYlink written 12 months ago by mhmtgenc8530
0
gravatar for Pierre Lindenbaum
12 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum121k wrote:

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 COMMENTlink written 12 months ago by Pierre Lindenbaum121k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1266 users visited in the last hour