diff abims_xcms_retcor.xml @ 1:da716e2937f2 draft

planemo upload
author lecorguille
date Mon, 22 Feb 2016 16:38:15 -0500
parents 19c1d2598eb5
children 54cc3edfe35c
line wrap: on
line diff
--- a/abims_xcms_retcor.xml	Fri Aug 07 10:57:36 2015 -0400
+++ b/abims_xcms_retcor.xml	Mon Feb 22 16:38:15 2016 -0500
@@ -1,4 +1,4 @@
-<tool id="abims_xcms_retcor" name="xcms.retcor" version="2.0.2">
+<tool id="abims_xcms_retcor" name="xcms.retcor" version="2.0.5">
 
     <description>Retention Time Correction using retcor function from xcms R package </description>
 
@@ -6,16 +6,24 @@
         <requirement type="package" version="3.1.2">R</requirement>
         <requirement type="binary">Rscript</requirement>
         <requirement type="package" version="1.44.0">xcms</requirement>
-        <requirement type="package" version="2.1">xcms_w4m_script</requirement>
+        <requirement type="package" version="2.2.0">xcms_w4m_script</requirement>
     </requirements>
 
     <stdio>
         <exit_code range="1:" level="fatal" />
     </stdio>
 
-    <command>
+    <command><![CDATA[
         xcms.r 
-        image $image xfunction retcor method $methods.method
+        image $image 
+        xfunction retcor 
+
+        xsetRdataOutput $xsetRData
+        ticspdf $ticsCorPdf
+        bicspdf $bpcsCorPdf
+        rplotspdf $rplotsPdf
+
+        method $methods.method
         #if $methods.method == "obiwarp":
             profStep $methods.profStep
         #else
@@ -28,13 +36,16 @@
                 plottype $methods.options.plottype
             #end if
         #end if
-        &amp;&amp; ( mv retcor.RData $xsetRData;
-        mv TICs_corrected.pdf $ticsCorPdf ;
-        mv BPCs_corrected.pdf $bpcsCorPdf ;
-        mv Rplots.pdf $rplotsPdf 2> /dev/null);
-        cat xset.log; 
+        ###if $zip_file:
+        ##    zipfile $zip_file
+        ###end if
+        ;
+        return=\$?;
+        mv log.txt $log;
+        cat $log;
+        sh -c "exit \$return"
         
-    </command>
+    ]]></command>
 
     <inputs>
         <param name="image" type="data" format="rdata.xcms.raw,rdata.xcms.group,rdata" label="xset RData file" help="output file from another function xcms (xcmsSet, retcor etc.)" />
@@ -61,22 +72,24 @@
                     <when value="show">
                         <param name="span" type="float" value="0.2" label="Degree of smoothing for local polynomial regression fitting" help="[span]"/>
                         
-            <param name="family" type="select" label="Family" help="[family] if gaussian fitting is by least-squares with no outlier removal, and if symmetric a re descending M estimator is used with Tukey's biweight function, allowing outlier removal">
-                        <option value="gaussian" selected="true">gaussian</option>
-                        <option value="symmetric">symmetric</option>
-                    </param>
+                        <param name="family" type="select" label="Family" help="[family] if gaussian fitting is by least-squares with no outlier removal, and if symmetric a re descending M estimator is used with Tukey's biweight function, allowing outlier removal">
+                            <option value="gaussian" selected="true">gaussian</option>
+                            <option value="symmetric">symmetric</option>
+                        </param>
 
-            <param name="plottype" type="select" help="[plottype] if deviation plot retention time deviation points and regression fit, and if mdevden also plot peak overall peak density and retention time correction peak density">
+                        <param name="plottype" type="select" help="[plottype] if deviation plot retention time deviation points and regression fit, and if mdevden also plot peak overall peak density and retention time correction peak density">
                             <option value="none" selected="true">none</option>
                             <option value="deviation">deviation</option>
                             <option value="mdevden">mdevden</option>
                         </param>
                     </when>
-            <when value="hide">
-            </when>
+                    <when value="hide">
+                    </when>
                 </conditional>
             </when>
         </conditional>
+        <!-- To pass planemo test -->
+        <!--<param name="zip_file" type="hidden_data" format="no_unzip.zip" label="Zip file" />-->
     </inputs>
 
     <outputs>
@@ -89,6 +102,7 @@
         </data>
         <data name="ticsCorPdf"   format="pdf"  label="${image.name[:-6]}.retcor.TICs_corrected.pdf" />
         <data name="bpcsCorPdf"   format="pdf" label="${image.name[:-6]}.retcor.BPCs_corrected.pdf" />
+        <data name="log" format="txt" label="xset.log.txt"  hidden="true" />
     </outputs>
     
     <tests>
@@ -102,14 +116,25 @@
             <param name="methods.options.span" value="0.2"/>
             <param name="methods.options.family" value="gaussian"/>
             <param name="methods.options.plottype" value="deviation"/>
-            <output name="xsetRData" file="xset.group.retcor.RData" />
-            <output name="rplotsPdf" file="xset.group.retcor.Rplots.pdf" />
-            <output name="ticsCorPdf" file="xset.group.retcor.TICs_corrected.pdf" />
-            <output name="bpcsCorPdf" file="xset.group.retcor.BPCs_corrected.pdf" />
+            <param name="zip_file" value="sacuri.zip"/>
+            <!--<output name="xsetRData" file="xset.group.retcor.RData" />-->
+            <!--<output name="rplotsPdf" file="xset.group.retcor.Rplots.pdf" />-->
+            <!--<output name="ticsCorPdf" file="xset.group.retcor.TICs_corrected.pdf" />-->
+            <!--<output name="bpcsCorPdf" file="xset.group.retcor.BPCs_corrected.pdf" />-->
+            <output name="log">
+                <assert_contents>
+                    <has_text text="object with 9 samples" />
+                    <has_text text="Time range: 0.7-1139.9 seconds (0-19 minutes)" />
+                    <has_text text="Mass range: 50.0019-999.9863 m/z" />
+                    <has_text text="Peaks: 135846 (about 15094 per sample)" />
+                    <has_text text="Peak Groups: 0" />
+                    <has_text text="Sample classes: bio, blank" />
+                </assert_contents>
+            </output>
         </test>
     </tests>
 
-    <help>
+    <help><![CDATA[
 
         
 .. class:: infomark
@@ -266,7 +291,31 @@
 
 .. image:: xcms_retcor.png
 
-    </help>
+
+---------------------------------------------------
+
+Changelog/News
+--------------
+
+**Version 2.0.5 - 10/02/2016**
+
+- BUGFIX: better management of errors. Datasets remained green although the process failed
+
+- BUGFIX: some pdf remained empty even when the process succeed
+
+- UPDATE: refactoring of internal management of inputs/outputs
+
+- UPDATE: refactoring to feed the new report tool
+
+
+**Version 2.0.2 - 02/06/2015**
+
+- IMPROVEMENT: new datatype/dataset formats (rdata.xcms.raw, rdata.xcms.group, rdata.xcms.retcor ...) will facilitate the sequence of tools and so avoid incompatibility errors.
+
+- IMPROVEMENT: parameter labels have changed to facilitate their reading.
+
+
+    ]]></help>
 
     <citations>
         <citation type="doi">10.1021/ac051437y</citation>