« Return to Thread: Access the parent of a Bio::DB::SeqFeature within a gbrowse config callback function

Access the parent of a Bio::DB::SeqFeature within a gbrowse config callback function

by Daniel Lang-3 :: Rate this Message:

Reply to Author | View in Thread

Hi,

I'm looking for an efficient way (hack) to access the parent of a given
feature within a callback function in a gbrowse config. Currently I do
it like this:
if ($feature->get_tag_values('parent_id')) {


        my $store= $parent->object_store;


        if ($store and $store->can_store_parentage) {

                do {


                my @p   = $parent->get_tag_values('parent_id');


                if (@p) {


                $parent = @{ [ grep {$_ and $_->seq_id eq
$feature->seq_id and $_->location->contains($feature->location)}
$store->get_features_by_alias($p[0])] }[0];

                        }


               else { last; }
                        }


                until ($parent and ($name = $parent->name));


        }
}
The callback is used in to produce popups within a link attribute
(ggbmenu.js).
The problems with this approach are a)effciency and b) if a feature on
the same region exists with the same ID.

So I wonder if there is some "magic" object/variable in the scope of the
callback I could use? I originally hoped that this would work with
something like $GBROWSE...

Additionally, it would be great if someone could point me to code that
uses these "meta variables" (e.g. access browser or track or panel
objects) to generate content.

Thanks in advance,

Daniel

--

Daniel Lang
University of Freiburg, Plant Biotechnology
Schaenzlestr. 1, D-79104 Freiburg
fax: +49 761 203 6945
phone: +49 761 203 6974
homepage:  http://www.plant-biotech.net/
e-mail: daniel.lang@...

#################################################
My software never has bugs.
It just develops random features.
#################################################




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Gmod-gbrowse mailing list
Gmod-gbrowse@...
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse

 « Return to Thread: Access the parent of a Bio::DB::SeqFeature within a gbrowse config callback function