Question: XMFA to MAF
2
gravatar for Lynda lyn
2.4 years ago by
Lynda lyn30
France
Lynda lyn30 wrote:

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

xmfa alignment maf • 2.0k views
ADD COMMENTlink modified 2.4 years ago • written 2.4 years ago by Lynda lyn30
1
gravatar for Lynda lyn
2.4 years ago by
Lynda lyn30
France
Lynda lyn30 wrote:

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 COMMENTlink written 2.4 years ago by Lynda lyn30

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 REPLYlink written 2.4 years ago by genomax68k

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

ADD REPLYlink written 14 months ago by Raygozak1.3k
3
gravatar for Sej Modha
2.4 years ago by
Sej Modha4.2k
Glasgow, UK
Sej Modha4.2k wrote:

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

ADD COMMENTlink written 2.4 years ago by Sej Modha4.2k

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

ADD REPLYlink written 2.4 years ago by Lynda lyn30

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 REPLYlink modified 2.4 years ago • written 2.4 years ago by Lynda lyn30

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

ADD REPLYlink written 2.4 years ago by Sej Modha4.2k

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 REPLYlink modified 2.4 years ago • written 2.4 years ago by Lynda lyn30
1

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 REPLYlink written 2.4 years ago by Sej Modha4.2k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 881 users visited in the last hour