changeset 1:dcfaffec48c8 draft default tip

planemo upload for repository https://github.com/HegemanLab/w4mjoinpn_galaxy_wrapper/tree/master commit 919fba0dbfcdb553bbb6e1c765c3a8c9f26a47f9
author eschen42
date Wed, 08 Aug 2018 19:40:57 -0400
parents 948bac693947
children
files README.md w4mjoinpn.xml
diffstat 2 files changed, 159 insertions(+), 122 deletions(-) [+]
line wrap: on
line diff
--- a/README.md	Sun Oct 29 10:05:05 2017 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1038289.svg)](https://doi.org/10.5281/zenodo.1038289)
-
-# w4mjoinpn_galaxy_wrapper
-
-This tool joins two sets of MS1 datasets for **exactly** the same set of samples, where one was gathered in positive 
-ionization-mode and the other in negative ionization-mode, for reasons set forth below.  
-
-Workflow4Metabolomics (W4M, Giacomoni *et al.*, 2014, http://dx.doi.org/10.1093/bioinformatics/btu813; http://workflow4metabolomics.org; 
-https://github.com/workflow4metabolomics) provides a suite of Galaxy tools for processing and analyzing metabolomics data.
-  
-W4M uses the XCMS package (Smith *et al.*, 2006 http://dx.doi.org/10.1021/ac051437y) to extract features and align 
-their retention times among multiple samples. 
-
-After peak extraction and alignment, W4M uses the CAMERA package (Kuhl *et al.*, 2012, http://dx.doi.org/10.1021/ac202450g) 
-"to postprocess XCMS feature lists and to collect all features related to a compound into a compound spectrum."
-
-Both of these steps are done using data collected in a single ionization mode (i.e., only negative or only positive)
-because it would not make sense to attempt to use CAMERA otherwise.
-
-However, multivariate analysis in general, and particularly the "False Discovery Rate" adjustment in hypothesis testing,
-would both benefit from having all variables (features), negative and positive, combined for one analysis.  It is also
-cumbersome to be forced to do an analysis twice, once for each ionization mode.
-
-This tool will fail:
- * when the samples are not listed in exactly the same order in the negative-mode dataMatrix and the positive-mode dataMatrix
- * when the samples are not listed in exactly the same order in the negative-mode sampleMetadata and the positive-mode sampleMetadata
-
-Otherwise
-  * the two dataMatrix files are concatenated, and the names of features identified from positive ionization-mode data
-are prefixed with "P"; negative, with "N".
-  * the two variableMetadata files are concatenated, and the names of features are prefixed in the same way.
-  * if sampleMetadata has a polarity column, its value is set to "posneg" in the output.
-    * Technically, the sampleMetadata file in the output is derived from the negative ionization-mode sampleMetadata.
--- a/w4mjoinpn.xml	Sun Oct 29 10:05:05 2017 -0400
+++ b/w4mjoinpn.xml	Wed Aug 08 19:40:57 2018 -0400
@@ -1,40 +1,123 @@
-<tool id="w4mjoinpn" name="Join +/- Ions" version="0.98.1">
-  <description>Join positive and negative ionization-mode W4M datasets for the same samples</description>
-  <requirements>
-     <requirement type="package" version="8.25">coreutils</requirement>
-     <requirement type="package" version="4.2.3.dev0">sed</requirement>
-  </requirements>
-  <stdio>
-      <exit_code range="1:" level="fatal" />
-  </stdio>
-  <command><![CDATA[
-      echo "These are the the paths to the tools used by this script:" 1>&2 ;
-      which cut sed head paste cat cp bash test 1>&2 ;
-      $__tool_directory__/w4mjoinpn.sh
-        dmneg $dmneg 
-        dmpos $dmpos 
-        dmout $dmout 
-        smneg $smneg 
-        smpos $smpos 
-        smout $smout 
-        vmneg $vmneg 
-        vmpos $vmpos 
-        vmout $vmout 
-  ]]></command>
-  <inputs>
-    <param name="dmpos" label="Data matrix positive" type="data" format="tabular" help="Positive ionization-mode: Features x samples (tabular data - decimal: '.'; missing: NA; mode: numerical; separator: tab character)" />
-    <param name="smpos" label="Sample metadata positive" type="data" format="tabular" help="Positive ionization-mode: Samples x metadata (tabular data - decimal: '.'; missing: NA; mode: character or numerical; separator: tab character)" />
-    <param name="vmpos" label="Variable metadata positive" type="data" format="tabular" help="Positive ionization-mode: Features x metadata (tabular data - decimal: '.'; missing: NA; mode: character or numerical; separator: tab character)" />
-    <param name="dmneg" label="Data matrix negative" type="data" format="tabular" help="Negative ionization-mode: Features x samples (tabular data - decimal: '.'; missing: NA; mode: numerical; separator: tab character)" />
-    <param name="smneg" label="Sample metadata negative" type="data" format="tabular" help="Negative ionization-mode: Samples x metadata (tabular data - decimal: '.'; missing: NA; mode: character or numerical; separator: tab character)" />
-    <param name="vmneg" label="Variable metadata negative" type="data" format="tabular" help="Negative ionization-mode: Features x metadata (tabular data - decimal: '.'; missing: NA; mode: character or numerical; separator: tab character)" />
-  </inputs>
-  <outputs>
-    <data name="dmout" label="${dmneg.name}.posneg" format="tabular" ></data>
-    <data name="smout" label="${smneg.name}.posneg" format="tabular" ></data>
-    <data name="vmout" label="${vmneg.name}.posneg" format="tabular" ></data>
-  </outputs>
-  <help><![CDATA[
+<tool id="w4mjoinpn" name="Join +/- Ions" version="0.98.2">
+    <description>Join positive and negative ionization-mode W4M datasets for the same samples</description>
+    <requirements>
+        <requirement type="package" version="8.25">coreutils</requirement>
+        <!--
+        <requirement type="package" version="4.2.3.dev0">sed</requirement>
+        -->
+        <requirement type="package" version="4.4">sed</requirement>
+    </requirements>
+    <stdio>
+            <exit_code range="1:" level="fatal" />
+    </stdio>
+    <command  detect_errors="aggressive"><![CDATA[
+            pwd
+            ;
+            echo $__tool_directory__/w4mjoinpn.sh
+                vmneg $vmneg 
+                vmpos $vmpos 
+                vmout $vmout 
+                dmneg $dmneg 
+                dmpos $dmpos 
+                dmout $dmout 
+                smneg $smneg 
+                smpos $smpos 
+                smout $smout 
+                ;
+            $__tool_directory__/w4mjoinpn.sh
+                vmneg $vmneg 
+                vmpos $vmpos 
+                vmout $vmout 
+                dmneg $dmneg 
+                dmpos $dmpos 
+                dmout $dmout 
+                smneg $smneg 
+                smpos $smpos 
+                smout $smout 
+    ]]></command>
+    <inputs>
+        <param name="dmpos" label="Data matrix positive" type="data" format="tabular" 
+            help="Positive ionization-mode: variables &#10006; samples" />
+        <param name="smpos" label="Sample metadata positive" type="data" format="tabular" 
+            help="Positive ionization-mode: sample metadata, one row per sample" />
+        <param name="vmpos" label="Variable metadata positive" type="data" format="tabular" 
+            help="Positive ionization-mode: variable metadata, one row per variable" />
+        <param name="dmneg" label="Data matrix negative" type="data" format="tabular" 
+            help="Negative ionization-mode: variables &#10006; samples" />
+        <param name="smneg" label="Sample metadata negative" type="data" format="tabular" 
+            help="Negative ionization-mode: sample metadata, one row per sample" />
+        <param name="vmneg" label="Variable metadata negative" type="data" format="tabular" 
+            help="Negative ionization-mode: variable metadata, one row per variable" />
+    </inputs>
+    <outputs>
+        <data name="dmout" label="${dmneg.name}.posneg" format="tabular" ></data>
+        <data name="smout" label="${smneg.name}.posneg" format="tabular" ></data>
+        <data name="vmout" label="${vmneg.name}.posneg" format="tabular" ></data>
+    </outputs>
+    <tests>
+        <!-- test 1 -->
+        <test>
+          <param name="dmpos" value="input_dataMatrix_pos.tsv"/>
+          <param name="dmneg" value="input_dataMatrix_neg.tsv"/>
+          <param name="smpos" value="input_sampleMetadata_pos.tsv"/>
+          <param name="smneg" value="input_sampleMetadata_neg.tsv"/>
+          <param name="vmpos" value="input_variableMetadata_pos.tsv"/>
+          <param name="vmneg" value="input_variableMetadata_neg.tsv"/>
+          <output name="dmout">
+            <assert_contents>
+              <has_text text="NM295T781" />
+              <has_text text="1177836.83774999" />
+              <has_text text="3552840.90153851" />
+            </assert_contents>
+          </output>
+          <output name="vmout">
+            <assert_contents>
+              <has_text text="NM295T781" />
+              <has_text text="M295.125T780.95" />
+              <has_text text="780.953277587891" />
+            </assert_contents>
+          </output>
+          <output name="smout">
+            <assert_contents>
+              <has_text text="Y5_1_RA4_01_212" />
+              <has_text text="posneg" />
+              <has_text text="Y13_1_RA6_01_214" />
+            </assert_contents>
+          </output>
+        </test>
+        <!-- test 2 -->
+        <test>
+          <param name="dmpos" value="input_dataMatrix_pos.tsv"/>
+          <param name="dmneg" value="input_dataMatrix_neg.tsv"/>
+          <param name="smpos" value="input_sampleMetadata_pos.tsv"/>
+          <param name="smneg" value="input_sampleMetadata_neg_4col.tsv"/>
+          <param name="vmpos" value="input_variableMetadata_pos.tsv"/>
+          <param name="vmneg" value="input_variableMetadata_neg.tsv"/>
+          <output name="dmout">
+            <assert_contents>
+              <has_text text="NM295T781" />
+              <has_text text="1177836.83774999" />
+              <has_text text="3552840.90153851" />
+            </assert_contents>
+          </output>
+          <output name="vmout">
+            <assert_contents>
+              <has_text text="NM295T781" />
+              <has_text text="M295.125T780.95" />
+              <has_text text="780.953277587891" />
+            </assert_contents>
+          </output>
+          <output name="smout">
+            <assert_contents>
+              <has_text text="Y5_1_RA4_01_212" />
+              <has_text text="posneg" />
+              <has_text text="y5" />
+              <has_text text="bar" />
+            </assert_contents>
+          </output>
+        </test>
+    </tests>
+    <help><![CDATA[
 **Join positive and negative ionization-mode W4M datasets for the same samples**
 --------------------------------------------------------------------------------
 
@@ -46,7 +129,7 @@
 
 Workflow4Metabolomics (W4M, Giacomoni *et al.*, 2014; http://workflow4metabolomics.org; https://github.com/workflow4metabolomics) 
 provides a suite of Galaxy tools for processing and analyzing metabolomics data.
-  
+
 W4M uses the XCMS package (Smith *et al.*, 2006) to extract features and align 
 their retention times among multiple samples. 
 
@@ -88,56 +171,43 @@
 
 **Input files**
 
-  +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
-  | Input File                                  | Download from URL                                                                                                     |
-  +=============================================+=======================================================================================================================+
-  | Data matrix, negative ionization-mode       | https://raw.githubusercontent.com/HegemanLab/w4mjoinpn_galaxy_wrapper/master/test-data/input_dataMatrix_neg.tsv       |
-  +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
-  | Sample metadata, negative ionization-mode   | https://raw.githubusercontent.com/HegemanLab/w4mjoinpn_galaxy_wrapper/master/test-data/input_sampleMetadata_neg.tsv   |
-  +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
-  | Variable metadata, negative ionization-mode | https://raw.githubusercontent.com/HegemanLab/w4mjoinpn_galaxy_wrapper/master/test-data/input_variableMetadata_neg.tsv |
-  +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
-  | Data matrix, positive ionization-mode       | https://raw.githubusercontent.com/HegemanLab/w4mjoinpn_galaxy_wrapper/master/test-data/input_dataMatrix_pos.tsv       |
-  +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
-  | Sample metadata, positive ionization-mode   | https://raw.githubusercontent.com/HegemanLab/w4mjoinpn_galaxy_wrapper/master/test-data/input_sampleMetadata_pos.tsv   |
-  +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
-  | Variable metadata, positive ionization-mode | https://raw.githubusercontent.com/HegemanLab/w4mjoinpn_galaxy_wrapper/master/test-data/input_variableMetadata_pos.tsv |
-  +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
-
-**Output files**
+  +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
+  | Input File                                  | Download from URL                                                                                                                        |
+  +=============================================+==========================================================================================================================================+
+  | Data matrix, negative ionization-mode       | https://raw.githubusercontent.com/HegemanLab/w4mjoinpn_galaxy_wrapper/master/tools/w4mjoinpn/test-data/input_dataMatrix_neg.tsv          |
+  +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
+  | Sample metadata, negative ionization-mode   | https://raw.githubusercontent.com/HegemanLab/w4mjoinpn_galaxy_wrapper/master/tools/w4mjoinpn/test-data/input_sampleMetadata_neg.tsv      |
+  +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
+  | Variable metadata, negative ionization-mode | https://raw.githubusercontent.com/HegemanLab/w4mjoinpn_galaxy_wrapper/master/tools/w4mjoinpn/test-data/input_variableMetadata_neg.tsv    |
+  +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
+  | Data matrix, positive ionization-mode       | https://raw.githubusercontent.com/HegemanLab/w4mjoinpn_galaxy_wrapper/master/tools/w4mjoinpn/test-data/input_dataMatrix_pos.tsv          |
+  +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
+  | Sample metadata, positive ionization-mode   | https://raw.githubusercontent.com/HegemanLab/w4mjoinpn_galaxy_wrapper/master/tools/w4mjoinpn/test-data/input_sampleMetadata_pos.tsv      |
+  +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
+  | Variable metadata, positive ionization-mode | https://raw.githubusercontent.com/HegemanLab/w4mjoinpn_galaxy_wrapper/master/tools/w4mjoinpn/test-data/input_variableMetadata_pos.tsv    |
+  +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
+                                                                                                                                                                                          
+**Output files**                                                                                                                                                                          
+                                                                                                                                                                                          
+  +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
+  | Output File                                 | Download from URL                                                                                                                        |
+  +=============================================+==========================================================================================================================================+
+  | Data matrix                                 | https://raw.githubusercontent.com/HegemanLab/w4mjoinpn_galaxy_wrapper/master/tools/w4mjoinpn/test-data/expected_dataMatrix.tsv           |
+  +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
+  | Sample metadata                             | https://raw.githubusercontent.com/HegemanLab/w4mjoinpn_galaxy_wrapper/master/tools/w4mjoinpn/test-data/expected_sampleMetadata.tsv       |
+  +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
+  | Variable metadata                           | https://raw.githubusercontent.com/HegemanLab/w4mjoinpn_galaxy_wrapper/master/tools/w4mjoinpn/test-data/expected_variableMetadata.tsv     |
+  +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+
 
-  +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
-  | Output File                                 | Download from URL                                                                                                     |
-  +=============================================+=======================================================================================================================+
-  | Data matrix                                 | https://raw.githubusercontent.com/HegemanLab/w4mjoinpn_galaxy_wrapper/master/test-data/output_dataMatrix.tsv          |
-  +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
-  | Sample metadata                             | https://raw.githubusercontent.com/HegemanLab/w4mjoinpn_galaxy_wrapper/master/test-data/output_sampleMetadata.tsv      |
-  +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
-  | Variable metadata                           | https://raw.githubusercontent.com/HegemanLab/w4mjoinpn_galaxy_wrapper/master/test-data/output_variableMetadata.tsv    |
-  +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------+
-
-  ]]></help>
-  <citations>
-    <citation type="doi">10.5281/zenodo.1038289</citation>
+    ]]></help>
+    <citations>
+        <!-- Giacomoni, 2014 Workflow4Metabolomics: a collaborative research infrastructure for computational metabolomics -->
+        <citation type="doi">10.1093/bioinformatics/btu813</citation>
+        <!-- Kuhl et al., 2012 CAMERA: An Integrated Strategy for Compound Spectra Extraction and Annotation of LC-MS Data Sets -->
+        <citation type="doi">10.1021/ac202450g</citation>
+        <!-- Smith, 2006 XCMS: Processing Mass Spectrometry Data for Metabolite Profiling Using Nonlinear Peak Alignment, Matching, and Identification. -->
+        <citation type="doi">10.1021/ac051437y</citation>
+    </citations>
     <!--
-    <citation type="bibtex">
-      @misc{
-        w4mjoinpn_galaxy_wrapper,
-        author = {Eschenlauer, Arthur},
-        year = {2017},
-        title = {w4mjoinpn_galaxy_wrapper},
-        publisher = {GitHub},
-        journal = {GitHub repository},
-        url = {https://github.com/HegemanLab/w4mjoinpn_galaxy_wrapper},
-        doi = 10.5281/zenodo.1038290
-      }
-    </citation>
-    -->
-    <!-- Giacomoni, 2014 Workflow4Metabolomics: a collaborative research infrastructure for computational metabolomics -->
-    <citation type="doi">10.1093/bioinformatics/btu813</citation>
-    <!-- Kuhl et al., 2012 -->
-    <citation type="doi">10.1021/ac202450g</citation>
-    <!-- Smith, 2006 XCMS: Processing Mass Spectrometry Data for Metabolite Profiling Using Nonlinear Peak Alignment, Matching, and Identification. -->
-    <citation type="doi">10.1021/ac051437y</citation>
-  </citations>
-</tool>
+     vim:et:sw=4:ts=4
+--> </tool>