Entering edit mode
7.5 years ago
skdutta2091 ▴ 40
I am very new to next gen sequencing. Using mplieup and bcftools in samtools I have generated a vcf file. I want to write a perl script to extract only the heterozygous snp. How can I understand which are heterozygous snps and how they can be extracted through a perl or any programming script.
I will be very grateful if anybody can shed some lights towards the doubt please.
It won't work if you have multiple alleles per position (you'll have genotypes like 0/2 then). I recommend using vcfbreakmulti from vcflib or LeftAlignAndTrimVariants from GATK with option
--splitMultiallelicsbefore using this script.
Dear Syed, I have paired end reads. Will it work for that too?