Trouble Using Bio::Alignio In Perl Script To Covert Alignment To Maf Format
2
0
Entering edit mode
11.6 years ago
Uncle Gabby ▴ 20

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
----------------------------------------------------------------
bioperl maf • 3.8k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
2
Entering edit mode
11.6 years ago
Lee Katz ★ 3.1k

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 COMMENT
0
Entering edit mode

Oh well. Thank you.

ADD REPLY
0
Entering edit mode
ADD COMMENT

Login before adding your answer.

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