How to convert mugsy (maf) alignment to phylip for RaxML input
1
0
Entering edit mode
9.3 years ago
jeccy.J ▴ 60

Hi Everyone

I was trying to convert mugsy whole genome alignment (maf) file to phylip using bioperl. My code is bellow

use Bio::AlignIO;

$in  = Bio::AlignIO->new(-file => "mygenome_test.maf" ,
                         -format => 'maf');
$out = Bio::AlignIO->new(-file => ">mygenome_test_out.phy",
                         -format => 'phylip');

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

In next step when I run RaxMl for phylogeny

$ ./raxmlHPC -s mygenome_test_out.phy -m GTRCAT -n Test_dna2

RAxML correctly finished parsing your PHYLIP file,
but there seems to be garbage at the end of the file, i.e., non-whitespace characters!
RAxML will exit now

Can anyone please help me out?

Bioperl Phylogeny • 3.8k views
ADD COMMENT
0
Entering edit mode
9.3 years ago
kloetzl ★ 1.1k

Here is an awk script that converts .maf to phylip style alignments.

https://github.com/EvolBioInf/andi/blob/master/scripts/maf2phy.awk

ADD COMMENT

Login before adding your answer.

Traffic: 2478 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6