[Gmod-ajax] shareUrl configuration

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Gmod-ajax] shareUrl configuration

Emily Greenfest-Allen
Hi-

Can anyone provide an example of how to specify the shareUrl option in a jbrowse.conf file?  Is there a certain section (e.g., [section] block) to which it must be assigned?  Can a string value be specified for the url or must a JS function be passed?

Thanks

Emily
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: shareUrl configuration

Colin
Hi Emily,
I believe that if shareURL is a plain string, then it won't include the location of the browser and other things like that. Also, shareURL is a "top level" config, so it can be under [GENERAL] in jbrowse.conf.


There was a recent thread about this topic here:
http://gmod.827538.n3.nabble.com/Gmod-ajax-Accessing-jBrowse-shareURL-query-string-td4044092.html

Unfortunately the code formatting actually got messed up on that archive site but it's supposed to look like this


shareURL=function(browser){
    return 'http://myinstance.com/?loc='+browser.view.visibleRegionLocString()+'&tracks='+(browser.view.visibleTrackNames().join(','))
+'&highlight='+((browser.getHighlight()||"").toString());
  }


Note: the last closing bracket of that function should be spaced away from the first column of the text file...weird quirk in the .conf format but it helps the file get parsed.

-Colin


On Wed, Jul 2, 2014 at 2:45 PM, Emily Greenfest-Allen <[hidden email]> wrote:
Hi-

Can anyone provide an example of how to specify the shareUrl option in a jbrowse.conf file?  Is there a certain section (e.g., [section] block) to which it must be assigned?  Can a string value be specified for the url or must a JS function be passed?

Thanks

Emily
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: shareUrl configuration

Richard Hayes
As an aside, if you have more than one dataset configured, you can include the data=<path> query string parameter by changing the return value of this function to:

    return '<a href="http://myinstance.com/?data=&#39;+browser.config.dataRoot+&#39;&amp;loc=&#39;+browser.view.visibleRegionLocString()+&#39;&amp;tracks=&#39;+(browser.view.visibleTrackNames().join(">http://myinstance.com/?data='+browser.config.dataRoot+'&loc='+browser.view.visibleRegionLocString()+'&tracks='+(browser.view.visibleTrackNames().join(',')) +'&highlight='+((browser.getHighlight()||"").toString());


Richard D. Hayes, Ph.D.
Joint Genome Institute / Lawrence Berkeley National Lab
http://phytozome.jgi.doe.gov


On Wed, Jul 2, 2014 at 1:15 PM, Colin <[hidden email]> wrote:
Hi Emily,
I believe that if shareURL is a plain string, then it won't include the location of the browser and other things like that. Also, shareURL is a "top level" config, so it can be under [GENERAL] in jbrowse.conf.


There was a recent thread about this topic here:
http://gmod.827538.n3.nabble.com/Gmod-ajax-Accessing-jBrowse-shareURL-query-string-td4044092.html

Unfortunately the code formatting actually got messed up on that archive site but it's supposed to look like this


shareURL=function(browser){
    return 'http://myinstance.com/?loc='+browser.view.visibleRegionLocString()+'&tracks='+(browser.view.visibleTrackNames().join(','))
+'&highlight='+((browser.getHighlight()||"").toString());
  }


Note: the last closing bracket of that function should be spaced away from the first column of the text file...weird quirk in the .conf format but it helps the file get parsed.

-Colin


On Wed, Jul 2, 2014 at 2:45 PM, Emily Greenfest-Allen <[hidden email]> wrote:
Hi-

Can anyone provide an example of how to specify the shareUrl option in a jbrowse.conf file?  Is there a certain section (e.g., [section] block) to which it must be assigned?  Can a string value be specified for the url or must a JS function be passed?

Thanks

Emily
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax


------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax



------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax