XMFA to MAF
2
2
Entering edit mode
7.9 years ago
Lynda lyn ▴ 30

Hi everyone :)

i want to convert my XMFA file (output of progressiveMauve) into MAF.

Has anyone had any luck converting xmfa into maf? And how did you do it?

Thanks :)

L

alignment xmfa maf • 5.7k views
ADD COMMENT
1
Entering edit mode
7.8 years ago
Lynda lyn ▴ 30

Thank you Seja Modha for your help :) i found this c++ script to convert xmfa to maf:

https://github.com/Wyss/mauve-py/blob/master/mauve/src/mauveAligner/src/xmfa2maf.cpp

ADD COMMENT
0
Entering edit mode

Lynda Ait-Zai : I moved this to an answer since it does what you had originally asked for. You can accept this answer (use the green check mark) to provide closure for this thread.

ADD REPLY
0
Entering edit mode

There are no C++ scripts, only C++ programs.

ADD REPLY
3
Entering edit mode
7.9 years ago
Sej Modha 5.3k

In past, I have used following script to convert xmfa to fasta. https://github.com/lskatz/lskScripts/blob/master/convertAlignment.pl

ADD COMMENT
0
Entering edit mode

thank you Sej Modha :) i'll try it !

ADD REPLY
0
Entering edit mode

Hi Sej Modha , i tried the perl script. its works to have a fasta format but not to get the maf format.

Here is the output of my command:

$ ./transform_fasta.pl -i threeway.xmfa -o /home/lynda/Documents/threeway.maf -f maf

Converting threeway.xmfa (xmfa) to file /home/lynda/Documents/threeway.maf
------------- EXCEPTION: Bio::Root::NotImplemented -------------
MSG: Abstract method "Bio::AlignIO::maf::write_aln" is not implemented by package Bio::AlignIO::maf.
This is not your fault - author of Bio::AlignIO::maf should be blamed!
STACK: Error::throw
STACK: Bio::Root::Root::throw /usr/local/share/perl/5.22.1/Bio/Root/Root.pm:447
STACK: Bio::Root::RootI::throw_not_implemented /usr/local/share/perl/5.22.1/Bio/Root/RootI.pm:741
STACK: Bio::AlignIO::maf::write_aln /usr/local/share/perl/5.22.1/Bio/AlignIO/maf.pm:189
STACK: main::convertAlnToFile ./transform_fasta.pl:99
STACK: main::convertAln ./transform_fasta.pl:41
STACK: main::main ./transform_fasta.pl:28
STACK: ./transform_fasta.pl:15
----------------------------------------------------------------

Thank you for the help !

ADD REPLY
0
Entering edit mode

MFA stands for multiple fasta format so you should provide -f fasta parameter in the command.

ADD REPLY
0
Entering edit mode

When i add -f fasta, I get a maf file as output, but by opening the file It doesn't look like a maf file at all, it's a fasta format!. Maf contains more information than fasta format. Bio::AlignIO reads many formats but does not write in every format (the same is true for Bio::SeqIO). AlignIO currently supports output in these formats:

fasta
mase
selex
clustalw
msf
phylip
po
stockholm
XMFA
metafasta
ADD REPLY
1
Entering edit mode

I am sorry but I have not written those scripts so I won't able to help much but you could try other built-in format available in Mauve and parse them to achieve what you are trying to do.

Supported alignment output formats are: phylip, clustal, msf, nexus, mega, codon
ADD REPLY

Login before adding your answer.

Traffic: 1979 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