<p>I managed to solve the issue by using a slightly different approach to @Ram RS, which is <code>bcftools csq</code> instead of <code>bcftools annotate</code>. The formatting is via GFF3, and the tool is picky about how to format it, but it turns out Torsten @tseemann had already gone through the pain of matching what the tool expects with the GFF3 flavour, and then it works:</p>
<p><a href="https://github.com/samtools/bcftools/issues/530#issuecomment-377637623" rel="nofollow noreferrer">https://github.com/samtools/bcftools/issues/530#issuecomment-377637623</a></p>
<p>An example gff3 for a single CDS of length=1463 is:</p>
<pre><code>
seq1    geneX   gene    1       1463    .       +       .       ID=gene:gene1;Name=gene1;biotype=protein_coding                                            
seq1    geneX   mRNA    1       1463    .       +       .       ID=transcript:transcript1;Name=transcript1;Parent=gene:gene1;biotype=protein_coding        
seq1    geneX   CDS     1       1463    .       +       0       ID=CDS:cds1;Name=CDS1;Parent=transcript:transcript1;biotype=protein_coding                  
</code></pre>
<p>Then call it with:</p>
<pre><code>bcftools csq -p m -f $fastaref -g $gff3 $inputvcf -o $outvcf
</code></pre>
<p>Thank you all for commenting.</p>

CC BY-SA 4.0
2023-10-16T10:17:46.547Z
2023-10-16T10:17:46.547Z
719016
<p>All of them have ways you can add your own annotation dataset but I've found the easiest way to be to use <a href="https://samtools.github.io/bcftools/bcftools.html#annotate" rel="nofollow noreferrer">bcftools annotate</a>. You can give it a tab-delimited (GTF is tab-delimited, but might need some pre-processing to get relevant values from column-9) or VCF file and have it pick specific columns/attributes, match the locus by any subset of CHR, POS, REF, ALT and add the annotation in a variety of custom manners. <a href="https://github.com/brentp/vcfanno" rel="nofollow noreferrer">vcfanno</a> is another option.</p>

CC BY-SA 4.0
2023-10-12T14:36:35.157Z
2023-10-12T14:36:35.157Z
Ram RS
<p>I have a use case where I want to annotate the variants from running Oxford Nanopore's Medaka on a very simple reference, a single sequence starting on an ATG and finishing on a stop codon (no introns).</p>
<p>Which of the variant effect prediction tools would be the easiest to use to programmatically create the .gtf annotation file and build a reference upon which one can then call the variant annotation, and get the different types of variant consequences on the vcf file (synonymous, non-synonymous with the pair of aa's involved, frame-shifts, etc.)</p>
<p>So far I have looked at:</p>
<ul>
<li><p>snpEff: it seems to have a way of building the reference, although it's not straightforward to match the built java .jar with the one in the system.</p>
</li>
<li><p>annovar: I couldn't find the documentation on how to supply your own annotations, only how to download the human GRCh38 or equivalents.</p>
</li>
<li><p>VEP: I couldn't find the documentation on how to supply your own annotations, only how to download the human GRCh38 or equivalents.</p>
</li>
</ul>
<p>Any ideas?</p>

<variant-calling><snpeff>
which SNP effect software, such as VEP, annovar or snpEff, allows the user to submit their own annotations in gtf format?
# which SNP effect software, such as VEP, annovar or snpEff, allows the user to submit their own annotations in gtf format?

(Asked by: username_0 on 2023-10-12)

I have a use case where I want to annotate the variants from running Oxford Nanopore's Medaka on a very simple reference, a single sequence starting on an ATG and finishing on a stop codon (no introns).

Which of the variant effect prediction tools would be the easiest to use to programmatically create the .gtf annotation file and build a reference upon which one can then call the variant annotation, and get the different types of variant consequences on the vcf file (synonymous, non-synonymous with the pair of aa's involved, frame-shifts, etc.)

So far I have looked at:

* snpEff: it seems to have a way of building the reference, although it's not straightforward to match the built java .jar with the one in the system.
* annovar: I couldn't find the documentation on how to supply your own annotations, only how to download the human GRCh38 or equivalents.
* VEP: I couldn't find the documentation on how to supply your own annotations, only how to download the human GRCh38 or equivalents.

Any ideas?

**Tags:** variant-calling, snpeff

---

## 2 answers

### Answer by username_0 on 2023-10-16. Score: 1 | Accepted answer

I managed to solve the issue by using a slightly different approach to @Ram RS, which is bcftools csq instead of bcftools annotate. The formatting is via GFF3, and the tool is picky about how to format it, but it turns out Torsten @tseemann had already gone through the pain of matching what the tool expects with the GFF3 flavour, and then it works:
https://github.com/samtools/bcftools/issues/530#issuecomment-377637623
An example gff3 for a single CDS of length=1463 is:

seq1    geneX   gene    1       1463    .       +       .       ID=gene:gene1;Name=gene1;biotype=protein_coding                                            
seq1    geneX   mRNA    1       1463    .       +       .       ID=transcript:transcript1;Name=transcript1;Parent=gene:gene1;biotype=protein_coding        
seq1    geneX   CDS     1       1463    .       +       0       ID=CDS:cds1;Name=CDS1;Parent=transcript:transcript1;biotype=protein_coding                  

Then call it with:
bcftools csq -p m -f $fastaref -g $gff3 $inputvcf -o $outvcf

Thank you all for commenting.


---

### Answer by username_1 on 2023-10-12. Score: 2

All of them have ways you can add your own annotation dataset but I've found the easiest way to be to use [bcftools annotate](https://samtools.github.io/bcftools/bcftools.html#annotate). You can give it a tab-delimited (GTF is tab-delimited, but might need some pre-processing to get relevant values from column-9) or VCF file and have it pick specific columns/attributes, match the locus by any subset of CHR, POS, REF, ALT and add the annotation in a variety of custom manners. [vcfanno](https://github.com/brentp/vcfanno) is another option.


---

