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:
Take the chromosome position as input
Display the alignment chart based on some pre-specified switch/track (e.g. turn on the UCSC track,
tRNA track, conservation track etc)
Also allow the zooming or navigation button for the figures just like the original GB.
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?
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.
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.
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.
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.
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?
Agreed; what you describe is what the UCSC browser does already...why the need to embed?