8702a72f40ba1b80df1e343f226db5d76184514c dschmelt Fri Apr 26 17:21:45 2019 -0700 Adding new URL info to this page #23131 diff --git src/hg/htdocs/FAQ/FAQlink.html src/hg/htdocs/FAQ/FAQlink.html index f50ee99..1d95dcb 100755 --- src/hg/htdocs/FAQ/FAQlink.html +++ src/hg/htdocs/FAQ/FAQlink.html @@ -1,125 +1,167 @@

Frequently Asked Questions: Linking to the Genome Browser

Topics


See also:

-

-Return to FAQ Table of Contents

-

Linking to the Genome Browser from another software application

-
How do I construct a hyperlink to the Genome Browser from my software?
+

Linking to a specific position in the Genome Browser

-Make a link to the Genome Browser using a URL of the form:

-
http://genome.ucsc.edu/cgi-bin/hgTracks?org=[org]&db=[db]&position=[position]
+You can make a link to a specific position in Genome Browser using a URL with the db= +and position= parameters:

+
http://genome.ucsc.edu/cgi-bin/hgTracks?db=[db]&position=[position]

Where:

+

The following link is an example of a URL that declares assembly and position:

+
http://genome.ucsc.edu/cgi-bin/hgTracks?db=hg19&position=chr1:35000-40000
-

Linking to the browser at the position of a knownCanonical transcript associated with a gene -symbol

-
How do I make a link to the browser from my application so that it will open at the position -of the transcript in knownCanonical table that is associated with a given gene symbol?
+

Linking to the browser on a particular gene symbol or displaying gene information

-Using the URL described above, set the position parameter to the gene symbol -and add the parameter singleSearch=knownCanonical. For example, this link will open the +Set the position parameter in the URL to the gene symbol and add the parameter +singleSearch=knownCanonical. For example, this link will open the Genome Browser for the hg19 human assembly at the position of the knownCanonical transcript associated with GABRA3:

-
http://genome.ucsc.edu/cgi-bin/hgTracks?org=human&db=hg19&singleSearch=knownCanonical&position=GABRA3 
+
http://genome.ucsc.edu/cgi-bin/hgTracks?db=hg19&singleSearch=knownCanonical&position=GABRA3

-The following URL will open up the Genome Browser description page containing links to associated -information for the above gene:

-
http://genome.ucsc.edu/cgi-bin/hgGene?org=human&db=hg19&hgg_gene=GABRA3 
+The following URL connecting to 'hgGene' will open up the Genome Browser description page +containing descriptions, expression, and links to associated information for the above gene. +Note the use of the URL parameter hgg_gene=:

+
http://genome.ucsc.edu/cgi-bin/hgGene?db=hg19&hgg_gene=GABRA3 

The hgsid parameter

What is the hgsid parameter? Should I include it in URLs when I make a link to the Genome Browser?

-The hgsid parameter is a temporary, internally used parameter that should not be used when -constructing links to the Genome Browser.

+The hgsid parameter is a temporary, internally used parameter that stores information +about what tracks the user last viewed, what position they were at, and what display settings they +had enabled. This should not be used when constructing links to the Genome Browser and could +unintentionally give someone access to private user data.

- +

Creating a custom URL to view specific tracks

How can I create a custom URL to view a specific subset of tracks in the Genome Browser?

Each assembly in the Genome Browser will display using a default set of tracks unless you specifically modify the track set in your URL. The easiest way to construct your custom URL is by logging in to your Genome Browser account and creating a session:

Here is an example of a URL that displays the UCSC Genes track in pack mode and the RefSeq Genes in full mode:

http://genome.ucsc.edu/cgi-bin/hgTracks?hgS_doOtherUser=submit&hgS_otherUserName=[User Name]&hgS_otherUserSessionName=[Session Name]&knownGene=pack&refGene=full 
+ +

Setting visibitlies via the URL

+

+You can control the visibility of tracks via the URL with the following parameters, +each linked by the & sign, similar to previous commands. Here are a few commands you can use +to control track visibility.

+ +

+For example, you can use the following command to only show the knownGene track:

+
http://genome.ucsc.edu/cgi-bin/hgTracks?db=hg38&hideTracks=1&knownGene=pack
+

You can use the following command to go to a particular position:

+
http://genome.ucsc.edu/cgi-bin/hgTracks?db=hg19&position=chr1:11000-20000
+

You can use the following command to go to a particular gene:

+
http://genome.ucsc.edu/cgi-bin/hgTracks?db=hg38&position=KRAS&singleSearch=knownCanonical
+ +

Loading data using the URL

+ +

Load Custom Track data with a URL

+

+You can combine the above URL settings with the hgct_customText= parameter, to input your track +line you would otherwise put in the custom track +input box. The following is an example of the hgct_customText URL variable:

+
hgct_customText=track%20type=bigBed%20bigDataUrl=https://genome.ucsc.edu/goldenPath/help/examples/bigBedExample.bb
+

+Try the following example for reference, note that it only has data on chromosome 21: +

http://genome.ucsc.edu/cgi-bin/hgTracks?db=hg38&hgct_customText=track%20type=bigBed%20bigDataUrl=https://genome.ucsc.edu/goldenPath/help/examples/bigBedExample.bb
+

+ + +

Load a Track Hub with a URL

+

Similar to Custom Tracks, track hubs can be loaded into the URL usig the hubURL= +parameter. This parameter takes input similar to the Track Hub interface. Try the +following example for reference:

+
http://genome.ucsc.edu/cgi-bin/hgTracks?hubUrl=https://genome.ucsc.edu/goldenPath/help/examples/hubDirectory/hub.txt&genome=hg19
+ +