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, |
|
|---|