[Gmod-ajax] Accessing jBrowse shareURL query string

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

[Gmod-ajax] Accessing jBrowse shareURL query string

Tomaz Berisa
Hi,

In order to construct a custom shareURL (config file parameter in jbrowse.conf or jbrowse_conf.json) it would be great to have access to the default query string (constructed by jBrowse) that would be placed in the shareURL.

Does anyone know how to access the default query string generated by jBrowse for the shareURL? I.e., how to access it from a function defined in the config file:
{
  "shareURL" : "function() { access.default.query.string(); }"
}

Thanks,
Tomaz


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: Accessing jBrowse shareURL query string

Colin
Hi,

A shareURL callback function can look like

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

Notes:
- the makeCurrentViewURL function in Browser.js shows how this function is performed normally.
- in the case, you may also want to edit the config "updateBrowserURL: false" which is inside of index.html

put together, this custom shareURL can allow you to link to a page with an embedded jbrowse for example

-Colin


On Wed, Jun 11, 2014 at 10:51 AM, Tomaz Berisa <[hidden email]> wrote:
Hi,

In order to construct a custom shareURL (config file parameter in jbrowse.conf or jbrowse_conf.json) it would be great to have access to the default query string (constructed by jBrowse) that would be placed in the shareURL.

Does anyone know how to access the default query string generated by jBrowse for the shareURL? I.e., how to access it from a function defined in the config file:
{
  "shareURL" : "function() { access.default.query.string(); }"
}

Thanks,
Tomaz


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax



------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: Accessing jBrowse shareURL query string

Tomaz Berisa
Yes, I can confirm this works.

Also, setting "updateBrowserURL: false" was mandatory in order for it to work.

Thanks Colin!

Tomaz

On Saturday, June 14, 2014, Colin <[hidden email]> wrote:
Hi,

A shareURL callback function can look like

shareURL=function(browser){
    return '<a href="http://myinstance.com/?loc=&#39;+browser.view.visibleRegionLocString()+&#39;&amp;tracks=&#39;+(browser.view.visibleTrackNames().join(" target="_blank">http://myinstance.com/?loc='+browser.view.visibleRegionLocString()+'&tracks='+(browser.view.visibleTrackNames().join(','))+'&highlight='+((browser.getHighlight()||'').toString());
  }

Notes:
- the makeCurrentViewURL function in Browser.js shows how this function is performed normally.
- in the case, you may also want to edit the config "updateBrowserURL: false" which is inside of index.html

put together, this custom shareURL can allow you to link to a page with an embedded jbrowse for example

-Colin


On Wed, Jun 11, 2014 at 10:51 AM, Tomaz Berisa <<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;tomaz.berisa@gmail.com&#39;);" target="_blank">tomaz.berisa@...> wrote:
Hi,

In order to construct a custom shareURL (config file parameter in jbrowse.conf or jbrowse_conf.json) it would be great to have access to the default query string (constructed by jBrowse) that would be placed in the shareURL.

Does anyone know how to access the default query string generated by jBrowse for the shareURL? I.e., how to access it from a function defined in the config file:
{
  "shareURL" : "function() { access.default.query.string(); }"
}

Thanks,
Tomaz


------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gmod-ajax mailing list
<a href="javascript:_e(%7B%7D,&#39;cvml&#39;,&#39;Gmod-ajax@lists.sourceforge.net&#39;);" target="_blank">Gmod-ajax@...
https://lists.sourceforge.net/lists/listinfo/gmod-ajax



------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax