view get_peaklists.xml @ 0:afc9136ab094 draft

"planemo upload for repository https://github.com/computational-metabolomics/dimspy-galaxy commit 6321871098b2c4bc9e321d20b7e66fff3d641839"
author computational-metabolomics
date Sat, 11 Apr 2020 16:47:41 -0400
parents
children
line wrap: on
line source

<tool id="dimspy_get_peaklists" name="Get peaklists" version="@TOOL_VERSION@+galaxy@GALAXY_TOOL_VERSION@">
    <description> or an average peaklist from a Peak Intensity Matrix</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code">
    <![CDATA[
        #if $input.format == 'all'
            dimspy get-peaklists
        #elif $input.format == 'average'
            dimspy get-average-peaklist
            --name-peaklist '${input.name_peaklist}'
        #end if
        --input '$hdf5_file_in'
        --output '$hdf5_file_out'
        #if $input.to_txt
            &&
            dimspy hdf5-pls-to-txt
            --input '$hdf5_file_out'
            --output .
            --delimiter $delimiter
        #end if
        #if $input.format == 'average' and $input.to_txt
            &&
            mv '${input.name_peaklist}.txt' '$tsv_file_out'
        #end if
    ]]>
    </command>
    <inputs>
        <param name="hdf5_file_in" argument="--input" type="data" format="h5" label="Peak Intensity Matrix (HDF5 file)" help="" />
        <conditional name="input">
            <param name="format" type="select" label="Get..." help="">
                <option value="average" selected="true">Average Peaklist</option>
                <option value="all">Multiple Peaklists (samples)</option>
             </param>
             <when value="average">
                 <param name="name_peaklist" argument="--name-peaklist" type="text" value="" label="Name average Peaklist" >
                     <validator type="empty_field" />
                     <validator type="regex" message="Value may include alphanumeric characters, underscores, dashes and spaces.">[A-Za-z0-9_\- ]+</validator>
                 </param>
                 <param name="to_txt" type="boolean" checked="true" truevalue="true" falsevalue="false" label="Write Peaklists to tsv files (data collection)?" help=""/>
             </when>
             <when value="all">
                 <param name="to_txt" type="boolean" checked="true" truevalue="true" falsevalue="false" label="Write Peaklists to tsv files?" help=""/>
             </when>
        </conditional>
        <param name="delimiter" argument="--delimiter" type="hidden" value="tab" help=""/>
    </inputs>
    <outputs>
        <data name="hdf5_file_out" format="h5" label="${tool.name} on ${on_string}: Peaklists (HDF5 file)"/>
        <collection name="peaklists_txt" type="list" label="${tool.name} on ${on_string}: Peaklists">
            <discover_datasets pattern="(?P&lt;designation&gt;.+)\.txt" format="tsv" directory="." visible="false" />
            <filter>input['to_txt'] is True</filter>
            <filter>input['format'] == 'all'</filter>
        </collection>
        <data name="tsv_file_out" format="tsv" label="${tool.name} on ${on_string}: Average Peaklist">
            <filter>input['to_txt'] is True</filter>
            <filter>input['format'] == 'average'</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="format" value="all"/>
            <param name="hdf5_file_in" value="pm_as_bf_sf.h5" ftype="h5"/>
            <param name="to_txt" value="True"/>
            <param name="delimiter" value="tab"/>
            <output_collection name="peaklists_txt" type="list">
                <element name="batch04_S01_rep01_247_2_248_3_249" file="batch04_S01_rep01_247_2_248_3_249.txt" ftype="tsv"/>
            </output_collection>
        </test>
        <test>
            <param name="format" value="average"/>
            <param name="hdf5_file_in" value="pm_as_bf_sf.h5" ftype="h5"/>
            <param name="name_peaklist" value="batch04_S01_average"/>
            <param name="to_txt" value="True"/>
            <param name="delimiter" value="tab"/>
            <output name="tsv_file_out" file="batch04_S01_average.txt" ftype="tsv"/>
        </test>
    </tests>
    <help>
-------------
Get Peaklists
-------------

..

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

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

Use this tool to extract all individual peaklists, or an average of the individual peaklists, that were used in generating the input peak intensity matrix (.hdf5 format).

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

Parameters
----------

|

**Peak Intensity Matrix (HDF5 file)** (REQUIRED) - a selection menu from which a specific peak intensity matrix (in .hdf5 format) can be selected from the active Galaxy history.

|

**Get…** (REQUIRED; default **Average peaklist**) - a selection menu with options:

- **Average peaklist** - extract an intensity-averaged (non-weighted mean average and with NA values ignored) peaklist from the input peak intensity matrix. Averaging of intensities is performed across ALL samples included in the input peak intensity matrix (.hdf5 format).

  **Name average peaklist** (REQUIRED if “average peaklist” selected; default = “'') - string indicating the name to append to the exported average peaklist (if any).

- **Multiple peaklists (samples)** - extract independent peaklists from the input .hdf5 file for each of the samples used in generating the peak intensity matrix.

|

**Write peaklists to tsv files (data collection)?** (REQUIRED; default = **Yes**)  - binary toggle where:

- **Yes** - corresponds to exporting peaklists(s) to the active Galaxy history in .tsv format

- **No** - corresponds to skipping the export of peaklist(s) to the active Galaxy history in .tsv format

|

**NOTE** - it is currently not possible to use the 'Write Peaklists to tsv files (data collection)?' option when selecting “Multiple Peaklists (samples)” from the “Get…” drop down menu.

|

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

Output file(s)
--------------

**Default output** - a .hdf5 file containing individual peaklists or an average peaklist.


**Optional output** - peaklists (data collection), or an average peaklist, in .tsv format (tab-delimited text file) comprising a numeric data matrix (“.” as decimal, and NA for missing values). Each row corresponds to a peak detected in a specific file, or in the case of an average peaklist, a peak that was detected in AT LEAST one of the study samples. There is no filtering based on a minimum fraction of samples having a measured peak intensity value for a given peak. Columns provide metrics associated with each mass spectral peak. Metrics include:

@help_columns_peaklist@

@example_peaklist@

|

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

@github_developers_contributors@
@license@
    </help>
    <expand macro="citations" />
</tool>