Question: Trouble Using Bio::Alignio In Perl Script To Covert Alignment To Maf Format
0
gravatar for Uncle Gabby
6.7 years ago by
Uncle Gabby20
Uncle Gabby20 wrote:

Hello there,

I hope someone might have some insight into a problem I am having using the BioPerl module Bio::AlignIO in a perl script to convert a fasta formatted alignment into MAF format. I would appreciate any help you could offer in terms of getting the conversion script to work OR information about other tools to convert files into MAF format. Thank you and here is the script:

use Bio::AlignIO;
$inputfilename = $ARGV[0];
$in  = Bio::AlignIO->newFh(-file => $inputfilename ,
                           '-format' => 'fasta');
$out = Bio::AlignIO->newFh('-format' => 'maf');

print $out $_ while <$in>;

When I run it here is the output:

------------- 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 Bio::Root::RootI::throw_not_implemented /opt/local/lib/perl5/site_perl/5.12.4/Bio/Root/RootI.pm:748
STACK Bio::AlignIO::maf::write_aln /opt/local/lib/perl5/site_perl/5.12.4/Bio/AlignIO/maf.pm:189
STACK Bio::AlignIO::PRINT /opt/local/lib/perl5/site_perl/5.12.4/Bio/AlignIO.pm:503
STACK toplevel test.pl:10
----------------------------------------------------------------
maf bioperl file conversion • 2.5k views
ADD COMMENTlink modified 6.7 years ago by Whetting1.5k • written 6.7 years ago by Uncle Gabby20

How would one even be able to convert FASTA to MAF?

ADD REPLYlink written 6.7 years ago by Istvan Albert ♦♦ 80k
2
gravatar for Lee Katz
6.7 years ago by
Lee Katz2.9k
Atlanta, GA
Lee Katz2.9k wrote:

For some AlignIO modules, only reading is implemented and not writing, or vice versa. The error message indicates that writing is not implemented. It's possible that someone on Biostar knows whether there are plans to implement it.

ADD COMMENTlink written 6.7 years ago by Lee Katz2.9k

Oh well. Thank you.

ADD REPLYlink written 6.7 years ago by Uncle Gabby20
0
gravatar for Whetting
6.7 years ago by
Whetting1.5k
Bethesda, MD
Whetting1.5k wrote:

check this https://github.com/csw/bioruby-maf/blob/master/features/maf-to-fasta.feature

ADD COMMENTlink modified 6.7 years ago • written 6.7 years ago by Whetting1.5k
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: 1001 users visited in the last hour