# Link to UCSC gtexGene track description page for selected gene symbol

I have this link that comes up when I am in the browser window and click on the gene name, which leads me to description page about the gene (in this example it is BOK gene).

How can I generate that link? Below are some of my failed attempts. There is a UCSC FAQ page about the links, didn't help much, maybe I am reading it wrong.

Link that works, generated when clicked on gene on the website:

http://genome-euro.ucsc.edu/cgi-bin/hgc?hgsid=226968178_C6XmUjsjtt3Mm9fOmePo6VqRN6TV&c=chr2&l=241667282&r=242920780&o=242498135&t=242513546&g=gtexGene&i=BOK

My failed attempts to generated custom link:

http://genome-euro.ucsc.edu/cgi-bin/hgTracks?db=hg19&position=chr2%3A241667283-242920780&gtexGene&i=BOK

http://genome.ucsc.edu/cgi-bin/org=human&db=hg19&gtexGene&i=BOK

http://genome.ucsc.edu/cgi-bin/gtexGene?org=human&db=hg19&i=BOK

http://genome.ucsc.edu/cgi-bin/gtexGene?org=human&db=hg19&hgg_gene=BOK

http://genome.ucsc.edu/cgi-bin/gtexGene?org=human&db=hg19&i=BOK

http://genome.ucsc.edu/cgi-bin/gtexGene?org=human&db=hg19&g=gtexGene&i=BOK

http://genome.ucsc.edu/cgi-bin/org=human&db=hg19&g=gtexGene&i=BOK

http://genome.ucsc.edu/cgi-bin/hgTracks?org=human&db=hg19&g=gtexGene&i=BOK

• The first one of your failed attempts work for me, but the returned page is different to the reference link. Could you clarify what is the expected result? – llrs Feb 21 '18 at 13:49
• @Llopis see screenshot, I just again tested all the links, no they don't work for me :( – zx8754 Feb 21 '18 at 13:52
• I can't reproduce with the first and the last link (those with hgTracks). But the page is not like the screenshot. Maybe you (or your IP) hit an API limit ? – llrs Feb 21 '18 at 14:16
• @Llopis the first long link that was generated from website works for you? – zx8754 Feb 21 '18 at 14:18
• Yes, the link with "hgsid=226968..." works for me too. – llrs Feb 21 '18 at 14:19

You never want to include the hgsid parameter in your url because that is the link to your current browsing session and all its specific contents. So if you send that link to someone else and then they start browsing around that link may not work correctly again in the future if you or the person you sent the link to modify your browsing session.

As to how to create links to hgc pages, the usually follow a somewhat general format: http://genome-euro.ucsc.edu/cgi-bin/hgc?db=hg19&c=chr2&o=242498135&t=242513546&g=gtexGene&i=BOK

You need the db and g parameters to specify the assembly build and track, and then you need to provide the position in the form of the c,o and t parameters. The last thing you want is the i paramter to specify the item name. The reason the i parameter alone is not enough is because we do not require uniqueness on item names (there may be many copies of an item across the genome for instance).

You can obtain the c, o, t and i parameters by selecting the chrom, chromStart, chromEnd and name fields from the gtexGene table:

\$ mysql --user=genome --host=genome-mysql.soe.ucsc.edu -A -P 3306 -e "select chrom, chromStart, chromEnd, name from gtexGene limit 1" hg38
+-------+------------+----------+---------+
| chrom | chromStart | chromEnd | name    |
+-------+------------+----------+---------+
| chr1  |      11868 |    13052 | DDX11L1 |
+-------+------------+----------+---------+

• Great, thank you. Is the link matching on the positions from c,o,t parameters or by the name i=BOK? In other words can that c,o,t region be wider than the gene size, meaning look in this wider region for gene named BOK? – zx8754 Feb 21 '18 at 17:13
• By the way, what does c, o, t stand for, c=chromosome? – zx8754 Feb 21 '18 at 17:14
• OK, just tested, c,o,t must match with gene positions. :( – zx8754 Feb 21 '18 at 17:18