[Bioperl-l] Bio::DB::GFF still a nightmare...
Marco Blanchette
mblanche at berkeley.edu
Thu Mar 30 02:19:57 UTC 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:
#!/usr/bin/perl
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 =>
['exon','five_prime_UTR','three_prime_UTR'],
);
my $dmdb = Bio::DB::GFF ->new( -adaptor => 'dbi::mysql',
-dsn =>
'dbi:mysql:database=dmel_421;host=riolab.net',
-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,
);
$panel->add_track(processed_transcript=>\@transcripts,
-label=>1,
-implied_utrs=>1,
);
open FH, ">$gene.png" || die "Can't create file $gene.png\n";
print "saving $gene.png\n";
print FH $panel->png;
$panel->finished;
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-0008.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-0009.obj>
More information about the Bioperl-l
mailing list