[Bioperl-l] Bioperl 1.4 to 1.5.2, adding qualifiers to Bio::Seq-objects

Adam Sjøgren adsj at novozymes.com
Wed Feb 7 12:11:32 EST 2007


I am transitioning from Bioperl 1.4 to 1.5.2, and the qualifiers I add
to features in Bio::Seq objects have stopped appearing when I output
them as EMBL or GenBank-files.

Below is a test-script that exercises the problem.

I guess I should be doing something else when adding qualifiers, now
with 1.5.2 (as reading an EMBL-file with Bio::SeqIO and outputting it
again of course works perfectly), but I can't deduce what from perldoc
Bio::SeqFeature::Generic - it still lists the add_tag_value method,
and calling it doesn't croak nor warn.

I have found some comments on this in the release notes of 1.5.0¹ on
the Bioperl wiki, but I must admit I wasn't able to extract what
methods I should be calling instead.

If someone could point me to the relevant documentation or tell me
what method to use instead, I would be happy as a clam.

  Best regards,


== =
use Test::More tests=>2;

use strict;
use warnings;

use Bio::Seq;
use Bio::SeqFeature::Generic;
use IO::String;
use Bio::SeqIO;

my $seq=Bio::Seq->new(


my $seq_feature=Bio::SeqFeature::Generic->new(
$seq_feature->set_attributes(-start=>2, -end=>8);


my $raw='';
my $fh=IO::String->new($raw);
my $out=Bio::SeqIO->new(-format=>'EMBL', -fh=>$fh);

ok($raw=~m!/note!, 'Qualifier note found');
ok($raw=~m!/db_xref!, 'Qualifier db_xref found');
== =

¹ <http://www.bioperl.org/wiki/Core_1.4.0_1.5.0_delta>

                                                          Adam Sjøgren
                                                    adsj at novozymes.com

More information about the Bioperl-l mailing list