# Converting aligned fasta to plink ped/bed

I have an alignment of multiple sequences in a FASTA file (output from MAFFT), for which I would like to simulate a phenotype using plink, but for that I need to have my alignment in a PED file or plink BED. There's plenty online about converting in the other direction, but the only mention I found of converting FASTA to BED is about aligning a raw FASTQ file for use in plink - my data is already aligned! How can I do this conversion?

Note that How to convert FASTA to BED is about the UCSC BED format, not the plink binary PED.

• FASTA file contains sequences, whereas PED file contains variants. Usually, you need to do variant-calling on sequencing file to get variant file. I do not know that is contained in your FASTA file. May 28 '20 at 21:04
• I have the same challenge, I have aligned sequences but not vcfs, bams or fastqs. Any ideas? Jul 25 '20 at 19:47

I did a quick search for ways of converting a multiple sequence alignment (MSA) to VCF. There is a tool called msa2vcf in the Jvarkit collection of utilities that can do this. The example is for the CLUSTAW format but FASTA is accepted as well.