Repository 'maaslin2'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/maaslin2

Changeset 2:faacef62bb54 (2024-04-29)
Previous changeset 1:ef2cace85809 (2024-03-13) Next changeset 3:43ccbef89f1d (2024-06-26)
Commit message:
planemo upload for repository https://github.com/biobakery/Maaslin2 commit c6827285ea113de141b6f4111cffe872b6e2cef3
modified:
maaslin2.xml
macros.xml
b
diff -r ef2cace85809 -r faacef62bb54 maaslin2.xml
--- a/maaslin2.xml Wed Mar 13 10:32:52 2024 +0000
+++ b/maaslin2.xml Mon Apr 29 10:33:48 2024 +0000
[
b'@@ -7,6 +7,34 @@\n     <expand macro="xrefs"/>\n     <expand macro="requirements"/>\n     <command detect_errors="exit_code"><![CDATA[\n+    \n+## get column names of fixed and random effect from the input file, since galaxy \n+## can only return indices with type="data_column" \n+## using awk so that the file is only parsed on command line execution\n+\n+#if $fixed_effects\n+#set idx = []\n+#for $i in $fixed_effects:\n+    #silent idx.append(f\'${i}\')\n+#end for\n+#set idx_for_awk = \',\'.join(idx)\n+\n+fixed_effects=`awk -v OFS=\',\' -F"\\t" \'NR == 1 { print $idx_for_awk}\' \'$input_metadata\'` &&\n+echo \'Assigned fixed effects as:\' \\$fixed_effects &&\n+#end if\n+\n+\n+#if $random_effects\n+#set idx = []\n+#for $i in $random_effects:\n+    #silent idx.append(f\'${i}\')\n+#end for\n+#set idx_for_awk = \',\'.join(idx)\n+\n+random_effects=`awk -v OFS=\',\' -F"\\t" \'NR == 1 { print $idx_for_awk}\' \'$input_metadata\'` &&\n+echo \'Assigned random effects as:\' \\$random_effects &&\n+#end if\n+\n ln -s \'$input_data\' \'input_data.tsv\'\n &&\n ln -s \'$input_metadata\' \'input_metadata.tsv\'\n@@ -31,10 +59,10 @@\n     --analysis_method \'$additional_options.analysis_method\'\n #end if\n #if $random_effects\n-    --random_effects \'$random_effects\'\n+    --random_effects \\$random_effects\n #end if\n #if $fixed_effects\n-    --fixed_effects \'$fixed_effects\'\n+    --fixed_effects \\$fixed_effects\n #end if\n #if $additional_options.correction\n     --correction \'$additional_options.correction\'\n@@ -51,19 +79,17 @@\n     \'outputFolder\'\n &&\n cd outputFolder && mkdir -p figures/ && cp *.pdf figures\n+\n     ]]></command>\n     <inputs>\n         <param name="input_data" type="data" format="tabular" label="Data (or features) file"/>\n         <param name="input_metadata" type="data" format="tabular" label="Metadata file"/>\n-        <param argument="--fixed_effects" type="select" multiple="true" optional="true" label="Interactions: Fixed effects" help="The fixed effects for the model, comma-delimited for multiple effects">\n-            <option value="diagnosis" selected="true">diagnosis</option>\n-            <option value="dysbiosisnonIBD" selected="true">dysbiosisnonIBD</option>\n-            <option value="dysbiosisUC" selected="true">dysbiosisUC</option>\n-            <option value="dysbiosisCD" selected="true">dysbiosisCD</option>\n-            <option value="antibiotics" selected="true">antibiotics</option>\n-            <option value="age" selected="true">age</option>\n-        </param>        \n-        <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"/>        \n+        <param argument="--fixed_effects" type="data_column" data_ref="input_metadata" use_header_names="true"  multiple="true" optional="true" label="Interactions: Fixed effects" help="The fixed effects for the model, comma-delimited for multiple effects, Default value: All " />\n+        \t\t\n+        <param argument="--random_effects" type="data_column" data_ref="input_metadata" use_header_names="true" multiple="true" optional="true" label="Random effects" help="The random effects for the model,  comma-delimited for multiple effects, Default: None" />\n+        \t\n+       \n+        \t\n         <section name="additional_options" title="Additional Options" expanded="true">\n             <param argument="--min_abundance" type="float" value="0.0" optional="true" label="Minimum abundance" help="The minimum abundance for each feature"/>\n             <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"/>\n@@ -87,7 +113,11 @@\n                 <option value="NEGBIN">NEGBIN</option>\n                 <option value="ZINB">ZINB</option>\n             </param>\n-            <param argument="--correction" type="text" value="BH" optional="true" label="Correction" help="The correction method for computing  the q-value"/>'..b'param name="residuals_output" value="true"/>\n+            </section>\n+            <output name="all_results">\n+                <assert_contents>\n+                    <has_text text="feature"/>\n+                    <has_n_lines n="8092"/>\n+                    <has_n_columns n="9"/>\n+                </assert_contents>\n+            </output>\n+            <output name="significant_results">\n+                <assert_contents>\n+                    <has_text text="subject"/>\n+                    <has_n_lines n="216" delta="5"/>\n+                    <has_n_columns n="9"/>\n+                </assert_contents>\n+            </output>\n+            <output name="residuals">\n+                <assert_contents>\n+                    <has_size value="671142" delta="1000"/>\n+                </assert_contents>\n+            </output>\n+            <output_collection name="figures_pdfs" type="list">\n+                <element name="heatmap.pdf" ftype="pdf">\n+                    <assert_contents>\n+                        <has_size value="7000" delta="1000" />\n+                    </assert_contents>\n+                </element>                                                              \n+            </output_collection>\n+        </test> \n+        <test expect_num_outputs="5">\n+            <param name="input_data" value="HMP2_taxonomy.tsv"/>\n+            <param name="input_metadata" value="HMP2_metadata.tsv"/>\n+           \n+            <section name="additional_options">\n+                <param name="min_abundance" value="0.0"/>\n+                <param name="min_prevalence" value="0.1"/>\n+                <param name="max_significance" value="0.25"/>\n+                <param name="normalization" value="TSS"/>\n+                <param name="transform" value="LOG"/>\n+                <param name="analysis_method" value="LM"/>\n+                <param name="correction" value="BH"/>\n+                <param name="standardize" value="True"/>\n+            </section>\n+            <section name="output">\n+                <param name="plot_heatmap" value="true"/>\n+                <param name="heatmap_first_n" value="50"/>\n+                <param name="plot_scatter" value="true"/>\n+                <param name="residuals_output" value="true"/>\n+            </section>\n+            <output name="all_results">\n+                <assert_contents>\n+                    <has_text text="feature"/>\n+                    <has_n_lines n="8092"/>\n+                    <has_n_columns n="9"/>\n+                </assert_contents>\n+            </output>\n+            <output name="significant_results">\n+                <assert_contents>\n+                    <has_text text="subject"/>\n+                    <has_n_lines n="880"/>\n+                    <has_n_columns n="9"/>\n+                </assert_contents>\n+            </output>\n+            <output name="residuals">\n+                <assert_contents>\n+                    <has_size value="670759" delta="1000"/>\n+                </assert_contents>\n+            </output>\n+            <output_collection name="figures_pdfs" type="list">\n+                <element name="heatmap.pdf" ftype="pdf">\n+                    <assert_contents>\n+                        <has_size value="7900" delta="1000" />\n+                    </assert_contents>\n+                </element>                                                              \n+            </output_collection>\n+        </test> \n     </tests>\n     <help><![CDATA[\n @HELP_HEADER@\n@@ -347,6 +471,9 @@\n         - It only includes associations with q-values <= to the threshold.\n     - Data frame with residuals for each feature (R data file)\n         - This file contains a data frame with residuals for each feature.\n+        \n+Correction methods to compute the q-value : https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/p.adjust\n+\n 2- Visualization output files\n     - Heatmap of the significant associations (PDF file)\n         - This file contains a heatmap of the significant associations.\n'
b
diff -r ef2cace85809 -r faacef62bb54 macros.xml
--- a/macros.xml Wed Mar 13 10:32:52 2024 +0000
+++ b/macros.xml Mon Apr 29 10:33:48 2024 +0000
b
@@ -21,4 +21,4 @@
             <yield/>
         </requirements>
     </xml>
- </macros>
\ No newline at end of file
+ </macros>