This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to convert .XFMA file to .nexus file

Hi Everyone.

I have generated an .xfam alignment file using Parsnp (harvest suite)

For phylogenetical analysis, I want to usie BEAST program which requires the input file to be in NEXUS format.

I use bioperl but somehow its not converting properly which need input for BEAUti.

use Bio::AlignIO;

$in  = Bio::AlignIO->new(-file => "parsnp.xmfa" ,
                         -format => 'xmfa');
$out = Bio::AlignIO->new(-file => ">parsnp_alignment.nexus",
                         -format => 'nexus');

while ( my $aln = $in->next_aln ) {
  $out->write_aln($aln);
}

Can anyone please help me out.

xfma nexus

Did you figure out how to do it? I am the same spot.

0 answers

No answers yet.

Log in to answer this question.