This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Extracting haplotypes from phased vcf file

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.

haplotype

I want it in standard haplotype format (.hap)

1 answer

Hello siddazra,

does bcftools convert with the --hapsample option do what you want?

Other solution is mention in this thread.

fin swimmer

It worked. I used the command

bcftools convert --hapsample --vcf-ids file.vcf -o output

Thanks.

Fine :)

I moved my comment to an answer, so you can mark it as accepted.

fin swimmer

Log in to answer this question.