Converting .maf to FASTA for RAxML

1,221 views
Skip to first unread message

Christie Klinger

unread,
Apr 2, 2014, 12:48:38 PM4/2/14
to ra...@googlegroups.com
Hello,

I have aligned a subset of bacterial genomes using Mugsy, which outputs an .maf file. I have since converted the .maf file to FASTA format. Currently, the FASTA file is in a multiple block format (multiple blocks of sequence per strain)-- should this FASTA file be converted to a single block of concatenated sequence per strain in order to run RAxML? Trying to find a good tool that might do this.

Thanks and please let me know if I need to clarify any other details,
-Christie K


Andre J. Aberer

unread,
Apr 2, 2014, 1:39:16 PM4/2/14
to ra...@googlegroups.com
Hi Christie,

I'd expect it to work.

In case, it does not work, maybe convert it to a .phy (Phylip)
file. Seaview is very straight-forward for this task and the output will
work definitely.

--
HTH,
Andre
--
Best regards,
Andre Aberer

PreDoc (Bioinformatics) in the Exelixis Lab, Heidelberg Institute for Theoretical Studies

Christie Klinger

unread,
Apr 2, 2014, 4:20:13 PM4/2/14
to ra...@googlegroups.com, andre....@googlemail.com
Hi Andre,

Thanks for the quick reply!

When I leave the FASTA file formatted as multiple blocks per stain (more like the original .maf file), I get this error:

Fasta parsing error, RAxML expects an alignment.
the sequence before taxon >Rht_14_Assembly
: seems to have a different length


Concatenating all the blocks of sequence for each individual strain (20 total strains) fixes the problem.

Thanks for the Seaview tip-- it will be super helpful in the near future.

Regards,
-Christie

Hiren Ghosh

unread,
Aug 24, 2015, 11:38:51 AM8/24/15
to raxml, andre....@googlemail.com
Do i need to concatenate using Seaview or else i upload the file and then save as in new name??

Alexandros Stamatakis

unread,
Sep 7, 2015, 4:55:48 AM9/7/15
to ra...@googlegroups.com
I am not sure I understand your question.

Alexis
> --
> You received this message because you are subscribed to the Google
> Groups "raxml" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to raxml+un...@googlegroups.com
> <mailto:raxml+un...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

--
Alexandros (Alexis) Stamatakis

Research Group Leader, Heidelberg Institute for Theoretical Studies
Full Professor, Dept. of Informatics, Karlsruhe Institute of Technology
Adjunct Professor, Dept. of Ecology and Evolutionary Biology, University
of Arizona at Tucson

www.exelixis-lab.org

Matthieu Muffato

unread,
Sep 7, 2015, 7:07:40 AM9/7/15
to ra...@googlegroups.com
If you have BioPerl, this should work

-----------------
use Bio::AlignIO;

$in = Bio::AlignIO->new(-file => "inputfilename" ,
-format => 'maf');
$out = Bio::AlignIO->new(-file => ">outputfilename",
-format => 'phylip');

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

(taken from http://www.bioperl.org/wiki/HOWTO:AlignIO_and_SimpleAlign )

Matthieu
Reply all
Reply to author
Forward
0 new messages