How To Embed Ucsc Genome Browser To Web Page
1
0
Entering edit mode
10.8 years ago
gundalav ▴ 380

I have a web application which generate list of chromosomal position in human genome. Is there a way I can embed UCSC genome browser such that it does the following:

  1. Take the chromosome position as input
  2. Display the alignment chart based on some pre-specified switch/track (e.g. turn on the UCSC track,
    tRNA track, conservation track etc)
  3. Also allow the zooming or navigation button for the figures just like the original GB.
ucsc browser genomics web • 5.3k views
ADD COMMENT
2
Entering edit mode

This is really more of a web development question, rather than a bioinformatics question. Back in the day, one might have used frames for this (http://www.w3schools.com/tags/tag_frame.asp), but that's sort of old-school and is deprecated in html5. You're going to have to use some dynamic programming for web development, and for more details stackexchange should be helpful. Basically, you seem to want your app to do what UCSC genome browser already does -- why not just take user input and feed that directly to genome browser that opens in a new tab?

ADD REPLY
0
Entering edit mode

Agreed; what you describe is what the UCSC browser does already...why the need to embed?

ADD REPLY
1
Entering edit mode
10.8 years ago
Michael 54k

One aspect is certainly web-development as mentioned in Alex' comment. However, the other aspect is how to 'remote-control' the application. This is certainly easiest if the application has a Restful interface, such that all control information can be sent via the URL. I didn't find documentation for that (I didn't search thoroughly either), but it is relatively easy to reverse-engineer.

http://genome.ucsc.edu/cgi-bin/hgTracks?hgHubConnect.destUrl=..%2Fcgi-bin%2FhgTracks&clade=mammal&org=Human&db=hg19&position=chr22%3A1-48%2C129%2C895&hgt.positionInput=enter+position%2C+gene+symbol+or+search+terms&hgt.suggestTrack=knownGene&Submit=submit&pix=1265

Such URLs also contain a &hgsid=34567890 session identifier, but they seem to work after removing it as well.

This looks like a general purpose control URL, with easy to spot parameters (use URL encoding). Certainly the stability of such URLs might be an issue, especially if undocumented. It might be cleaner to install your own genome browser, e.g GBrowse in case you are afraid of the mechanism changing.

Btw: here is the documentation you might be looking for.

ADD COMMENT
0
Entering edit mode

one little note: if you intend to embed the UCSC browser in a frame, it would be polite to contact the UCSC mailing list (http://genome.ucsc.edu/contacts.html ) and ask them for permission.

ADD REPLY
0
Entering edit mode

You are right, embedding somebody's content (e.g. via iframe) and let it appear as your own isn't very nice. But I think for opening in a new browser window or tab, that should be ok, because it is described in the FAQ.

ADD REPLY

Login before adding your answer.

Traffic: 1990 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6