mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Enhanced grouping tool to use columnlist tool parameter.
This commit is contained in:
+13
-18
@@ -11,22 +11,18 @@
|
||||
#end for
|
||||
</command>
|
||||
<inputs>
|
||||
<page>
|
||||
<param format="tabular" name="input1" type="data" label="Select data" help="Query missing? See TIP below."/>
|
||||
</page>
|
||||
<page>
|
||||
<param name="groupcol" label="Group by column" type="select" dynamic_options="get_columns( input1 )" />
|
||||
<repeat name="operations" title="Operation">
|
||||
<param name="optype" type="select" label="Type">
|
||||
<option value="mean">Mean</option>
|
||||
<option value="max">Maximum</option>
|
||||
<option value="min">Minimum</option>
|
||||
<option value="sum">Sum</option>
|
||||
<option value="c">Concatenate</option>
|
||||
</param>
|
||||
<param name="opcol" label="On column" type="select" dynamic_options="get_columns( input1 )" />
|
||||
</repeat>
|
||||
</page>
|
||||
<param format="tabular" name="input1" type="data" label="Select data" refresh_on_change="True" help="Query missing? See TIP below."/>
|
||||
<param name="groupcol" label="Group by column" type="columnlist" assoc_dataset="input1" />
|
||||
<repeat name="operations" title="Operation">
|
||||
<param name="optype" type="select" label="Type">
|
||||
<option value="mean">Mean</option>
|
||||
<option value="max">Maximum</option>
|
||||
<option value="min">Minimum</option>
|
||||
<option value="sum">Sum</option>
|
||||
<option value="c">Concatenate</option>
|
||||
</param>
|
||||
<param name="opcol" label="On numerical column" type="columnlist" assoc_dataset="input1" />
|
||||
</repeat>
|
||||
</inputs>
|
||||
<outputs>
|
||||
<data format="input" name="out_file1" metadata_source="input1" />
|
||||
@@ -82,6 +78,5 @@ This tool allows you to group the input dataset by a particular column and perfo
|
||||
|
||||
chr10 1700.00 ['NM_11', 'NM_10']
|
||||
chr22 1533.33 ['NM_17', 'NM_19', 'NM_18']
|
||||
</help>
|
||||
<code file="grouping_code.py" />
|
||||
</help>
|
||||
</tool>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
|
||||
def get_columns( input1 ):
|
||||
columns = []
|
||||
|
||||
for col in range(1, input1.metadata.columns+1):
|
||||
option = "c" + str(col)
|
||||
columns.append((option,str(col),False))
|
||||
return columns
|
||||
Reference in New Issue
Block a user