I have generated a VCF file with 9 samples, each being a separate species aligned to a common reference. I am hoping to generate multiple sequence alignment files in fasta format for each gene for use with iqtree tree topology tests. For example, for each gene in the reference, I'd like to produce something like the following:
>sample/species_1
AATT
>sample/species_2
ATTT
>sample_species_3
TTTT
I am assuming bcftools consensus is the tool to use for this. I read a related tutorial using this program. However, bcftools consensus does not accommodate multi-sample vcf files. What would be the most efficient way to create a multiple sequence alignment file for each region in a BED file?
Have you tried play with bedtools?