URLs for Details Pages: Difference between revisions
From genomewiki
Jump to navigationJump to search
No edit summary |
|||
Line 1: | Line 1: | ||
==Adding URL links to Details Pages== | ==Adding URL links to Track Details Pages== | ||
One or more URL links can be added to details pages using trackDb settings. In ~/kent/src/hg/hgc/hgc.c, functions are created that print the details pages specific for each track. | One or more URL links can be added to details pages using trackDb settings. In ~/kent/src/hg/hgc/hgc.c, functions are created that print the details pages specific for each track. |
Revision as of 06:08, 19 November 2007
Adding URL links to Track Details Pages
One or more URL links can be added to details pages using trackDb settings. In ~/kent/src/hg/hgc/hgc.c, functions are created that print the details pages specific for each track.
- In order to print a custom URL specified in trackDb, the function, printCustomUrl() may be used. printCustomUrlWithLabel() can be used to add a URL and a label that are specified in trackDb.
e.g. for human vegaGene hgwdev> cd ~/kent/src/hg/makeDb/trackDb/human hgwdev> vi trackDb.ra
- In the track entry for the Bertone Yale TAR track (yaleBertoneTars), there is a url trackDb setting:
url http://dart.gersteinlab.org/cgi-bin/ar/lookup.cgi?acc=$$
- The $$ represents the location where the item name is inserted in the URL.
- NOTE: The track item name may not be used to construct the URL. If another name/idnentifier is used that is stored in a database table then a trackDb setting (idInUrlSql) can specify the mySQL statement used to select the name of the item to be used for the URL. e.g. for the SIB Alt-Splicing track, the following trackDb settings are used for the URL:
url http://www.isrec.isb-sib.ch/cgi-bin/tromer/tromergraph2draw.pl?species=H.+sapiens&tromer=$$ urlLabel SIB link: idInUrlSql select name from sibTxGraph where id=%s
- The label for the link is specified in the trackDb.ra using the urlLabel setting e.g.
urlLabel Yale DART Link:
- On the details page for a track item, the item is a hyperlink that links to the external Yale database:
Yale DART Link: 17438 [1]
- Multiple URLs may be specified for a track. For subsequence urls, the numbered suffix is used to specify the URLs,
e.g. url2, url3, and the corresponding urlLabel settings are e.g. url2Label, url3Label. It is assumed that for urlN, the corresponding label setting is urlNLabel. e.g. in the sno/miRNA track (wgRna) entry in the human trackDb.ra, there are 2 urls specified:
urlLabel Laboratoire de Biologie Moléculaire Eucaryote: url http://www-snorna.biotoul.fr/plus.php?id=$$ url2Label The miRNA Registry: url2 http://microrna.sanger.ac.uk/cgi-bin/sequences/mirna_entry.pl?id=$$
- For the sno/miRNA track, the doWgRna() function picks a url depending on the "type" of the sno/miRNA item.