Retrieving json files

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

Retrieving json files

saketkc
Is there a way to retrieve fileX.json in history using  the DataProviders?

Using https://wiki.galaxyproject.org/DataProviders I tried "base" and
"line", but I am looking for retrieving the contents of fileX.json as
a json object itself.


Saket
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
Reply | Threaded
Open this post in threaded view
|

Re: Retrieving json files

Carl Eberhard
Hi, Saket

There's currently no json dataprovider.

It's still relatively easy to get a JSON object, though. I'd recommend:
  1. Using the 'line' dataprovider
  2. Then, joining the strings returned from it (generally, you want all the strings so be careful using the regex, limit, or offset parameters)
  3. Finally, parsing the joined text as JSON (in python: json.loads( your_string ), in javascript: JSON.parse( yourString ))

Let me know if that doesn't work,
Carl



On Mon, Sep 1, 2014 at 2:25 AM, Saket Choudhary <[hidden email]> wrote:
Is there a way to retrieve fileX.json in history using  the DataProviders?

Using https://wiki.galaxyproject.org/DataProviders I tried "base" and
"line", but I am looking for retrieving the contents of fileX.json as
a json object itself.


Saket
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/


___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/
Reply | Threaded
Open this post in threaded view
|

Re: Retrieving json files

saketkc
Thanks Carl,

I am using a slightly modified version with "base":
https://github.com/saketkc/galaxy_tools/blob/master/visualisation_plugins/inchlib/templates/inchlib.mako#L31

Saket

On 2 September 2014 06:09, Carl Eberhard <[hidden email]> wrote:

> Hi, Saket
>
> There's currently no json dataprovider.
>
> It's still relatively easy to get a JSON object, though. I'd recommend:
>
> Using the 'line' dataprovider
> Then, joining the strings returned from it (generally, you want all the
> strings so be careful using the regex, limit, or offset parameters)
> Finally, parsing the joined text as JSON (in python: json.loads( your_string
> ), in javascript: JSON.parse( yourString ))
>
>
> Let me know if that doesn't work,
> Carl
>
>
>
> On Mon, Sep 1, 2014 at 2:25 AM, Saket Choudhary <[hidden email]> wrote:
>>
>> Is there a way to retrieve fileX.json in history using  the DataProviders?
>>
>> Using https://wiki.galaxyproject.org/DataProviders I tried "base" and
>> "line", but I am looking for retrieving the contents of fileX.json as
>> a json object itself.
>>
>>
>> Saket
>> ___________________________________________________________
>> Please keep all replies on the list by using "reply all"
>> in your mail client.  To manage your subscriptions to this
>> and other Galaxy lists, please use the interface at:
>>   http://lists.bx.psu.edu/
>>
>> To search Galaxy mailing lists use the unified search at:
>>   http://galaxyproject.org/search/mailinglists/
>
>
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  http://lists.bx.psu.edu/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/