Question: How to Get only one annotation with the SnpEff annotation?
0
gravatar for mhmtgenc85
2.6 years ago by
mhmtgenc8540
Turkey
mhmtgenc8540 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 • 1.2k views
ADD COMMENTlink modified 2.6 years ago by Pierre Lindenbaum134k • written 2.6 years ago by mhmtgenc8540
1

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

ADD REPLYlink modified 2.6 years ago • written 2.6 years ago by Pierre Lindenbaum134k

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

ADD REPLYlink written 2.6 years ago by mhmtgenc8540
0
gravatar for Pierre Lindenbaum
2.6 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum134k 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 2.6 years ago by Pierre Lindenbaum134k
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: 986 users visited in the last hour
_