view metaquantome_sample.xml @ 1:49a957fb353a draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/metaquantome commit 74c403057350af3dde81aea154414a0d6a84d2a3"
author galaxyp
date Wed, 23 Sep 2020 17:03:33 +0000
parents ac3511167a71
children c1343e3389ca
line wrap: on
line source

<tool id="metaquantome_sample" name="metaQuantome: create samples file" version="@GVERSION@">
    <description> by specifying the experiment's groups and associated column names</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <command detect_errors="exit_code"><![CDATA[
        #set $samp_header = 'group\tcolnames'
        echo -e '${samp_header}' > samp_file.tab;
        #if $samps_args.samps_src == 'build':
            #for $s in $samps_args.samps
                #set $sample = str($s.group_name) + '\t' + str($s.col_names)
                echo -e '${sample}' >> samp_file.tab;
            #end for
        #else:
            #for $s in $samps_args.samps
                cat ${samps_args.file} | cut -f ${s.col_names} |
                head -n 1 | tr '\t' ',' |
                cat <(echo -e -n "${s.group_name}\t") - >> samp_file.tab;
            #end for
        #end if
    ]]></command>
    <inputs>
        <conditional name="samps_args">
            <param name="samps_src" type="select" label="Sample file creation method">
                <option value="build">Manually specify experimental conditions and samples</option>
                <option value="history">Select samples from the header of an existing file</option>
            </param>
            <when value="build">
                <repeat name="samps" title="Samples">
                    <param name="group_name" type="text" label="Group name" help="Provide a name for the experimental condition."/>
                    <param name="col_names" type="text" label="Column"
                      help="Give a comma-separated list of the column names that correspond to samples within the experimental condition." />
                </repeat>
            </when>
            <when value="history">
                <param name="file" type="data" format="tabular" label="File with group name headers" help="Ex: moFF tool output (headers: peptide X737NS X737WS)" />
                <repeat name="samps" title="Samples">
                    <param name="group_name" type="text" label="Group name" />
                    <param name="col_names" type="data_column" multiple="true" data_ref="file" label="Column" help="Specify the column indices of the file's header" />
                </repeat>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data format="tabular" name="samples_file" from_work_dir="samp_file.tab" label="${tool.name}  ${on_string}" />
    </outputs>
    <tests>
        <test>
            <param name="samps_src" value="build" />
            <repeat name="samps">
                <param name="group_name" value="NS"/>
                <param name="col_names" value="X737NS,X852NS,X867NS"/>
            </repeat>
            <repeat name="samps">
                <param name="group_name" value="WS"/>
                <param name="col_names" value="X737WS,X852WS,X867WS"/>
            </repeat>
            <output name="samples_file" file="samples.tab" ftype="tabular"/>
        </test>
        <test>
            <param name="samps_src" value="history" />
            <param name="file" value="int_737_test.tab" ftype="tabular" />
            <repeat name="samps">
                <param name="group_name" value="NS"/>
                <param name="col_names" value="3,5,7"/>
            </repeat>
            <repeat name="samps">
                <param name="group_name" value="WS"/>
                <param name="col_names" value="2,4,6"/>
            </repeat>
            <output name="samples_file" file="samples.tab" ftype="tabular" />
        </test>
    </tests>
    <help><![CDATA[
metaQuantome: create samples file
=================================

The *create samples file* module is used to generate the *samples file* input file for the metaQuantome workflow. This input file is used to specify the column names used for each experimental group. These column names are referenced when handling the input data and performing statistical analysis. An example file is shown below.

*Create samples file*
    =====  ====================
    group  colnames
    =====  ====================
    NS     X737NS,X852NS,X867NS
    WS     X737WS,X852WS,X867WS
    =====  ====================


There are two methods for generating this input file:

1. **Specify Samples** You may specify the samples by providing the group names (ex: NS *no sucrose* and WS *with sucrose*) and each of their affilated column names (ex: X737WS, X737NS, etc...) from the input files (e.g., peptide intensity *int.tab*).


2. **Select samples from existing file's header** Alternatively, you can indicate the column indices of the selected headers for each experimental group (ex: columns 3, 5, and 7 for NS; columns 2, 4, and 6 for WS). You need to specify which file from the history you are referencing. An example is shown below.

*int.tab file*
    ============ ====== ======  ======  ======  ======  ======
    peptide      X737WS X737NS  X852WS  X852NS  X867WS  X867NS
    ============ ====== ======  ======  ======  ======  ======
    LPGQQHGTPSAK 1      2       3       4       5       6
    ELPGLAALTDK  7      8       9       10      11      12
    ============ ====== ======  ======  ======  ======  ======


Questions, Comments, Problems, Kudos
------------------------------------

Please file any issues at https://github.com/galaxyproteomics/tools-galaxyp/issues.
    ]]></help>
    <citations>
        <citation type="doi">10.1093/bioinformatics/btv033</citation>
    </citations>
</tool>