[Bioperl-l] Bio::DB::GFF still a nightmare...

Marco Blanchette mblanche at berkeley.edu
Wed Mar 29 21:19:57 EST 2006

Dear all--

There¹s definitely something I don¹t get with the Bio::DB::GFF3 module...
When I run the following script, I get the drawing I want but contaminated
with pieces of overlapping genes (see attached CG17800.png_v1). My
understanding is that the aggregate pre-mRNAs contain the attribute
ŒGene->CG_ID¹ (see the output). So when I uncomment line 25 '-attributes =>
{Gene => $gene},' in order to get only the transcript from the queried gene.
Now, as the output, I only get an "intron line" from the beginning to the
end of the gene for all transcript (see attached CG17800.png_v2)...

Can someone help me understand what I am doing wrong...

The script:
use strict;
use warnings;
use Bio::DB::GFF;
use Bio::Graphics;
use Bio::SeqFeature::Generic;
my $agg1 = Bio::DB::GFF::Aggregator->new(    -method => 'pre_mRNA',
                                            -main_method => 'mRNA',
                                            -sub_parts    =>

my $dmdb = Bio::DB::GFF    ->new( -adaptor => 'dbi::mysql',
                          -dsn =>
                          -user => 'guest',
                          -aggregators=> [$agg1],

my @genes = qw (CG17800);

for my $gene (@genes){
    my $tg = $dmdb->segment(-name => $gene);
    my @transcripts = $tg->features(-type => 'pre_mRNA',
                                     #-attributes => {Gene => $gene},
     for my $tc (@transcripts){
         my %atts = $tc->attributes;
         print "$_ => $atts{$_}\n" foreach (keys %atts);
         print "\n";
    my $panel = Bio::Graphics::Panel->new(
                  -length => $tg->length,
                  -width  => 800,
                  -pad_left => 10,
                  -pad_right => 10,
    open FH, ">$gene.png" || die "Can't create file $gene.png\n";
    print "saving $gene.png\n";
    print FH $panel->png;
    close FH;

Marco Blanchette, Ph.D.

mblanche at berkeley.edu

Donald C. Rio's lab
Department of Molecular and Cell Biology
16 Barker Hall
University of California
Berkeley, CA 94720-3204

Tel: (510) 642-1084
Cell: (510) 847-0996
Fax: (510) 642-6062

-------------- next part --------------
A non-text attachment was scrubbed...
Name: CG17800.png_v2
Type: application/octet-stream
Size: 1403 bytes
Desc: not available
Url : http://lists.open-bio.org/pipermail/bioperl-l/attachments/20060329/acaad022/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CG17800.png_v1
Type: application/octet-stream
Size: 2927 bytes
Desc: not available
Url : http://lists.open-bio.org/pipermail/bioperl-l/attachments/20060329/acaad022/attachment-0001.obj 

More information about the Bioperl-l mailing list