[Bioperl-l] Connecting Bio::DB::GFF::Features on a
Bio::Graphics::Panel
Philip MacMenamin
pm66 at nyu.edu
Mon Sep 8 14:16:56 EDT 2003
Hi,
I am creating Bio::DB::GFF::Features, on the fly, (as in at run time, nothing
to do with Drosophila) using the data contained in a GFF database. I generate
a Bio::DB::GFF::Feature, with the aid of data I have retrieved from the
database, and assign them the same group and type name.
(This is in contrast to getting features from a segment taken from the DB, ie
my @pcr_products = $segment->features(-Types => "structural:GenePair_STS"); )
Code example:
my @KKs;
my $newFeature =
Bio::DB::GFF::Feature->new($db,'RNAiPredicted',$KKstart,$KKstop);
$newFeature->group('someGroup');
$newFeature->type('newType');
push @KKs, $newFeature;
I then draw these features, which appear on the panel similar to various
other features I have pulled directly from the database. They appear on the
same plane, as desired. But I would like them to be joined using a dashed
connector. To do this would you use an aggregator, and if so, how?
I have tried things like:
my $KKref = \@KKs;
my $KKagg = Bio::DB::GFF::Aggregator->new(-method => 'RNAiPredicted',
);
along with:
if ( scalar @KKs > 0 )
{
$panel->add_track(group =>$KKFeatures,
-bgcolor => 'blue',
-height => 4,
-fgcolor => 'darkgreen',
-key => 'RNAi:predicted',
-connect => 1,
-connector => 'dashed',
-bump => +1,
-connect_color => 'lightpurple',
# -label => 1,
# -description => 1
);
}
Maybe I dont need to use Bio::DB::GFF::Feature, maybe I could use a
Bio::Graphics::Feature? I tried this, but again, I could not get them to be
connected.
Thank you for any ideas,
Philip.
###Previously I asked:###
"I would like there to be no vertical (y) space between certain tracks, ie
the curatedGenes track and the UTR track, similar to the way that wormbase
have it. They should not overly eachother, due to them existing in differant
x space. What area of Bio::Graphics should I look at to do this? "
This worked for me:
my $aggregator = Bio::DB::GFF::Aggregator->new(-method => 'transcript',
-sub_parts => ['exon','UTR','CDS' ]
);
and load them out of the segment into a single array ie
my @features = $segment1->features('transcript');
Then these features can be painted on the panel with the exons on the same y
co-ord as the UTRs. Similar to wormbase.
More information about the Bioperl-l
mailing list