Reads a paired collection, produces three single lists

I run a small private Galaxy 18.04 server. Now, I’m trying to install a self-developed tool, which reads a paired collection and produces three single collections. That is, every pair of input datasets will generate three datasets on the output.

What should be an xml definition for this case?

Thanks for helping this newbie Galaxy user! :slightly_smiling_face:

======
This is my present xml file

<tool id=“urgel_1” name=“URGEL 1 Cutoff” version=“0.1.0”>

<description>to consider genes as up-regulated, from a list of differential expression values</description>

<command>
<![CDATA[perl $__tool_directory__/URGEL1.pl
#if $unicolista.choice == ‘Par Único’:
‘$tumoral’ ‘$controle’
#else:
‘$tumconlist.forward’ ‘$tumconlist.reverse’
#end if
]]>
</command>

<inputs>
<conditional name=“unicolista”>
<param name=“choice” type=“select” label=“Select Par Único or Lista de Pares” >
<option value=“single_pair”>Par Único
<option value=“paired_coll”>Lista de Pares
</param>
<when value=“single_pair”>
<param name=“tumoral” type=“data” format=“txt” label=“Tumoral data file” />
<param name=“controle” type=“data” format=“txt” label=“Control data file” />
</when>
<when value=“paired_coll”>
<param name=“tumconlist” type=“data_collection” collection_type=“paired” format=“txt”
label=“Tumoral x Control pair list” />
</when>
</conditional>
</inputs>

<outputs>
<collection name=“thrsh” type=“list” label=“thr {tooln.name} on {on_string}” >
<discover_datasets pattern="" directory=“thr” visible=“true” />
</collection>
<collection name=“diffx” type=“list” label=“dif {tooln.name} on {on_string}” >
<discover_datasets pattern="
" directory=“dif” visible=“true” />
</collection>
<collection name=“upreg” type=“list” label=“upr {tooln.name} on {on_string}” >
<discover_datasets pattern="*" directory=“upr” visible=“true” />
</collection>
<data format=“txt” name=“arqLog” label=“URGEL1 Log” />
</outputs>

<help>
Original: UpRegulatedGeneExtractorList.pl

This tool calculates the expression cutoff to consider genes as up-regulated, from a list of genes
with corresponding differential expression values.
</help>

</tool>

======

Actually, the tool generates FOUR empty lists (one for the log file, which was intended to be a single file).

1 Like

After digging the documentation (Galaxy Tool XML File), I was happy to find the solution by myself. My XML file now looks like this:

====
<tool id=“toolid” name=“toolname” version=“0.1.0”>
<description>Description…</description>

<command>
<![CDATA[perl $__tool_directory__/tool.pl
$input.forward
$input.reverse
$output.outcoll1
$output.outcoll2
$output.outcoll3
]]>
</command>

<inputs>
<param name=“input” type=“data_collection” collection_type=“paired” format=“txt”
label=“Paired Collection”
</inputs>

<outputs>
<collection name=“output” type=“list” label="(tool_name) on {on_string}" >
<data name=“outcoll1” format=“txt” />
<data name=“outcoll2” format=“txt” />
<data name=“outcoll3” format=“txt” />
</collection>
</outputs>
</tool>
====

This way, my output is what Galaxy calls an embedded list, or a list of lists.

The tool now works as intended.

1 Like