diff filter_otus_from_otu_table.xml @ 0:8824c27efae2 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/qiime/ commit c9bf747b23b4a9d6adc20c7740b9247c22654862
author iuc
date Thu, 18 May 2017 09:29:01 -0400
parents
children e84a31935a8b
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/filter_otus_from_otu_table.xml	Thu May 18 09:29:01 2017 -0400
@@ -0,0 +1,107 @@
+<tool id="qiime_filter_otus_from_otu_table" name="Filter otus from otu table" version="@WRAPPER_VERSION@.0">
+    <description>Filter OTUs from an OTU table based on their observation counts or identifier</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[
+        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" optional="False"  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" label="Do you want to reverse the filtering by ID / Chimera filtering ?" truevalue="--negate_ids_to_exclude" falsevalue="" checked="False" 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="0" />
+        </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="0" />
+        </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="0" />
+        </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>