Skip to content

Commit

Permalink
fix column name input
Browse files Browse the repository at this point in the history
  • Loading branch information
paulzierep committed Apr 16, 2024
1 parent ea393cd commit 0024dfd
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions tools/maaslin2/maaslin2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,28 @@
<expand macro="xrefs"/>
<expand macro="requirements"/>
<command detect_errors="exit_code"><![CDATA[
## get column names of fixed and random effect from the input file, since galaxy
## can only return indices with type="data_column"
## get header
#set $input = open(str($input_metadata), 'r')
#set $header = $input.readlines()[0].split('\t')
## get fixed effects
#set $fixed_effects_val = []
#for $i in $fixed_effects:
#silent $fixed_effects_val.append($header[int($i)])
#end for
#set $fixed_effects = ','.join($fixed_effects_val)
## get random effects
#set $random_effects_val = []
#for $i in $random_effects:
#silent $random_effects_val.append($header[int($i)])
#end for
#set $random_effects = ','.join($random_effects_val)
ln -s '$input_data' 'input_data.tsv'
&&
ln -s '$input_metadata' 'input_metadata.tsv'
Expand Down Expand Up @@ -53,17 +75,12 @@ Maaslin2.R
cd outputFolder && mkdir -p figures/ && cp *.pdf figures
]]></command>
<inputs>
<param name="input_data" type="data" format="tabular" label="Data (or features) file"/>
<param name="input_data" type="data" format="tsv" label="Data (or features) file"/>
<param name="input_metadata" type="data" format="tabular" label="Metadata file"/>
<param argument="--fixed_effects" type="text" multiple="true" optional="true" label="Interactions: Fixed effects" help="The fixed effects for the model, comma-delimited for multiple effects">
<option value="diagnosis" selected="true">diagnosis</option>
<option value="dysbiosisnonIBD" selected="true">dysbiosisnonIBD</option>
<option value="dysbiosisUC" selected="true">dysbiosisUC</option>
<option value="dysbiosisCD" selected="true">dysbiosisCD</option>
<option value="antibiotics" selected="true">antibiotics</option>
<option value="age" selected="true">age</option>
</param>
<param argument="--random_effects" type="text" multiple="true" optional="true" label="Random effects" help="The random effects for the model, comma-delimited for multiple effects"/>

<param argument="--fixed_effects" type="data_column" data_ref="input_metadata" use_header_names="true" multiple="true" optional="true" numerical="false" label="Interactions: Fixed effects" help="The fixed effects for the model, comma-delimited for multiple effects" />
<param argument="--random_effects" type="data_column" data_ref="input_metadata" use_header_names="true" multiple="true" optional="true" numerical="false" label="Random effects" help="The random effects for the model, comma-delimited for multiple effects" />

<section name="additional_options" title="Additional Options" expanded="true">
<param argument="--min_abundance" type="float" value="0.0" optional="true" label="Minimum abundance" help="The minimum abundance for each feature"/>
<param argument="--min_prevalence" type="float" value="0.1" optional="true" label="Minimum prevalence" help="The minimum percent of samples for which a feature is detected at minimum abundance"/>
Expand Down

0 comments on commit 0024dfd

Please sign in to comment.