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.
• 4,694 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Did you figure out how to do it? I am the same spot.