# How can I count the number of reads that support a variant in a vcf file?

**URL:** https://help.galaxyproject.org/t/how-can-i-count-the-number-of-reads-that-support-a-variant-in-a-vcf-file/6551
**Category:** usegalaxy.org support
**Tags:** variant-analysis, vcf
**Created:** [August 18, 2021, 8:27pm UTC](https://help.galaxyproject.org/t/how-can-i-count-the-number-of-reads-that-support-a-variant-in-a-vcf-file/6551 "2021-08-18T20:27:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![iaincambeul](https://avatars.discourse-cdn.com/v4/letter/i/b5a626/32.png) [@iaincambeul](https://help.galaxyproject.org/u/iaincambeul)
#### Post date: [August 18, 2021, 8:27pm UTC](https://help.galaxyproject.org/t/how-can-i-count-the-number-of-reads-that-support-a-variant-in-a-vcf-file/6551/1 "2021-08-18T20:27:40Z")

</div>

I have seen some methods to count the total number of SNPs, or the total SNPs at a site, but how can I count the reads that support each variant at each site from either vcf, bam, or sam?

---

<div class="post-metadata">

### Author: ![gallardoalba](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/gallardoalba/32/1903_2.png) [@gallardoalba](https://help.galaxyproject.org/u/gallardoalba)
#### Post date: [August 29, 2021, 1:17pm UTC](https://help.galaxyproject.org/t/how-can-i-count-the-number-of-reads-that-support-a-variant-in-a-vcf-file/6551/2 "2021-08-29T13:17:51Z")

</div>

Hi @iaincambeul,  
if you are interested in specific positions, this tool seems to suit your requirements: [BAM-readcount](https://github.com/genome/bam-readcount).

Regards

---

<div class="post-metadata">

### Author: ![Peter\_van\_Heusden](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/peter_van_heusden/32/824_2.png) [@Peter\_van\_Heusden](https://help.galaxyproject.org/u/Peter_van_Heusden)
#### Post date: [August 30, 2021, 6:07am UTC](https://help.galaxyproject.org/t/how-can-i-count-the-number-of-reads-that-support-a-variant-in-a-vcf-file/6551/3 "2021-08-30T06:07:06Z")

</div>

Depending on what you’re using for variant calling, some of the keys in the INFO field of the VCF might give you what you want. e.g. AO is the count of the number of reads supporting a particular variant allele.
