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.
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
2 answers
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
There are no C++ scripts, only C++ programs.
In past, I have used following script to convert xmfa to fasta. https://github.com/lskatz/lskScripts/blob/master/convertAlignment.pl
thank you Sej Modha :) i'll try it !
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 !
MFA stands for multiple fasta format so you should provide -f fasta parameter in the command.
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
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
Log in to answer this question.
thank you Sej Modha :) i'll try it !
Please use
ADD REPLY/ADD COMMENTwhen responding to existing posts to keep threads logically organized.If the solution suggested by @Sej works, please come back and
accept the answer(check mark) to indicate that.