From: Ian H. <ih...@be...> - 2009-08-18 17:25:06
|
Hi Andrew, > Is there an easy way to deep link to a specific view in JBrowse? For > example, on your hg19 jbrowse demo, is there a way to link to exactly > this view (genomic position and selection of tracks)? > > I was hoping for something like > http://www.jbrowse.org/ucsc/hg19/?coordinates=chr1:119777910-120173410&track=RefSeqGenes&track=CpGIslands&track=ORFeomeClones. > Possible? Currently the way to do this is via the Javascript API. If you look at the source for the hg19 demo, you'll see a <script> block like this: <script type="text/javascript"> /* <![CDATA[ */ var b = new Browser({ containerID: "GenomeBrowser", refSeqs: refSeqs, trackData: trackInfo }); b.showTracks("DNA,gene,mRNA,noncodingRNA"); /* ]]> */ </script> The two relevant methods of the Browser object are showTracks and navigateTo. (Note that this example already has a call to showTracks, but not navigateTo.) You probably want something like this after the call to the Browser constructor: b.showTracks("RefSeqGenes,CpGIslands,ORFeomeClones"); b.navigateTo("chr1:119777910..120173410"); You can also pass these strings into the Browser constructor as defaults (see the Javascript code for documentation of this). Although it isn't too hard to extract these strings from the URL (as in your permalinking example), we have avoided having the Browser object look directly at the URL, as it would be bad for embedding (one cannot know ahead of time which CGI parameters are used by the embedding application, and there is a possibility of a namespace clash). Therefore, we currently leave this to the user to set up. We could use a tutorial explaining this. For an example of both kinds of deep-linking, see the TWiki plugin, which allows deep-linking to specific features via the URL *or* a TWiki shortcut syntax. Best wishes, Ian |
From: Mitch S. <mit...@be...> - 2009-08-18 18:01:37
|
On 08/18/2009 10:24 AM, Ian Holmes wrote: >> I was hoping for something like >> http://www.jbrowse.org/ucsc/hg19/?coordinates=chr1:119777910-120173410&track=RefSeqGenes&track=CpGIslands&track=ORFeomeClones. >> Possible? >> > Currently the way to do this is via the Javascript API. > No, this is currently implemented in index.html (take a look at index.html to see how it works). Andrew's "coordinates" is implemented as "loc", which can be anything that you can put in the location box (e.g., chrom:start..end, or a specific feature name/id if the feature name/id is in a track that has "autocomplete" set). And there's also a "tracks" query parameter, which gets a comma-separated list of track identifiers. e.g., http://jbrowse.org/ucsc/hg19/?loc=chr1:100417735..100505485&tracks=refseq_genes,human_mrnas Implementing a nice way for users to generate those URLs is still a to-do, though. Actually, it's a bit harder since we made this the responsibility of the embedder. But I have an idea for how to do it. Mitch |
From: Ian H. <ih...@be...> - 2009-08-18 18:02:56
|
Just to clarify, this is not currently in the demo index.html page, but is in the JBrowse distribution (I was looking at the wrong file) Mitch Skinner wrote: > On 08/18/2009 10:24 AM, Ian Holmes wrote: >>> I was hoping for something like >>> http://www.jbrowse.org/ucsc/hg19/?coordinates=chr1:119777910-120173410&track=RefSeqGenes&track=CpGIslands&track=ORFeomeClones. >>> Possible? >>> >> Currently the way to do this is via the Javascript API. >> > > No, this is currently implemented in index.html (take a look at > index.html to see how it works). Andrew's "coordinates" is implemented > as "loc", which can be anything that you can put in the location box > (e.g., chrom:start..end, or a specific feature name/id if the feature > name/id is in a track that has "autocomplete" set). And there's also a > "tracks" query parameter, which gets a comma-separated list of track > identifiers. > > e.g., > http://jbrowse.org/ucsc/hg19/?loc=chr1:100417735..100505485&tracks=refseq_genes,human_mrnas > > Implementing a nice way for users to generate those URLs is still a > to-do, though. Actually, it's a bit harder since we made this the > responsibility of the embedder. But I have an idea for how to do it. > > Mitch > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Gmod-ajax mailing list > Gmo...@li... > https://lists.sourceforge.net/lists/listinfo/gmod-ajax |
From: Mitch S. <mit...@be...> - 2009-08-18 18:31:11
|
On 08/18/2009 11:09 AM, Ian Holmes wrote: > Since the "embedder" in this case is the index.html file, which > extracts the parameters from the URL, presumably the natural way to do > this is to add a "Bookmark" link to the index.html file, that extracts > the 'loc' and 'tracks' params using the Browser's visibleTracks and > visibleRegion method? Certainly, that's one natural way to do it. But currently, the JBrowse-controlled HTML element takes up the whole viewport. So there's currently no place for the index.html file to put a "bookmark" link. I like it that way because it means that as much space as possible is dedicated to the actual genomic features, which I think is the right priority. If, say, we added a bookmark link above the JBrowse-controlled HTML element and made that HTML element smaller, then there would be a significant amount of wasted space at the top of the viewport (a big blank region to the side of the bookmark link). Plus, if the bookmarking user experience is the same in multiple embedders (say, click on a bookmark link, get a URL), then I think the UI should be the same regardless of embedder. All of which is to say: I think JBrowse (the embed-ee) should implement the UI. We could stick a button with a chain-link icon somewhere in the area where the navigation buttons (and the big trapezoid) are, say. And the embedder could pass a bookmark callback in to the Browser constructor that would take a Browser object as an argument and return a URL string (using the visibleTracks and visibleRegion methods). Then the embed-ee could take that callback and use it when the icon is clicked. We could also omit the icon if there was no bookmark callback passed in. Mitch |
From: Mitch S. <mit...@be...> - 2009-08-19 05:17:04
|
Mitch Skinner wrote: > All of which is to say: I think JBrowse (the embed-ee) should implement > the UI. We could stick a button with a chain-link icon somewhere in the > area where the navigation buttons (and the big trapezoid) are, say. And > the embedder could pass a bookmark callback in to the Browser > constructor that would take a Browser object as an argument and return a > URL string (using the visibleTracks and visibleRegion methods). Then > the embed-ee could take that callback and use it when the icon is > clicked. We could also omit the icon if there was no bookmark callback > passed in. > Okay, this is now implemented and pushed to the github master branch, and the dmel and human hg19 demos are updated. Mitch |
From: Ian H. <ih...@be...> - 2009-08-18 18:06:29
|
Mitch Skinner wrote: > No, this is currently implemented in index.html (take a look at > index.html to see how it works). Andrew's "coordinates" is implemented > as "loc", which can be anything that you can put in the location box > (e.g., chrom:start..end, or a specific feature name/id if the feature > name/id is in a track that has "autocomplete" set). And there's also a > "tracks" query parameter, which gets a comma-separated list of track > identifiers. > > e.g., > http://jbrowse.org/ucsc/hg19/?loc=chr1:100417735..100505485&tracks=refseq_genes,human_mrnas So, to be clear: the above URL works, but it does NOT work in the same way that the index.html file in the distribution works. (So, looking at jbrowse.org/ucsc/hg19/index.html will not actually be much use.) We need to update the demo. |
From: Ian H. <ih...@be...> - 2009-08-18 18:09:45
|
Mitch Skinner wrote: > Implementing a nice way for users to generate those URLs is still a > to-do, though. Actually, it's a bit harder since we made this the > responsibility of the embedder. But I have an idea for how to do it. Since the "embedder" in this case is the index.html file, which extracts the parameters from the URL, presumably the natural way to do this is to add a "Bookmark" link to the index.html file, that extracts the 'loc' and 'tracks' params using the Browser's visibleTracks and visibleRegion method? At least, that's how I thought we were going to do it... |
From: Mitch S. <mit...@be...> - 2009-08-18 18:13:59
|
On 08/18/2009 11:06 AM, Ian Holmes wrote: > So, to be clear: the above URL works, but it does NOT work in the same > way that the index.html file in the distribution works. (So, looking > at jbrowse.org/ucsc/hg19/index.html will not actually be much use.) We > need to update the demo. > Oops, right, I'll update the demos. Mitch |
From: Andrew S. <as...@gn...> - 2009-08-18 19:51:18
|
Fantastic, thanks guys... I see now how that's set up from the github version of index.html. Is it okay to link to your demo version of hg19 (as a plugin from http://biogps.gnf.org)? If you'd rather we not, that's fine, we'll work on getting our own instance set up. Cheers, -andrew > -----Original Message----- > From: Mitch Skinner [mailto:mit...@be...] > Sent: Tuesday, August 18, 2009 11:14 AM > To: Ian Holmes > Cc: Andrew Su; gmo...@li... > Subject: Re: [Gmod-ajax] jbrowse deep linking > > On 08/18/2009 11:06 AM, Ian Holmes wrote: > > So, to be clear: the above URL works, but it does NOT work in the > same > > way that the index.html file in the distribution works. (So, looking > > at jbrowse.org/ucsc/hg19/index.html will not actually be much use.) > We > > need to update the demo. > > > > Oops, right, I'll update the demos. > > Mitch |
From: Ian H. <ih...@be...> - 2009-08-18 19:37:01
|
Absolutely! -Ian (via phone; please excuse brevity/typos) On Aug 18, 2009, at 12:32 PM, "Andrew Su" <as...@gn...> wrote: > Fantastic, thanks guys... I see now how that's set up from the github > version of index.html. > > Is it okay to link to your demo version of hg19 (as a plugin from > http://biogps.gnf.org)? If you'd rather we not, that's fine, we'll > work > on getting our own instance set up. > > Cheers, > -andrew > >> -----Original Message----- >> From: Mitch Skinner [mailto:mit...@be...] >> Sent: Tuesday, August 18, 2009 11:14 AM >> To: Ian Holmes >> Cc: Andrew Su; gmo...@li... >> Subject: Re: [Gmod-ajax] jbrowse deep linking >> >> On 08/18/2009 11:06 AM, Ian Holmes wrote: >>> So, to be clear: the above URL works, but it does NOT work in the >> same >>> way that the index.html file in the distribution works. (So, looking >>> at jbrowse.org/ucsc/hg19/index.html will not actually be much use.) >> We >>> need to update the demo. >>> >> >> Oops, right, I'll update the demos. >> >> Mitch |
From: Andrew S. <as...@gn...> - 2009-08-19 01:10:36
|
Bummer, it looks like BioGPS is a bit behind -- lagging on hg18. Once we do our next data update, we'll add a link to the jbrowse demo... Cheers, -andrew > -----Original Message----- > From: Ian Holmes [mailto:ih...@be...] > Sent: Tuesday, August 18, 2009 12:37 PM > To: Andrew Su > Cc: Mitch Skinner; <gmo...@li...> > Subject: Re: [Gmod-ajax] jbrowse deep linking > > Absolutely! > > -Ian (via phone; please excuse brevity/typos) > > On Aug 18, 2009, at 12:32 PM, "Andrew Su" <as...@gn...> wrote: > > > Fantastic, thanks guys... I see now how that's set up from the > github > > version of index.html. > > > > Is it okay to link to your demo version of hg19 (as a plugin from > > http://biogps.gnf.org)? If you'd rather we not, that's fine, we'll > > work > > on getting our own instance set up. > > > > Cheers, > > -andrew > > > >> -----Original Message----- > >> From: Mitch Skinner [mailto:mit...@be...] > >> Sent: Tuesday, August 18, 2009 11:14 AM > >> To: Ian Holmes > >> Cc: Andrew Su; gmo...@li... > >> Subject: Re: [Gmod-ajax] jbrowse deep linking > >> > >> On 08/18/2009 11:06 AM, Ian Holmes wrote: > >>> So, to be clear: the above URL works, but it does NOT work in the > >> same > >>> way that the index.html file in the distribution works. (So, > looking > >>> at jbrowse.org/ucsc/hg19/index.html will not actually be much use.) > >> We > >>> need to update the demo. > >>> > >> > >> Oops, right, I'll update the demos. > >> > >> Mitch |