view waveica.xml @ 1:2bcfd5b450bb draft

"planemo upload for repository https://github.com/RECETOX/galaxytools/tree/master/tools/waveica commit c52cdb1ab3c4e65ce3b55e29739f16abb8bfd6eb"
author recetox
date Wed, 28 Jul 2021 11:58:20 +0000
parents 2461d20911c9
children d08deef1eb44
line wrap: on
line source

<tool id="waveica" name="WaveICA" version="0.1.0+galaxy1" python_template_version="3.5">

    <description>removal of batch effects for untargeted metabolomics data</description>
    
    <requirements>
        <container type="docker">recetox/waveica:0.1.0-recetox0</container>
    </requirements>

    <command detect_errors="aggressive"><![CDATA[
        Rscript
            -e 'source("${__tool_directory__}/waveica_wrapper.R")'

            -e 'normalized_data <- waveica(
                data = "$data",
                wavelet_filter = "$parameters.wf.wavelet_filter",
                wavelet_length = "$parameters.wf.wavelet_length",
                k = $parameters.k,
                t = $parameters.t,
                t2 = $parameters.t2,
                alpha = $parameters.alpha,
                exclude_blanks = $optional_parameters.exclude_blanks
            )'

            -e 'store_data(normalized_data,"$normalized_features")'
    ]]></command>

    <inputs>
        <param type="data" name="data" label="Sample-by-matrix data" format="csv" help=""/>
        <section name="parameters" title="Normalization Parameters" expanded="True">
            <conditional name="wf">
                <param type="select" name="wavelet_filter" label="Wavelet transform filter" help="selecting wavelet function and filter length">
                    <option value="d" selected="True">Daubechies</option>
                    <option value="la" >Least Asymetric</option>
                    <option value="bl" >Best Localized</option>
                    <option value="c" >Coiflet</option>
                </param>
                <when value="d">
                    <param name="wavelet_length" type="select" label="filter length">
                        <option value="2" selected="True">2</option>
                        <option value="4">4</option>
                        <option value="6">6</option>
                        <option value="8">8</option>
                        <option value="10">10</option>
                        <option value="12">12</option>
                        <option value="14">14</option>
                        <option value="16">16</option>
                        <option value="18">18</option>
                        <option value="20">20</option>
                    </param>
                </when>
                <when value="la">
                    <param name="wavelet_length" type="select" label="filter length">
                        <option value="8">8</option>
                        <option value="10">10</option>
                        <option value="12">12</option>
                        <option value="14">14</option>
                        <option value="16">16</option>
                        <option value="18">18</option>
                        <option value="20">20</option>
                    </param>
                </when>
                <when value="bl">
                    <param name="wavelet_length" type="select" label="filter length">
                        <option value="14">14</option>
                        <option value="18">18</option>
                        <option value="20">20</option>
                    </param>
                </when>
                <when value="c">
                    <param name="wavelet_length" type="select" label="filter length">
                        <option value="6">6</option>
                        <option value="12">12</option>
                        <option value="18">18</option>
                        <option value="24">24</option>
                        <option value="30">30</option>
                    </param>
                </when>
            </conditional>
            <param type="integer" value="20" name="k" label="Number of components to decompose" help="the maximal component that ICA decomposes"/>
            <param type="float" value="0.05" name="t" label="Batch-assosiation threshold" help="the threshold to consider a component associate with the batch,
 should be between 0 and 1"/>
            <param type="float" value="0.05" name="t2" label="Group-assosiation threshold" help="the threshold to consider a component associate with the group,
 should be between 0 and 1"/>
            <param type="float" value="0" name="alpha" label="Alpha" help="the trade-off value between the independence of samples and those of variables and should be between 0 and 1"/>
        </section>
        <section name="optional_parameters" expanded="true" title="Optional Parameters">
            <param name="exclude_blanks" type="boolean" checked="true" truevalue="TRUE" falsevalue="FALSE" label="Remove blanks" help="Excludes blank samples from the output" />
        </section>
    </inputs>

    <outputs>
        <data name="normalized_features" format="tsv" />
    </outputs>

    <tests>
        <test>
            <param name="data" value="features-test.csv" ftype="csv" />
            <param name="wavelet_filter" value="d" />
            <param name="filter_length" value="2" />
            <param name="k" value="20" />
            <param name="t" value="0.05" />
            <param name="t2" value="0.05" />
            <param name="alpha" value="0" />
            <output name="normalized_features" file="features-normalized.tsv" /> 
        </test>
    </tests>

    <help><![CDATA[
        **Description**

        Removal of batch effects for large-scale untargeted metabolomics data based on wavelet analysis. The WaveICA R package provides a new algorithm to removing batch effects for metabolomics data.
        
        The input is Sample-by-matrix table which must include: 

        1. Injection order of samples

        2. Types of the samples denoted as "blank", "sample" or "QC"

        3. Batch numbers

        4. Features data

        **Documentation**

        See original repository for further information: https://github.com/dengkuistat/WaveICA

    ]]></help>

    <citations>
        <citation type="doi">10.1016/j.aca.2019.02.010</citation>
    </citations>

</tool>