[Bioperl-l] SeqIO fails on masked sequences

Wes Barris wes.barris at csiro.au
Wed Dec 15 17:37:13 EST 2004


Marc Logghe wrote:

> Hi, 
> 
>>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()) {
> 
> 
> Guess you can do it by setting the alphabet explicitely:
> $seq_in->alphabet('dna'); # or 'rna' or 'protein'

Sorry, that does not work.  I tried this and got the same error:

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

> 
> You probably also can pass it directly with the constructor, but did not find that immediately.

Sorry, that did not work either.  Here is what I tried:

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

> Indirectly, you can do it also by setting the alphabet for the factory object and passing the factory object with the Bio::SeqIO constructor.

Would you provide an example?

> 
> HTH,
> Marc


-- 
Wes Barris
E-Mail: Wes.Barris at csiro.au


More information about the Bioperl-l mailing list