view groupFWHM.xml @ 0:6aea0427511e draft default tip

planemo upload commit 24d44ee26b7c23380c2b42fae2f7f6e58472100d
author workflow4metabolomics
date Sun, 24 Nov 2024 21:28:57 +0000
parents
children
line wrap: on
line source

<tool id="CAMERA_groupFWHM" name="CAMERA.groupFWHM" version="0.1.0+camera@TOOL_VERSION@-galaxy@VERSION_SUFFIX@" profile="23.0">

    <description>Group peaks into pseudospectra-groups</description>

    <macros>
        <import>macros.xml</import>
    </macros>

    <expand macro="requirements"/>

    <required_files>
        <include type="literal" path="CAMERA_groupFWHM.R"/>
        <include type="literal" path="lib.r"/>
    </required_files>

    <command detect_errors="exit_code"><![CDATA[
		@COMMAND_RSCRIPT@CAMERA_groupFWHM.R 
		image '$image' 
		sigma $sigma 
		perfwhm $perfwhm 
		intval $intval
        polarity $polarity
		convertRTMinute $convertRTMinute
		numDigitsMZ $numDigitsMZ
		numDigitsRT $numDigitsRT

        #if $advenced.advenced_select == "FALSE":
            sample NA
            nSlaves 1
        #else
            sample $sample
            nSlaves 1
        #end if

        @COMMAND_FILE_LOAD@
		]]>
    </command>

    <inputs>
        <param name="image" type="data" label="RData file" format="rdata" help="output file from another function xcms (fillPeaks)" />
        <param name="sigma" type="integer" value="6" label="the multiplier of the standard deviation"/>
        <param name="perfwhm" type="float" value="0.6" max="1" min="0" label="percentage of the width of the FWHM"/>
        <param name="intval" type="select" label="intensity values for ordering. Allowed values are into, maxo, intb">
            <option value="into" selected="true">into</option>
            <option value="maxo">maxo</option>
            <option value="intb">intb</option>
        </param>
        <param name="polarity" type="select" label="polarity">
            <option value="positive" selected="true">Positive</option>
            <option value="negative">Negative</option>
        </param>
        <conditional name="advenced">
            <param name="advenced_select" type="select" label="Advanced parameters">
                <option value="TRUE">TRUE</option>
                <option value="FALSE" selected="true">FALSE</option>
            </param>
            <when value="FALSE">
                <!--<param name="sample" type="text" value="NA" label="use all the samples (automatic selection)" optional="true" />-->
                <!--<param name="nSlaves" type="integer" value="1" label="For parallel mode set nSlaves higher than 1" optional="true" />-->
            </when>
            <when value="TRUE">
                <param name="sample" type="text" value="NA" label="use all the samples (automatic selection)" optional="true" />
                <!-- issue with findAdducts Use of 'xcmsClusterApply' is deprecated! Use 'BPPARAM' arguments instead. Need update of the package -->
                <!-- <param name="nSlaves" type="integer" value="1" max="3" min="1" label="for parallel mode set nSlaves higher than 1" optional="true" /> -->
            </when>
        </conditional>
        <param name="convertRTMinute" type="boolean" checked="false" truevalue="TRUE" falsevalue="FALSE" label="Convert seconds to minutes when exporting tsv" />
        <param name="numDigitsMZ" type="integer" value="4" max="4" min="0" label="Number of digits for MZ values (namecustom)" />
        <param name="numDigitsRT" type="integer" value="4" max="4" min="0" label="Number of digits for RT values (namecustom)" />
        <expand macro="input_file_load"/>
    </inputs>

    <outputs>
        <data name="variableMetadata" format="tabular" label="${image.name[:-6]}.fwhm.variableMetadata.tsv" from_work_dir="variableMetadata.tsv" />
        <data name="camera_fwhm_rdata" format="rdata" label="${image.name[:-6]}.fwhm.RData" from_work_dir="camera_fwhm.RData"/>
    </outputs>

    <tests>
        <test expect_num_outputs="2">
            <param name="image" value="xset.merged.group.retcor.group.fillPeaks.RData" />
            <!--<param name="sigma" value="6" />
            <param name="perfwhm" value="0.6" />
            <param name="intval" value="into" />-->
            <expand macro="test_file_load_faahKO_15"/>
            <output name="variableMetadata" file="xset.merged.group.retcor.group.fillPeaks.fwhm.variableMetadata.tsv" />
            <output name="camera_fwhm_rdata" value="xset.merged.group.retcor.group.fillPeaks.fwhm.RData" compare="sim_size" delta="5000" />
        </test>
    </tests>
    <help><![CDATA[

================
CAMERA.groupFWHM
================

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

.. _link: https://bioconductor.org/packages/release/bioc/manuals/CAMERA/man/CAMERA.pdf

Group peaks of a xsAnnotate object according to their retention time into pseudospectra-groups.
Uses the peak FWHMs as grouping borders. Returns xsAnnotate object with pseudospectra informations.

---------------------------------------------------

---------
Arguments
---------

+--------------+-------------------------------------------------------------------+	    
|Variables     |Descriptions    						   |
+==============+===================================================================+
|object        |the xsAnnotate object                                              |
+--------------+-------------------------------------------------------------------+
|sigma 	       |the multiplier of the standard deviation                           |
+--------------+-------------------------------------------------------------------+
|perfwhm       |percentage of the width of the FWHM                                |
+--------------+-------------------------------------------------------------------+
|intval        |intensity values for ordering. Allowed values are into, maxo, intb |
+--------------+-------------------------------------------------------------------+

---------------------------------------------------

-------
Details
-------

Every peak that shares a retention time with a selected peak will be part of the group. Same timepoint is defined about the Rt_med +/- FWHM * perfwhm. For a single sample xcmsSet, the selection of peaks starts at the most abundant and goes down to the least abundant. With a multiple sample set, the automatic selection uses the most abundant peak as an representative for every feature group, according to the xcms grouping. The FWHM (full width at half maximum) of a peak is estimated as FWHM = SD * 2.35. For the calculation of the SD, the peak is assumed as normal distributed.

---------------------------------------------------

------------------------------------------
General schema of the metabolomic workflow
------------------------------------------

.. image:: groupFWHM.png

---------------------------------------------------

--------------	    
Changelog/News
--------------

.. _News: https://bioconductor.org/packages/release/bioc/news/CAMERA/NEWS

@HELP_CAMERA_SUITE@

]]>    </help>

    <expand macro="citation"/>
    <expand macro="creator"/>
</tool>