[Bioperl-l] Bio::SeqIO question

Chet Seligman cseligman at earthlink.net
Mon Apr 26 02:12:58 EDT 2010


Hi there. 
I'm a student and brand new to this.
I want to get a file (filename = protein.fa), which is a list of fasta
sequences, starting with:
>gi|255572219|ref|XP_002527049| retinoblastoma-binding protein, putative

Into a sequence object so I can BLAST the sequences
According to  perldoc Bio::Perl, I should be able to:
# reads an array of sequences
@seq_object_array = read_all_sequences($filename, 'fasta');

But I get an exception:

------------ EXCEPTION: Bio::Root::Exception -------------
MSG: Could not open >gi|255572219|ref|XP_002527049| retinoblastoma-binding
protein, putative
: Invalid argument
STACK: Error::throw
STACK: Bio::Root::Root::throw C:/Perl/site/lib/Bio/Root/Root.pm:368
STACK: Bio::Root::IO::_initialize_io C:/Perl/site/lib/Bio/Root/IO.pm:341
STACK: Bio::SeqIO::_initialize C:/Perl/site/lib/Bio/SeqIO.pm:467
STACK: Bio::SeqIO::fasta::_initialize C:/Perl/site/lib/Bio\SeqIO\fasta.pm:94
STACK: Bio::SeqIO::new C:/Perl/site/lib/Bio/SeqIO.pm:360
STACK: Bio::SeqIO::new C:/Perl/site/lib/Bio/SeqIO.pm:390


STACK: C:/Perl/site/lib/Bio/Perl.pm:

Here's my program snippet:
use strict;
my @seq_object_array = ();
my $blast_report = '';
use Bio::Perl;
use Bio::SeqIO;
use Bio::Tools::Run::RemoteBlast;
use Bio::SearchIO;
use Bio::SearchIO::Writer::HTMLResultWriter;
use Bio::AlignIO;
use Data::Dumper;
my $filename ='';
open (INFILE, "protein.fa");
$filename =<INFILE>;

#reads an array of sequences
@seq_object_array = read_all_sequences($filename, 'fasta');

So what should I do differently?
Thanks,
Chet


More information about the Bioperl-l mailing list