2
$\begingroup$

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

Which gives me this page: enter image description here

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

$\endgroup$
7
  • $\begingroup$ 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? $\endgroup$ – llrs Feb 21 '18 at 13:49
  • $\begingroup$ @Llopis see screenshot, I just again tested all the links, no they don't work for me :( $\endgroup$ – zx8754 Feb 21 '18 at 13:52
  • $\begingroup$ 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 ? $\endgroup$ – llrs Feb 21 '18 at 14:16
  • $\begingroup$ @Llopis the first long link that was generated from website works for you? $\endgroup$ – zx8754 Feb 21 '18 at 14:18
  • $\begingroup$ Yes, the link with "hgsid=226968..." works for me too. $\endgroup$ – llrs Feb 21 '18 at 14:19
2
$\begingroup$

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 |
+-------+------------+----------+---------+
$\endgroup$
3
  • $\begingroup$ 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? $\endgroup$ – zx8754 Feb 21 '18 at 17:13
  • $\begingroup$ By the way, what does c, o, t stand for, c=chromosome? $\endgroup$ – zx8754 Feb 21 '18 at 17:14
  • $\begingroup$ OK, just tested, c,o,t must match with gene positions. :( $\endgroup$ – zx8754 Feb 21 '18 at 17:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.