# How do I count the number of variants per gene from an annotated vcf file?

**URL:** <https://help.galaxyproject.org/t/how-do-i-count-the-number-of-variants-per-gene-from-an-annotated-vcf-file/1519>\
**Category:** usegalaxy.org support\
**Tags:** gemini, variant-analysis\
**Created:** [June 10, 2019, 3:50pm UTC](https://help.galaxyproject.org/t/how-do-i-count-the-number-of-variants-per-gene-from-an-annotated-vcf-file/1519 "2019-06-10T15:50:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gcarson](https://avatars.discourse-cdn.com/v4/letter/g/779978/32.png) [@gcarson](https://help.galaxyproject.org/u/gcarson)\
**Post date:** [June 10, 2019, 3:50pm UTC](https://help.galaxyproject.org/t/how-do-i-count-the-number-of-variants-per-gene-from-an-annotated-vcf-file/1519/1 "2019-06-10T15:50:54Z")

</div>

Hi!

I generated a vcf file and then annotated it using bcftools.  
My header is in the format: Chrom Pos ID Ref Alt Qual Filter Info Format data

and some example data looks like this (most important is the GENE=\_\_\_ at the end of the INFO section):  
chr16 868776 . CGGGGGGGGGGGGC CGGGGGGGGGGGC 61.251 . AB=0.363636;ABP=4.78696;AC=1;AF=0.5;AN=2;AO=4;CIGAR=1M1D12M;DP=11;DPB=11.1429;DPRA=0;EPP=11.6962;EPPR=5.18177;GTI=0;LEN=1;MEANALT=6;MQM=37.5;MQMR=42;NS=1;NUMALT=1;ODDS=5.44144;PAIRED=1;PAIREDR=0;PAO=0;PQA=0;PQR=0;PRO=0;QA=136;QR=32;RO=1;RPL=0;RPP=11.6962;RPPR=5.18177;RPR=4;RUN=1;SAF=4;SAP=11.6962;SAR=0;SRF=1;SRP=5.18177;SRR=0;TYPE=del;technology.ILLUMINA=1; **GENE=ENST00000262301.15**

How do I group and count variants that have the same gene? Any help would be greatly appreciated.

Cheers,

Glenn

---

<div class="post-metadata">

**Author:** ![gcarson](https://avatars.discourse-cdn.com/v4/letter/g/779978/32.png) [@gcarson](https://help.galaxyproject.org/u/gcarson)\
**Post date:** [June 11, 2019, 5:02pm UTC](https://help.galaxyproject.org/t/how-do-i-count-the-number-of-variants-per-gene-from-an-annotated-vcf-file/1519/2 "2019-06-11T17:02:52Z")

</div>

bump  
Still need help with this if anyone has any insight!

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [June 11, 2019, 6:30pm UTC](https://help.galaxyproject.org/t/how-do-i-count-the-number-of-variants-per-gene-from-an-annotated-vcf-file/1519/3 "2019-06-11T18:30:07Z")

</div>

Hi @gcarson

Try the `Gemini` tools at Galaxy EU [https://usegalaxy.org](https://usegalaxy.org).

Tutorials that cover how to use `Gemini`:

> **[Galaxy Training: Variant Analysis](https://galaxyproject.github.io/training-material/topics/variant-analysis/)**
>
> Genetic differences (variants) between healthy and diseas...

Galaxy Main [https://usegalaxy.org](https://usegalaxy.org) does not have the latest `Gemini` tools/indexes for technical reasons. These issues are being addressed. Once done, we’ll add the tools/indexes.

Thanks!

---

<div class="post-metadata">

**Author:** ![gcarson](https://avatars.discourse-cdn.com/v4/letter/g/779978/32.png) [@gcarson](https://help.galaxyproject.org/u/gcarson)\
**Post date:** [June 16, 2019, 2:35am UTC](https://help.galaxyproject.org/t/how-do-i-count-the-number-of-variants-per-gene-from-an-annotated-vcf-file/1519/4 "2019-06-16T02:35:59Z")

</div>

> [@gcarson](#):
>
> GENE=ENST00000262301.15

Hi! Sorry for the late reply. from the vcf I used snpeff eff → gemini load → gemini query (with no parameters, just default)

Thanks so much for the help!

---

<div class="post-metadata">

**Author:** ![Laila\_Toum](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/laila_toum/32/1191_2.png) [@Laila\_Toum](https://help.galaxyproject.org/u/Laila_Toum)\
**Post date:** [January 7, 2020, 5:48pm UTC](https://help.galaxyproject.org/t/how-do-i-count-the-number-of-variants-per-gene-from-an-annotated-vcf-file/1519/5 "2020-01-07T17:48:33Z")

</div>

Hi everyone!  
I am trying to build a workflow for variant calling and GEMINI tools seem to be useful to my purposes, after using FREEBAYES or GATK However, I am having problems to find it in the galaxy platform I do not know why this can be occuring.  
Any help about it? Another tool already existing in galaxy to replace GEMINI?  
Thank you in advance

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [January 7, 2020, 6:54pm UTC](https://help.galaxyproject.org/t/how-do-i-count-the-number-of-variants-per-gene-from-an-annotated-vcf-file/1519/6 "2020-01-07T18:54:33Z")

</div>

Hi @Laila_Toum

We are working to get the `Gemini` suite back at **Galaxy Main** [https://usegalaxy.org](https://usegalaxy.org). We had technical issues that are expected to be resolved soon … but don’t wait. This is still very much a work-in-progress.

Meanwhile, you can use the tool suite at **Galaxy EU** [https://usegalaxy.eu](https://usegalaxy.eu).

Thanks!

> **More help for anyone running their own Galaxy server**
>
> `Gemini` can be installed from the [ToolShed](https://usegalaxy.org/toolshed) and the indexes created. Be sure to install the latest version of the tool suite _and_ the latest associated Data Manger to create _new_ indexes. Any older indexes will not work with the updated tool version without a few non-trivial modifications. Make sure your Galaxy version itself is up to date first, or additional problems may present.

---

<div class="post-metadata">

**Author:** ![PeWee](https://avatars.discourse-cdn.com/v4/letter/p/8dc957/32.png) [@PeWee](https://help.galaxyproject.org/u/PeWee)\
**Post date:** [August 28, 2020, 9:49pm UTC](https://help.galaxyproject.org/t/how-do-i-count-the-number-of-variants-per-gene-from-an-annotated-vcf-file/1519/7 "2020-08-28T21:49:54Z")

</div>

Hi,  
I faced the same issue. I used “bcftools count” and it worked like a charm on my .vcf.

Good luck!
