samtools / bcftools

This is the official development repository for BCFtools. See installation instructions and other documentation here http://samtools.github.io/bcftools/howtos/install.html
http://samtools.github.io/bcftools/
Other
633 stars 241 forks source link

How to compare several vcf files using bcftools #2196

Closed Arline13 closed 1 month ago

Arline13 commented 1 month ago

Hello,

I want to compare several vcf files using by counting number of heterozygous and homozygous snps in mitochondrial genes but I don't find these in my results.

bcftools stats --regions LL_Mitochondrion 1202.vcf.gz a6595.vcf.gz 3.vcf.gz 5.vcf.gz

I want also to see the sharing snps for all my vcf files but I don't find script for this

Can someone help me for this

Thanks in advance for your help

pd3 commented 1 month ago

Take a look at the bcftools isec command. It allows to create intersections, unions and complements of VCFs, which can then be investigated with bcftools stats

Arline13 commented 1 month ago

Thanks for replying

I have another question. I have a phasing vcf files, I used beagle to do it and now I want to calculate number of unique haplotype for my phased vcf files. I tried whathap tools, bcftools but I don't see script that give directly number or frequency of haplotype