Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Bio::AlignIO help needed...

by Athanasius (Archbishop)
on Aug 23, 2014 at 16:08 UTC ( [id://1098419]=note: print w/replies, xml ) Need Help??


in reply to Bio::AlignIO help needed...

Hello HelplessEskimo, and welcome to the Monastery!

Although it looks bizarre, that is simply the error message thrown by Bio::AlignIO->new() when the specified file does not exist. I verified this as follows:

1:50 >perl -MBio::AlignIO -wE "my $out = Bio::AlignIO->new(-file => ' +X.fasta', -format => 'fasta');" ------------- EXCEPTION: Bio::Root::Exception ------------- MSG: Could not read file 'X.fasta': No such file or directory STACK: Error::throw STACK: Bio::Root::Root::throw C:/Perl/Strawberry/strawberry-perl-5.20. +0.1-64bit-PDL/perl/site/lib/Bio/Root/Root.pm:449 STACK: Bio::Root::IO::_initialize_io C:/Perl/Strawberry/strawberry-per +l-5.20.0.1-64bit-PDL/perl/site/lib/Bio/Root/IO.pm:270 STACK: Bio::AlignIO::_initialize C:/Perl/Strawberry/strawberry-perl-5. +20.0.1-64bit-PDL/perl/site/lib/Bio/AlignIO.pm:401 STACK: Bio::AlignIO::new C:/Perl/Strawberry/strawberry-perl-5.20.0.1-6 +4bit-PDL/perl/site/lib/Bio/AlignIO.pm:311 STACK: Bio::AlignIO::new C:/Perl/Strawberry/strawberry-perl-5.20.0.1-6 +4bit-PDL/perl/site/lib/Bio/AlignIO.pm:332 STACK: -e:1 ----------------------------------------------------------- 1:51 >

(There is no such file in my current directory.)

So, I suggest you add the following immediately before the call to Bio::AlignIO->new():

use Cwd; printf "Current working directory: '%s'\n", getcwd; printf "Fasta file to read: '%s'\n", $array[3];

to verify that the -file parameter you are passing to new really does name a file which exists in the current working directory.

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1098419]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2024-04-19 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found