[Genome] Tracks with mouseover
Angie Hinrichs
angie at soe.ucsc.edu
Wed Jul 11 16:09:52 PDT 2007
Hi Archie,
It is possible, but it requires adding a bit of custom code to
hgTracks.
If you don't already have custom code for the track, let us know and
we'll provide more info about how to set that up. Also let us know
the type of data in the track (bed, psl, genePred?) from the trackDb
type setting.
If you have already registered a track handler with custom code for
your track in hgTracks.c, then this is a fairly straightforward
extension.
1. Copy the function refGeneMapName(...) to myTrackItemName(...), and
modify it so that it returns an abbreviated *copy* of the name. (That
will work for most types of tracks with named items.)
2. Copy genericMapItem(...) to myTrackMapItem(...), and modify it as
follows: in the call to mapBoxHgcOrHgGene, replace itemName (the short
name) with mapItemName (the original, long name, to appear in the
mouseover).
3. In myTrackMethods(), set tg->itemName to myTrackItemName and
tg->mapItem to myTrackMapItem.
Recompile and let us know if what you see is not what you'd like.
Hope that helps,
Angie
On Wed, 11 Jul 2007, Russell, Archie wrote:
>
> Hi,
>
> Is it possible to create a track that has a different identifier pop up
> when I mouse over an element in the browser than is displayed before I
> mouse over it? I have some long identifiers and want an abbreviated
> version to display until I hover over them.
>
> Thanks,
> Archie
>
>
> ------------------------------------------------------------------------------
> Notice: This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> New Jersey, USA 08889), and/or its affiliates (which may be known
> outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD
> and in Japan, as Banyu - direct contact information for affiliates is
> available at http://www.merck.com/contact/contacts.html) that may be
> confidential, proprietary copyrighted and/or legally privileged. It is
> intended solely for the use of the individual or entity named on this
> message. If you are not the intended recipient, and have received this
> message in error, please notify us immediately by reply e-mail and then
> delete it from your system.
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Genome maillist - Genome at soe.ucsc.edu
> http://www.soe.ucsc.edu/mailman/listinfo/genome
>
More information about the Genome
mailing list