changeset 3:43ccbef89f1d draft

planemo upload for repository https://github.com/biobakery/Maaslin2 commit 62a738f626aee9c8e1f1c5cbd63a59b3390d4ed5
author iuc
date Wed, 26 Jun 2024 09:40:13 +0000
parents faacef62bb54
children f4580402a2a2
files maaslin2.xml macros.xml
diffstat 2 files changed, 70 insertions(+), 84 deletions(-) [+]
line wrap: on
line diff
--- a/maaslin2.xml	Mon Apr 29 10:33:48 2024 +0000
+++ b/maaslin2.xml	Wed Jun 26 09:40:13 2024 +0000
@@ -64,6 +64,10 @@
 #if $fixed_effects
     --fixed_effects \$fixed_effects
 #end if
+#if $reference
+    --reference '$reference'
+#end if
+    
 #if $additional_options.correction
     --correction '$additional_options.correction'
 #end if
@@ -73,23 +77,24 @@
     --heatmap_first_n '$output.heatmap_first_n'
 #end if
     $output.plot_scatter
-    --cores \${GALAXY_SLOTS:-4}
+    --cores 1
     'input_data.tsv'
     'input_metadata.tsv'
     'outputFolder'
 &&
-cd outputFolder && mkdir -p figures/ && cp *.pdf figures
+zip -r out.zip outputFolder &&
+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_metadata" type="data" format="tabular" label="Metadata file"/>
         <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 " />
-        		
         <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" />
-        	
-       
-        	
+        <param argument="--reference" type="text"  label="Reference" help="Reference for a variable with more than two levels provided as a string of 'variable,reference' comma delimited for multiple variables. " />
         <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"/>
@@ -114,10 +119,13 @@
                 <option value="ZINB">ZINB</option>
             </param>
             <param argument="--correction" type="select" value="BH" optional="true" label="Correction" help="The correction method for computing  the q-value, Default: BH ">
-                
                 <option value="BH">Benjamini-Hochberg(BH)</option>
                 <option value="BY">Benjamini-Yekutieli(BY)</option>
-            </param>
+                <option value="Bonferroni">Bonferroni</option>
+                <option value="Holm">Holm</option>
+                <option value="Hochberg">Hochberg</option>
+                <option value="Hommel">Hommel</option>
+	    </param>
             <param argument="--standardize" type="boolean" truevalue="--standardize TRUE" falsevalue="--standardize FALSE" checked="true" label="Apply z-score so continuous metadata are on  the same scale"/>
         </section>          
         <section name="output" title="Set Plotting Output" expanded="true">
@@ -127,10 +135,11 @@
             <param name="residuals_output" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="true" label="Output data frame with residuals for each feature"/>    
         </section>   
    </inputs>
-   <outputs>    
+   <outputs>
+        <data name="archive_output" format="zip" from_work_dir="out.zip" label="${tool.name} on ${on_string}: zip of the complete output" />
         <data name="all_results" format="tabular" from_work_dir="outputFolder/all_results.tsv" label="All results ordered by increasing q-value"/>
         <data name="significant_results" format="tabular" from_work_dir="outputFolder/significant_results.tsv" label="Q-values smaller than or equal to the threshold"/>
-        <data name="residuals" format="rdata" from_work_dir="outputFolder/residuals.rds" label="Data frame with residuals for each feature">       
+        <data name="residuals" format="rdata" from_work_dir="outputFolder/fits/residuals.rds" label="Data frame with residuals for each feature">       
             <filter>output['residuals_output'] is True</filter>
         </data>         
         <data format="pdf" name="headmap" from_work_dir="outputFolder/figures/heatmap.pdf" label="Heatmap of the significant associations" >
@@ -142,11 +151,12 @@
         </collection>
     </outputs>
     <tests>
-        <test expect_num_outputs="5">
+        <test expect_num_outputs="6">
             <param name="input_data" value="HMP2_taxonomy.tsv"/>
             <param name="input_metadata" value="HMP2_metadata.tsv"/>
             <param name="random_effects" value= "2,5"/> 
             <param name="fixed_effects" value="4,9,10,11,6,3"/> 
+            <param name="reference" value="diagnosis,nonIBD"/>
             <section name="additional_options">
                 <param name="min_abundance" value="0.0"/>
                 <param name="min_prevalence" value="0.1"/>
@@ -163,6 +173,11 @@
                 <param name="plot_scatter" value="true"/>
                 <param name="residuals_output" value="true"/>
             </section>
+            <output name="archive_output">
+                <assert_contents>
+                    <has_size value="15005328" delta="1000000" />
+                </assert_contents>
+            </output>
             <output name="all_results">
                 <assert_contents>
                     <has_text text="feature"/>
@@ -173,13 +188,13 @@
             <output name="significant_results">
                 <assert_contents>
                     <has_text text="dysbiosisCD"/>
-                    <has_n_lines n="159"/>
+                    <has_n_lines n="159" delta="10"/>
                     <has_n_columns n="9"/>
                 </assert_contents>
             </output>
             <output name="residuals">
                 <assert_contents>
-                    <has_size value="462746" delta="1000"/>
+                    <has_size value="462386" />
                 </assert_contents>
             </output>
             <output name="headmap">
@@ -225,10 +240,11 @@
                 </element>                                                                        
             </output_collection>
         </test>
-        <test expect_num_outputs="5">
+        <test expect_num_outputs="6">
             <param name="input_data" value="HMP2_taxonomy.tsv"/>
             <param name="input_metadata" value="HMP2_metadata.tsv"/>
             <param name="fixed_effects" value="4,9"/>
+            <param name="reference" value="diagnosis,nonIBD"/>
             <section name="additional_options">
                 <param name="min_abundance" value="0.0"/>
                 <param name="min_prevalence" value="0.1"/>
@@ -245,6 +261,11 @@
                 <param name="plot_scatter" value="true"/>
                 <param name="residuals_output" value="true"/>
             </section>
+            <output name="archive_output">
+                <assert_contents>
+                    <has_size value="12630049" delta="1000000" />
+                </assert_contents>
+            </output>
             <output name="all_results">
                 <assert_contents>
                     <has_text text="feature"/>
@@ -255,13 +276,13 @@
             <output name="significant_results">
                 <assert_contents>
                     <has_text text="diagnosis"/>
-                    <has_n_lines n="175"/>
+                    <has_n_lines n="175" delta="5"/>
                     <has_n_columns n="9"/>
                 </assert_contents>
             </output>
             <output name="residuals">
                 <assert_contents>
-                    <has_size value="367224" delta="1000"/>
+                    <has_size value="366875"/>
                 </assert_contents>
             </output>
             <output_collection name="figures_pdfs" type="list">
@@ -272,10 +293,11 @@
                 </element>                                                              
             </output_collection>
         </test>
-        <test expect_num_outputs="5">
+        <test expect_num_outputs="6">
             <param name="input_data" value="HMP2_taxonomy.tsv"/>
             <param name="input_metadata" value="HMP2_metadata.tsv"/>
-            <param name="fixed_effects" value="4,9"/>
+            <param name="fixed_effects" value="2,4"/>
+            <param name="reference" value="site,Cedars-Sinai,diagnosis,UC"/>
             <section name="additional_options">
                 <param name="min_abundance" value="0.0001"/>
                 <param name="min_prevalence" value="0.1"/>
@@ -292,34 +314,39 @@
                 <param name="plot_scatter" value="true"/>
                 <param name="residuals_output" value="true"/>
             </section>
+            <output name="archive_output">
+                <assert_contents>
+                    <has_size value="18278259" delta="1000000" />
+                </assert_contents>
+            </output>
             <output name="all_results">
                 <assert_contents>
                     <has_text text="feature"/>
-                    <has_n_lines n="250"/>
+                    <has_n_lines n="415" delta="10"/>
                     <has_n_columns n="9"/>
                 </assert_contents>
             </output>
             <output name="significant_results">
                 <assert_contents>
                     <has_text text="diagnosis"/>
-                    <has_n_lines n="172"/>
+                    <has_n_lines n="300" delta="15"/>
                     <has_n_columns n="9"/>
                 </assert_contents>
             </output>
             <output name="residuals">
                 <assert_contents>
-                    <has_size value="359943" delta="1000"/>
+                    <has_size value="363118"/>
                 </assert_contents>
             </output>
             <output name="headmap">
                 <assert_contents>
-                    <has_size value="6554" delta="1000" />
+                    <has_size value="7000" delta="1000" />
                 </assert_contents>
             </output>
             <output_collection name="figures_pdfs" type="list">
                 <element name="heatmap.pdf" ftype="pdf">
                     <assert_contents>
-                        <has_size value="6554" delta="1000" />
+                        <has_size value="7693" delta="100" />
                     </assert_contents>
                 </element>
                 <element name="diagnosis.pdf" ftype="pdf">
@@ -327,17 +354,15 @@
                         <has_size value="6061545" delta="1000000" />
                     </assert_contents>
                 </element>
-                <element name="dysbiosisnonIBD.pdf" ftype="pdf">
-                    <assert_contents>
-                        <has_size value="2599373" delta="1000000" />
-                    </assert_contents>
-                </element>                                                                    
+                                                                        
             </output_collection>
-        </test>   
-        <test expect_num_outputs="5">
-            <param name="input_data" value="HMP2_taxonomy.tsv"/>
+        </test> 
+        <test expect_num_outputs="6">  
+      	<param name="input_data" value="HMP2_taxonomy.tsv"/>
             <param name="input_metadata" value="HMP2_metadata.tsv"/>
+            <param name="fixed_effects" value="7,9"/>
             <param name="random_effects" value="3" />
+          
             <section name="additional_options">
                 <param name="min_abundance" value="0.0"/>
                 <param name="min_prevalence" value="0.1"/>
@@ -354,23 +379,28 @@
                 <param name="plot_scatter" value="true"/>
                 <param name="residuals_output" value="true"/>
             </section>
+            <output name="archive_output">
+                <assert_contents>
+                    <has_size value="8567935" delta="1000000" />
+                </assert_contents>
+            </output>
             <output name="all_results">
                 <assert_contents>
                     <has_text text="feature"/>
-                    <has_n_lines n="8092"/>
+                    <has_n_lines n="175" delta="10"/>
                     <has_n_columns n="9"/>
                 </assert_contents>
             </output>
             <output name="significant_results">
                 <assert_contents>
-                    <has_text text="subject"/>
-                    <has_n_lines n="216" delta="5"/>
+                    <has_text text="dysbiosisnonIBD"/>
+                    <has_n_lines n="95" delta="5"/>
                     <has_n_columns n="9"/>
                 </assert_contents>
             </output>
             <output name="residuals">
                 <assert_contents>
-                    <has_size value="671142" delta="1000"/>
+                    <has_size value="434087"/>
                 </assert_contents>
             </output>
             <output_collection name="figures_pdfs" type="list">
@@ -381,53 +411,8 @@
                 </element>                                                              
             </output_collection>
         </test> 
-        <test expect_num_outputs="5">
-            <param name="input_data" value="HMP2_taxonomy.tsv"/>
-            <param name="input_metadata" value="HMP2_metadata.tsv"/>
-           
-            <section name="additional_options">
-                <param name="min_abundance" value="0.0"/>
-                <param name="min_prevalence" value="0.1"/>
-                <param name="max_significance" value="0.25"/>
-                <param name="normalization" value="TSS"/>
-                <param name="transform" value="LOG"/>
-                <param name="analysis_method" value="LM"/>
-                <param name="correction" value="BH"/>
-                <param name="standardize" value="True"/>
-            </section>
-            <section name="output">
-                <param name="plot_heatmap" value="true"/>
-                <param name="heatmap_first_n" value="50"/>
-                <param name="plot_scatter" value="true"/>
-                <param name="residuals_output" value="true"/>
-            </section>
-            <output name="all_results">
-                <assert_contents>
-                    <has_text text="feature"/>
-                    <has_n_lines n="8092"/>
-                    <has_n_columns n="9"/>
-                </assert_contents>
-            </output>
-            <output name="significant_results">
-                <assert_contents>
-                    <has_text text="subject"/>
-                    <has_n_lines n="880"/>
-                    <has_n_columns n="9"/>
-                </assert_contents>
-            </output>
-            <output name="residuals">
-                <assert_contents>
-                    <has_size value="670759" delta="1000"/>
-                </assert_contents>
-            </output>
-            <output_collection name="figures_pdfs" type="list">
-                <element name="heatmap.pdf" ftype="pdf">
-                    <assert_contents>
-                        <has_size value="7900" delta="1000" />
-                    </assert_contents>
-                </element>                                                              
-            </output_collection>
-        </test> 
+       
+            
     </tests>
     <help><![CDATA[
 @HELP_HEADER@
--- a/macros.xml	Mon Apr 29 10:33:48 2024 +0000
+++ b/macros.xml	Wed Jun 26 09:40:13 2024 +0000
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <macros>
-    <token name="@TOOL_VERSION@">0.99.12</token>
+    <token name="@TOOL_VERSION@">1.16.0</token>
     <token name="@VERSION_SUFFIX@">0</token>
     <token name="@PROFILE@">20.01</token>
     <xml name="edam_ontology">
@@ -17,7 +17,8 @@
     </xml>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="@TOOL_VERSION@">maaslin2</requirement>
+            <requirement type="package" version="@TOOL_VERSION@">bioconductor-maaslin2</requirement>
+            <requirement type="package" version="3.0">zip</requirement>
             <yield/>
         </requirements>
     </xml>