Question: using R data structure files (rds) as input/output in galaxy tools
1
gravatar for Stef van Lieshout
4.5 years ago by
Netherlands
Stef van Lieshout10 wrote:

So I've been able to create a tool wrapper for an R script and make it work in my local Galaxy instance. Next step is to ouput an R data structure (rds) file from this tool and implement a next R script that uses this rds file as input. While the outputting (to history) seems to work, using rds again as input fails. When I try to add the second tool which contains:

<inputs>
  <param name="inputRDS" type="rds" optional="false" format="rds" label="Input RDS"/>
</inputs>

...Galaxy complains that it doesn't know the rds type. The following does work, but now the user is able to select any input data format, not just rds:

<param name="inputRDS" type="data" optional="false" format="rds" label="Input RDS" />

Since it probably has to do with adding datatypes, my question is:

How can I make sure the "rds" datatype can be used in galaxy tools? I've read the page below, but that seems rather complex to simply allow a new datatype.

https://wiki.galaxyproject.org/Admin/Datatypes/Adding%20Datatypes

galaxy datatypes R • 2.2k views
ADD COMMENTlink modified 4.5 years ago • written 4.5 years ago by Stef van Lieshout10
2

I came across this in my search for existing R Data types. There should be an RData type in the nextish release of galaxy. https://github.com/galaxyproject/galaxy/pull/239

ADD REPLYlink written 3.6 years ago by rasche.eric40
1
gravatar for Bjoern Gruening
4.5 years ago by
Bjoern Gruening5.1k
Germany
Bjoern Gruening5.1k wrote:

Hi Stef,

you are correct, if you intent to create a Tool Shed repository you will need to create Galaxy data type and if you want to make it outstanding special features like sniffing should be integrated. Nevertheless, adding data types is easy. You can add the following line to the datatypes_conf.xml file in your Galaxy root:

<datatype extension="rds" type="galaxy.datatypes.binary:Binary" mimetype="application/octet-stream" subclass="True" display_in_upload="true"  />

After a restart you can go with your second solution:

<param name="inputRDS" type="data" optional="false" format="rds" label="Input RDS" />

and it should work. The first solution will not work, because type="" refers to the display type of the Galaxy element. For example "select", "data", "text" ...

Cheers,

Bjoern

ADD COMMENTlink modified 4.5 years ago • written 4.5 years ago by Bjoern Gruening5.1k
0
gravatar for Stef van Lieshout
4.5 years ago by
Netherlands
Stef van Lieshout10 wrote:

Hi Bjoern,

I tried adding the datatype to datatypes_conf.xml but was missing "type", "minetype" and "subclass", which were apparently required... With your suggestion it works perfectly, many thanks!

ADD COMMENTlink written 4.5 years ago by Stef van Lieshout10

No problem, please close that thread or mark the question as solved.

Have fun with Galaxy!

Bjoern

ADD REPLYlink written 4.5 years ago by Bjoern Gruening5.1k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 171 users visited in the last hour