diff abims_xcms_retcor.xml @ 1:f42bd3de6aad draft

Uploaded
author lecorguille
date Fri, 08 Jan 2016 09:52:38 -0500
parents ad95fea4015e
children 4d7c8fdd1cbf
line wrap: on
line diff
--- a/abims_xcms_retcor.xml	Fri Aug 07 05:34:26 2015 -0400
+++ b/abims_xcms_retcor.xml	Fri Jan 08 09:52:38 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.4">
 
     <description>Retention Time Correction using retcor function from xcms R package </description>
 
@@ -13,9 +13,17 @@
         <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,7 @@
 
 .. image:: xcms_retcor.png
 
-    </help>
+    ]]></help>
 
     <citations>
         <citation type="doi">10.1021/ac051437y</citation>