view metaquantome_sample.xml @ 8:a1df90e6e7d4 draft default tip

planemo upload
author galaxyp
date Fri, 08 Feb 2019 10:36:53 -0500
parents 5bc492a15b8b
children
line wrap: on
line source

<?xml version='1.0' encoding='utf-8'?>
<tool id="sample" name="metaQuantome: create samples file" version="@VERSION@.3">
    <description> by specifying the experiment's groups and associated column names</description>
    <macros>
        <token name="@VERSION@">1.1.2</token>
    </macros>
    <requirements>
        <requirement type="package" version="@VERSION@">megahit</requirement>
    </requirements>
    <version_command>megahit --version</version_command>
    <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">Specify samples</option>
                <option value="history">Select samples from existing file's header</option>
            </param>
            <when value="build">
                <repeat name="samps" title="Samples">
                    <param name="group_name" type="text" label="Group name" />
                    <param name="col_names" type="text" label="Column" help="Specify the column names of the sample file. Use commas to separate multiple columns." />
                </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>