This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Any tool to get SNP wise stat from VCF

Hi,

I would like to generate SNP wise stat for all kind of SNPs(A_C, A_G, A_T, C_A, C_G, C_T, G_A, G_C, G_T, T_A, T_C & T_G) from VCF.

Is there any tool which can give me such stat.

Thanks

snp vcf sequencing next-gen variant calling

1 answer

if you bgzip compress and tabix index your vcf file, you can get that information using bcftools

bgzip file.vcf
tabix -p vcf file.vcf.gz
bcftools stats file.vcf.gz

Hi Jorge,

Thanks for answer, but it calculates stat for substitution which is misleading if I am particularly interested in SNP.

For example, I have ran above commands for sample1 : I got it No. of SNP = 54233 & Substitutions = A>C 1472 A>G 5680 A>T 1414 C>A 8095 C>G 1852 C>T 8746 G>A 8748 G>C 1965 G>T 7896 T>A 1330 T>C 5645 T>G 1474 Total == 54317.

Hope you have understood my problem.

Thanks, Govardhan

I've always thought that the substitutions counts were referring to snps only. good to know.

filtering snps only before running the stats module should work then:

bcftools view -v snps file.vcf.gz | bcftools stats

Log in to answer this question.