Working on a multiple sequence alignment project, I wanted to calculate a distance matrix from a MSA dataset generated by
progressiveMauve. The MSA file is in xmfa format.
I could not find a tool that calculates a distance matrix directly from the xmfa file, so I searched for conversion utilities to other MSA formats, such as phylip, maf, or msa.
This biostars forum entry always came out at top but the links provided there are dead. Geneious-prime loads xmfa but I could not figure out how to write it back in a different format. Final solution: biopython:
from Bio import AlignIO with open('alignment.xmfa', 'r') as ifh: alignments = AlignIO.parse(ifh, format='mauve') with open('alignment.phy', 'w') as ofh: AlignIO.write(alignments=alignments, handle=ofh, format='phylip')