[Bioperl-l] SeqIO fails on masked sequences

Wes Barris wes.barris at csiro.au
Wed Dec 15 01:17:54 EST 2004


Hi,

I am using a simple bioperl script to process sequences.  When
I encounter a completely masked sequence, bioperl issues this
error message and my script dies:

------------- EXCEPTION  -------------
MSG: Got a sequence with no letters in it cannot guess alphabet []
STACK Bio::PrimarySeq::_guess_alphabet 
/usr/lib/perl5/site_perl/5.8.0/Bio/PrimarySeq.pm:837
STACK Bio::Seq::SeqFastaSpeedFactory::create 
/usr/lib/perl5/site_perl/5.8.0/Bio/Seq/SeqFastaSpeedFactory.pm:134
STACK Bio::SeqIO::fasta::next_seq 
/usr/lib/perl5/site_perl/5.8.0/Bio/SeqIO/fasta.pm:141
STACK toplevel /home/wes/soft/fasta/extractSeqs.pl:28

Line 28 of my script is the "while" statement:

my $seq_in  = Bio::SeqIO->new(-format=>$format, -file => $infile);
my $seq_out = Bio::SeqIO->new(-format=>$format, -file => ">$outfile");
while (my $seq = $seq_in->next_seq()) {

An example sequence that would generate this error is:

 >test
XXXXXXXXXXXXXXXXXXXXXXXXX

Certain, there must be a way to process sequences that are
completely masked.  Is there a way to explicitly specify the
"alphabet" so that SeqIO does not have to guess it?  I could
not find a way.

I am using bioperl live (as of about one month ago) on a Redhat
8 workstation.
-- 
Wes Barris
E-Mail: Wes.Barris at csiro.au


More information about the Bioperl-l mailing list