[Bioperl-l] Bio::DB::GFF getting a spliced sequence

Morten Lindow morten.lindow at gmail.com
Thu Oct 21 16:43:36 EDT 2004

Is there a neat way of getting a spliced mRNA sequence from a
Bio::DB::GFF database?

I have used genbank2gff3.pl to convert a genbank file to gff3. Then
loaded the file succesfully with load_gff.PLS into postgresql.

Here is a hack I am trying, but isn't there a neater way, similar to
the spliced_seq method you can call on split_locations?:

my $agg = Bio::DB::GFF::Aggregator->new(-method       => 'spliced_mRNA',
                                        -main_method => 'mRNA',
                                        -sub_parts    => 'exon');
my $dbgff      = Bio::DB::GFF->new( -adaptor => $adaptor,
                                   -aggregator => [$agg],
                                   -dsn     => $dsn,

my @transcripts = $dbgff->features('spliced_mRNA');
foreach my $f (@transcripts){
     print ">" . $f->display_id, "\n";
     foreach my $feat ($f->get_SeqFeatures()){
          print $feat->seq if $f->primary_tag eq 'exon';
     print "\n";

Morten Lindow, Ph.d student
University of Copenhagen

More information about the Bioperl-l mailing list