[Bioperl-l] Cannot guess alphabet error

Wes Barris wes.barris at csiro.au
Thu Sep 22 22:14:54 EDT 2005


The following code produces the error shown.  What is the correct way
to set the alphabet of a primary (or locatable) seq?

#!/usr/bin/perl -w
use strict;
use Bio::PrimarySeq;
my $myseq = new Bio::PrimarySeq(-seq=>'AGCT', -id=>'myseq', -alphabet=>'dna');

------------- 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.5/Bio/PrimarySeq.pm:837
STACK Bio::PrimarySeq::seq /usr/lib/perl5/site_perl/5.8.5/Bio/PrimarySeq.pm:279
STACK toplevel /home/wes/soft/ace/test.pl:6

It might seem to be a silly thing to want to do (setting a sequences to
a series of dashes).  My reason for wanting to do this is involves the
creation of an alighment (msf) file.

I am using a fresh version of bioperl-live, perl 5.8.5, Linux RHEL 4.1.
Wes Barris
E-Mail: Wes.Barris at csiro.au

More information about the Bioperl-l mailing list