I have a phased genotype VCF file(i.e haplotype in vcf format). I am interested only in the haplotypes that are there in phased vcf file. Please help or suggest some other way to do it.
what kind of output do you need ?
I want it in standard haplotype format (.hap)
does bcftools convert with the --hapsample option do what you want?
Other solution is mention in this thread.
I used the command
bcftools convert --hapsample --vcf-ids file.vcf -o output
I moved my comment to an answer, so you can mark it as accepted.