view w4mjoinpn.xml @ 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
line wrap: on
line source

<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**
--------------------------------------------------------------------------------

**Author** - Arthur Eschenlauer (University of Minnesota, esch0041@umn.edu)


Motivation
----------

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. 

After peak extraction and alignment, W4M uses the CAMERA package (Kuhl *et al.*, 2012) 
"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, performing and interpreting statistical analysis would be more convenient and statistically powerful 
with all variables (features), negative and positive, combined for one analysis.


Description
-----------

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 above.  These datasets must be post-XCMS and post-CAMERA.

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.  (In fact, the sampleMetadata file in the output is copied from the negative ionization-mode sampleMetadata, with the polarity replaced.)

Workflow Position
-----------------

* Upstream tool category: Preprocessing
* Downstream tool categories: Normalisation, Statistical Analysis, Quality Control, Filter and Sort

Working example
---------------

**Input 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     |
  +---------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+

    ]]></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>
    <!--
     vim:et:sw=4:ts=4
--> </tool>