view filter_otus_from_otu_table.xml @ 7:9db0d2cf4451 draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/qiime/ commit c845cb240f57663cf1e2240c5c506ea0b294872c"
author iuc
date Thu, 05 Dec 2019 07:50:35 -0500
parents e84a31935a8b
children
line wrap: on
line source

<tool id="qiime_filter_otus_from_otu_table" name="Filter OTUs from an OTU table" version="@WRAPPER_VERSION@.0" profile="@PROFILE@">
    <description> based on their observation counts or identifier (filter_otus_from_otu_table)</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <version_command>filter_otus_from_otu_table.py --version</version_command>
    <command detect_errors="aggressive"><![CDATA[
@MPLBACKEND@
filter_otus_from_otu_table.py
    --input_fp '$input_fp'
    --output_fp '$output_fp'
    #if $min_count != '':
        --min_count '$min_count'
    #end if
    #if $min_count_fraction != '':
        --min_count_fraction '$min_count_fraction'
    #end if
    #if $max_count != '':
        --max_count '$max_count'
    #end if
    #if $min_samples != '':
        --min_samples '$min_samples'
    #end if
    #if $max_samples != '':
        --max_samples '$max_samples'
    #end if
    #if $id_filtering_condition.id_filtering_switch == 'yes':
        --otu_ids_to_exclude_fp '$id_filtering_condition.otu_ids_to_exclude_fp'
        $id_filtering_condition.negate_ids_to_exclude
    #end if
    ]]></command>
    <inputs>
        <param argument="--input_fp" type="data" format="biom1" optional="false" label="Input OTU table" help="The input otu table filepath in biom format"  />
        <param argument="--min_count" type="integer" value="0" optional="true" label="Minimum total observation count of an otu for that otu to be retained" />
        <param argument="--min_count_fraction" type="float" value="0.0" optional="true" label="Fraction of the total observation (sequence) count to apply as the minimum total observation count of an otu for that otu to be retained" help="This is a fraction (float), not a percentage, so if you want to filter to 1%, you need to use 0.01 as value here" />
        <param argument="--max_count" type="integer" value="" optional="true" label="Maximum total observation count of an otu for that otu to be retained" />
        <param argument="--min_samples" type="integer" value="0" optional="true" label="Minimum number of samples an OTU must be observed in for that otu to be retained" />
        <param argument="--max_samples" type="integer" value="" optional="true" label="Maximum number of samples an OTU must be observed in for that otu to be retained" />
        <conditional name="id_filtering_condition">
            <param name="id_filtering_switch" type="select" label="Do you want to exclude a predefined list of OTUs from the OTU table?" >
                <option value="no" selected="true">No</option>
                <option value="yes">Yes</option>
            </param>
            <when value="no"/>
            <when value="yes">
                <param argument="--otu_ids_to_exclude_fp" type="data" format="fasta,txt" label="Filtering by ID / Chimera filtering - Input text/Fasta file containing a list of OTU ids to exclude" help="The selected file can be a text file with one id per line, a text file where id is the first value in a tab-separated line, or can be a fasta file (extension must be .fna or .fasta)" />
                <param argument="--negate_ids_to_exclude" type="boolean" truevalue="--negate_ids_to_exclude" falsevalue="" checked="false" label="Do you want to reverse the filtering by ID / Chimera filtering ?" help="When this parameter is set to yes, then only the OTUs listed in the file passed to the --otu_ids_to_exclude_fp parameters will be kept in the output biom file" />
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data name="output_fp" format="biom1" label="${tool.name} on ${on_string}: Filtered OTU table (biom format)"/>
    </outputs>
    <tests>
        <!-- Qiime filter_otus_from_otu_table.py generates a binary file (filtered biom file) that can't be directly compared to the sample biom file using diff -->
        <!-- In addition, the files generated by 2 sucessive executions of filter_otus_from_otu_table with the same input files/data are slightly different -->
        <!-- As a consequence, md5 checksums/SHA hash are not a valid comparison option either -->
        <!-- The following tests on output biom files are then based on a comparison of file sizes with a maximum delta of 0 bytes instead of the classic diff-based comparison -->
        <test>
            <param name="input_fp" value="filter_otus_from_otu_table/otu_table.biom" />
            <param name="min_count" value="2" />
            <param name="max_count" value="1000" />
            <param name="min_samples" value="5" />
            <param name="max_samples" value="350" />
            <conditional name="id_filtering_condition">
                <param name="id_filtering_switch" value="no"/>
            </conditional>
            <output name="output_fp" file="filter_otus_from_otu_table/filtered_otu_table.biom" ftype="biom1" compare="sim_size" delta="200" />
        </test>
        <test>
            <param name="input_fp" value="filter_otus_from_otu_table/otu_table.biom" />
            <conditional name="id_filtering_condition">
                <param name="id_filtering_switch" value="yes"/>
                <param name="otu_ids_to_exclude_fp" value="filter_otus_from_otu_table/chimeric_otus.txt"/>
                <param name="negate_ids_to_exclude" value="False"/>
            </conditional>
            <output name="output_fp" file="filter_otus_from_otu_table/chimera_filtered_otu_table.biom" ftype="biom1" compare="sim_size" delta="200" />
        </test>
        <test>
            <param name="input_fp" value="filter_otus_from_otu_table/otu_table.biom" />
            <conditional name="id_filtering_condition">
                <param name="id_filtering_switch" value="yes"/>
                <param name="otu_ids_to_exclude_fp" value="filter_otus_from_otu_table/chimeric_otus.txt"/>
                <param name="negate_ids_to_exclude" value="True"/>
            </conditional>
            <output name="output_fp" file="filter_otus_from_otu_table/chimera_picked_otu_table.biom" ftype="biom1" compare="sim_size" delta="200" />
        </test>
    </tests>
    <help><![CDATA[
**What it does**

The Qiime script `filter_otus_from_otu_table.py <http://qiime.org/scripts/filter_otus_from_otu_table.html>`_ filter OTUs from an OTU table based on their observation counts or identifier.

The output of `filter_otus_from_otu_table.py <http://qiime.org/scripts/filter_otus_from_otu_table.html>`_ is a `biom file <http://biom-format.org/>`_.

Different kind of filtering can be applied on the input biom file depending on the selected parameters:
  - Singleton filtering (minimum number of occurence) by using the -n/--min_count parameters
  - Abundance filtering (maximum number of occurence) by using the -x/--max_count parameters
  - Chimera filtering by using the -e/--otu_ids_to_exclude_fp parameters

More information about this tool is available on
`QIIME documentation <http://qiime.org/scripts/filter_otus_from_otu_table.html>`_.
    ]]></help>
    <citations>
        <expand macro="citations"/>
    </citations>
</tool>