[Bioperl-l] SeqIO fails on masked sequences

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


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 
STACK Bio::Seq::SeqFastaSpeedFactory::create 
STACK Bio::SeqIO::fasta::next_seq 
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:


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