how to filter out all the homozygous genotypes in a multi sample VCF file?
is there way to filter out all the homozygous genotypes in a multi sample VCF file? in my vcf file I have unknown (./.) genotype, reference genotype (0/0) and two alternative genotypes (1/1 and 2/2). I want to remove these genotypes using SnpSift.jar tool.
I have used the following command to remove them:
$ cat SNPs_reheader_annot_passed.vcf.gz | java -jar /home/bandiken/snpEff/SnpSift.jar filter "(countHet() > 0)" > SNPs_reheader_annot_Het.vcf.gz
However in the final output file (the following screenshot) along with a few heterozygous genotypes in each row, we can also see the other homozygous genotypes (unwanted genotypes in my study).
so my question is that is it normal?
is there a way to remove the samples with homozygous genotypes without the whole row being removed?
Any help would be appreciated.
• 176 views