Hello, I have a set of .vcf files with phased genotypes that I would like to convert to standard haplotype format (.hap). Is there any tool that makes this?

Here is a toy example of a .hap file of a population of 2 human individuals, with 12 SNPs each:

    1  1 2 2 1 2 2 2 1 1 1 1 1
    2  1 1 1 2 1 1 2 2 1 2 1 2
    3  1 1 2 1 2 2 1 1 2 2 1 2 
    4  2 2 2 2 2 2 1 1 1 1 1 1 

Each line represents a chromosome, the first element being the haplotype ID. 1 and 2 represent ancestral and derived alleles, respectively.

Many thanks
Assuming all of your genotypes are phased, this should be doable with recent plink 2.0 alpha builds (which you can download from https://www.cog-genomics.org/plink/2.0/ ):

    plink2 --vcf phased.vcf --export haps --out new_filename_prefix