changeset 9:dc6b3773f8de draft

planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 1bf8810447bdd1268f67bfb64ead95ce82d8d85c
author lecorguille
date Fri, 08 Apr 2016 06:18:24 -0400
parents 78fb71c535d0
children 1ea35f88f3c4
files README.rst abims_xcms_summary.xml macros.xml planemo.sh planemo_test.sh test-data/summary.html tool_dependencies.xml xcms_summary.r
diffstat 8 files changed, 114 insertions(+), 46 deletions(-) [+]
line wrap: on
line diff
--- a/README.rst	Tue Mar 22 17:00:35 2016 -0400
+++ b/README.rst	Fri Apr 08 06:18:24 2016 -0400
@@ -2,7 +2,19 @@
 Changelog/News
 --------------
 
+**Version 1.0.1 - 04/04/2016**
+
+- TEST: refactoring to pass planemo test using conda dependencies
+
+
 **Version 1.0.0 - 10/02/2016**
 
 - NEW: Create a summary of XCMS analysis
 
+
+Test Status
+-----------
+
+Planemo test using conda: failed
+Planemo test using source env.sh: passed
+
--- a/abims_xcms_summary.xml	Tue Mar 22 17:00:35 2016 -0400
+++ b/abims_xcms_summary.xml	Fri Apr 08 06:18:24 2016 -0400
@@ -1,20 +1,21 @@
-<tool id="abims_xcms_summary" name="xcms.summary" version="1.0.0">
+<tool id="abims_xcms_summary" name="xcms.summary" version="1.0.1">
     
     <description>Create a summary of XCMS analysis</description>
-    
+
+    <macros>
+        <import>macros.xml</import>
+    </macros>    
+
     <requirements>
         <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="1.22.0">camera</requirement>
+        <requirement type="package" version="1.22.0">bioconductor-camera</requirement>
+        <requirement type="package" version="1.1_4">r-batch</requirement>
     </requirements>
     
-    <stdio>
-        <exit_code range="1:" level="fatal" />
-    </stdio>
+    <expand macro="stdio"/>
     
-    <command interpreter="Rscript"><![CDATA[
-        xcms_summary.r
+    <command><![CDATA[
+        $__tool_directory__/xcms_summary.r
 
         image $image 
         htmlOutput $htmlOutput
@@ -24,7 +25,7 @@
     
     <inputs>
 
-        <param name="image" type="data" format="rdata.xcms.raw,rdata.xcms.group,rdata.xcms.retcor,rdata.xcms.fillpeaks,rdata.camera.quick,rdata.camera.positive,rdata.camera.negative,rdata,RData" label="xset RData file" help="output file from another function xcms (xcmsSet, group, retcor, fillpeaks etc.)" />
+        <param name="image" type="data" format="rdata.xcms.raw,rdata.xcms.group,rdata.xcms.retcor,rdata.xcms.fillpeaks,rdata.camera.quick,rdata.camera.positive,rdata.camera.negative,rdata" label="xset RData file" help="output file from another function xcms (xcmsSet, group, retcor, fillpeaks etc.)" />
 
     </inputs>
     
@@ -34,20 +35,14 @@
     
     <tests>
         <test>
-            <param name="image" value="fillpeaks.RData" ftype="RData" />
-            <output name="htmlOutput" file="summary.html" ftype="html" />
+            <param name="image" value="fillpeaks.RData" />
+            <output name="htmlOutput" file="summary.html" />
         </test>
     </tests>
     
     <help><![CDATA[
-
-.. class:: infomark
-
-**Galaxy integration** ABiMS TEAM - UPMC/CNRS - Station biologique de Roscoff part of Workflow4Metabolomics.org [W4M]
-
- | Contact support@workflow4metabolomics.org for any questions or concerns about the Galaxy implementation of this tool.
-
----------------------------------------------------
+        
+@HELP_AUTHORS@
 
 ============
 Xcms.summary
@@ -65,6 +60,11 @@
 Changelog/News
 --------------
 
+**Version 1.0.1 - 04/04/2016**
+
+- TEST: refactoring to pass planemo test using conda dependencies
+
+
 **Version 1.0.0 - 10/02/2016**
 
 - NEW: Create a summary of XCMS analysis
@@ -73,8 +73,6 @@
     ]]></help>
 
 
-    <citations>
-        <citation type="doi">10.1093/bioinformatics/btu813</citation>
-    </citations>
+    <expand macro="citation" />
 
 </tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Fri Apr 08 06:18:24 2016 -0400
@@ -0,0 +1,51 @@
+<?xml version="1.0"?>
+<macros>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="3.1.2">R</requirement>
+	    <requirement type="package" version="0.4_1">r-snow</requirement>
+            <requirement type="package" version="1.44.0">bioconductor-xcms</requirement>
+	    <requirement type="package" version="1.1_4">r-batch</requirement>
+        </requirements>
+    </xml>
+    <xml name="stdio">
+        <stdio>
+            <exit_code range="1" level="fatal" />
+        </stdio>
+    </xml>
+
+    <token name="@COMMAND_XCMS_SCRIPT@">
+        LANG=C Rscript $__tool_directory__/xcms.r
+    </token>
+
+    <token name="@COMMAND_LOG_EXIT@">
+        ;
+        return=\$?;
+        mv log.txt $log;
+        cat $log;
+        sh -c "exit \$return"
+    </token>
+
+    <token name="@HELP_AUTHORS@">
+.. class:: infomark
+
+**Authors**  Colin A. Smith csmith@scripps.edu, Ralf Tautenhahn rtautenh@gmail.com, Steffen Neumann sneumann@ipb-halle.de, Paul Benton hpaul.benton08@imperial.ac.uk and Christopher Conley cjconley@ucdavis.edu 
+
+.. class:: infomark
+
+**Galaxy integration** ABiMS TEAM - UPMC/CNRS - Station biologique de Roscoff and Yann Guitton yann.guitton@oniris-nantes.fr - part of Workflow4Metabolomics.org [W4M]
+
+ | Contact support@workflow4metabolomics.org for any questions or concerns about the Galaxy implementation of this tool.
+
+---------------------------------------------------
+
+    </token>
+
+
+    <xml name="citation">
+        <citations>
+            <citation type="doi">10.1021/ac051437y</citation>
+            <citation type="doi">10.1093/bioinformatics/btu813</citation>
+        </citations>
+    </xml>
+</macros>
--- a/planemo.sh	Tue Mar 22 17:00:35 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-planemo shed_init -f --name=xcms_summary --owner=lecorguille --description="[W4M][GC-MS] XCMS R Package - Preprocessing - HTML Summary for XCMS analysis" --homepage_url="http://workflow4metabolomics.org" --long_description="Part of the W4M project: http://workflow4metabolomics.org\n\nXCMS: http://www.bioconductor.org/packages/release/bioc/html/xcms.html\n\nThis tool create a HTML summary of XCMS analysis" --category="Metabolomics"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/planemo_test.sh	Fri Apr 08 06:18:24 2016 -0400
@@ -0,0 +1,13 @@
+planemo conda_init
+planemo conda_install .
+#Linking packages ...
+#Error: ERROR: placeholder '/root/miniconda3/envs/_build_placehold_placehold_placehold_placehold_placehold_p' too short in: ncurses-5.9-4
+
+
+
+source /w/galaxy/dev/shed_tools_tool_dependency_dir/R/3.1.2/iuc/package_r_3_1_2/1ca39eb16186/env.sh
+source /w/galaxy/dev/shed_tools_tool_dependency_dir/bioconductor-camera/1.22.0/lecorguille/package_bioconductor_camera_1_22_0/22cec61d66c2/env.sh
+planemo test --install_galaxy
+
+#All 1 test(s) executed passed.
+#abims_xcms_summary[0]: passed
\ No newline at end of file
--- a/test-data/summary.html	Tue Mar 22 17:00:35 2016 -0400
+++ b/test-data/summary.html	Fri Apr 08 06:18:24 2016 -0400
@@ -4,26 +4,23 @@
 <meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
 <title>[W4M] XCMS analysis summary</title>
 <style>
-table, tr, td, th { border: 1px solid #000000; border-collapse:collapse; }
-td,th { padding: 5px; padding-right: 12px; }
-th { background: #898989; text-align:left;color: white;}
+table { min-width: 500px; border:1px solid #D6B161; border-collapse:collapse;}
+th { background: #898989; text-align:left;}
+tr { border: 1px solid #000000 }
 h2 { color: #FFA212; }
 ul li { margin-bottom:10px; }
 </style>
 </HEAD>
 <BODY>
-<div><h1>___ XCMS analysis summary using Workflow4Metabolomics ___</h1>
-</div>
+<h1>___ XCMS analysis summary using Workflow4Metabolomics ___</h1>
 <h2>Samples used:</h2>
-<div><table>
+<table
 <tr><th>sample</th><th>filename</th></tr>
-<tr> <td> HU_neg_051 </td> <td> sacuri//bio2/HU_neg_051.mzXML </td>  </tr><tr> <td> HU_neg_060 </td> <td> sacuri//bio2/HU_neg_060.mzXML </td>  </tr><tr> <td> HU_neg_017 </td> <td> sacuri//bio/HU_neg_017.mzXML </td>  </tr><tr> <td> HU_neg_028 </td> <td> sacuri//bio/HU_neg_028.mzXML </td>  </tr><tr> <td> Blanc04 </td> <td> sacuri//blank/Blanc04.mzXML </td>  </tr><tr> <td> Blanc06 </td> <td> sacuri//blank/Blanc06.mzXML </td>  </tr>
+<tr><td> HU_neg_051 </td><td> sacuri//bio2/HU_neg_051.mzXML </td></tr><tr><td> HU_neg_060 </td><td> sacuri//bio2/HU_neg_060.mzXML </td></tr><tr><td> HU_neg_017 </td><td> sacuri//bio/HU_neg_017.mzXML </td></tr><tr><td> HU_neg_028 </td><td> sacuri//bio/HU_neg_028.mzXML </td></tr><tr><td> Blanc04 </td><td> sacuri//blank/Blanc04.mzXML </td></tr><tr><td> Blanc06 </td><td> sacuri//blank/Blanc06.mzXML </td></tr>
 </table>
-
-</div>
 <h2>Function launched:</h2>
-<div><table>
-<tr><th>timestamp<sup>***</sup></th><th>function</th><th>argument</th><th>value</th></tr>
+<table>
+<tr><th>timestamp<br />(ymd-h:m:s)</th><th>function</th><th>argument</th><th>value</th></tr>
 <tr><td rowspan='4'>151221-16:20:54</td><td rowspan='4'>xcmsSet</td>
 <td>nSlaves</td><td>1</td></tr>
 <tr><td>method</td><td>matchedFilter</td></tr>
@@ -38,10 +35,8 @@
 <tr><td rowspan='1'>151221-16:37:20</td><td rowspan='1'>fillPeaks</td>
 <td>method</td><td>chrom</td></tr>
 </table>
-<br/><sup>***</sup>timestamp format: yymmdd-hh:mm:ss
-</div>
-<h2>Informations about the xcmsSet object:</h2>
-<div><pre>
+<h2>Information about the xcmsSet object:</h2>
+<pre>
 An "xcmsSet" object with 6 samples
 
 Time range: 16.3-1138.9 seconds (0.3-19 minutes)
@@ -54,9 +49,9 @@
                   step = 0.01
 
 Memory usage: 0.421 MB
-</pre></div>
+</pre>
 <h2>Citations:</h2>
-<div><ul>
+<ul>
 <li>To cite the <b>XCMS</b> package in publications use:
 <ul>
 <li>Smith, C.A. and Want, E.J. and O'Maille, G. and Abagyan,R. and Siuzdak, G.XCMS: Processing mass spectrometry data for metabolite profiling using nonlinear peak alignment, matching and identification, Analytical Chemistry, 78:779-787 (2006)</li>
@@ -74,6 +69,6 @@
 <li>Franck Giacomoni, Gildas Le Corguillé, Misharl Monsoor, Marion Landi, Pierre Pericard, Mélanie Pétéra, Christophe Duperier, Marie Tremblay-Franco, Jean-François Martin, Daniel Jacob, Sophie Goulitquer, Etienne A. Thévenot and Christophe Caron (2014). Workflow4Metabolomics: A collaborative research infrastructure for computational metabolomics. Bioinformatics  doi:10.1093/bioinformatics/btu813</li>
 </ul>
 </li>
-</ul></div>
+</ul>
 </BODY>
 </HTML>
--- a/tool_dependencies.xml	Tue Mar 22 17:00:35 2016 -0400
+++ b/tool_dependencies.xml	Fri Apr 08 06:18:24 2016 -0400
@@ -3,7 +3,7 @@
     <package name="R" version="3.1.2">
         <repository changeset_revision="1ca39eb16186" name="package_r_3_1_2" owner="iuc" toolshed="https://testtoolshed.g2.bx.psu.edu" />
     </package>
-    <package name="camera" version="1.22.0">
+    <package name="bioconductor-camera" version="1.22.0">
         <repository changeset_revision="e7634e33ca20" name="package_r_camera_1_22_0" owner="lecorguille" toolshed="https://testtoolshed.g2.bx.psu.edu" />
     </package>
 </tool_dependency>
--- a/xcms_summary.r	Tue Mar 22 17:00:35 2016 -0400
+++ b/xcms_summary.r	Fri Apr 08 06:18:24 2016 -0400
@@ -1,5 +1,5 @@
-#!/usr/local/public/bin/Rscript --vanilla --slave --no-site-file
-# version="0.1.0"
+#!/usr/bin/env Rscript
+# version="1.0.0"
 #@author Gildas Le Corguille lecorguille@sb-roscoff.fr ABIMS TEAM