diff qiime2/qiime_feature-table_filter-features.xml @ 29:3ba9833030c1 draft

Uploaded
author florianbegusch
date Fri, 04 Sep 2020 13:12:49 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qiime2/qiime_feature-table_filter-features.xml	Fri Sep 04 13:12:49 2020 +0000
@@ -0,0 +1,138 @@
+<?xml version="1.0" ?>
+<tool id="qiime_feature-table_filter-features" name="qiime feature-table filter-features"
+      version="2020.8">
+  <description>Filter features from table</description>
+  <requirements>
+    <requirement type="package" version="2020.8">qiime2</requirement>
+  </requirements>
+  <command><![CDATA[
+qiime feature-table filter-features
+
+--i-table=$itable
+
+--p-min-frequency=$pminfrequency
+
+#if str($pmaxfrequency):
+  --p-max-frequency=$pmaxfrequency
+#end if
+--p-min-samples=$pminsamples
+
+#if str($pmaxsamples):
+  --p-max-samples=$pmaxsamples
+#end if# if $input_files_mmetadatafile:
+  # def list_dict_to_string(list_dict):
+    # set $file_list = list_dict[0]['additional_input'].__getattr__('file_name')
+    # for d in list_dict[1:]:
+      # set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name')
+    # end for
+    # return $file_list
+  # end def
+--m-metadata-file=$list_dict_to_string($input_files_mmetadatafile)
+# end if
+
+#if '__ob__' in str($pwhere):
+  #set $pwhere_temp = $pwhere.replace('__ob__', '[')
+  #set $pwhere = $pwhere_temp
+#end if
+#if '__cb__' in str($pwhere):
+  #set $pwhere_temp = $pwhere.replace('__cb__', ']')
+  #set $pwhere = $pwhere_temp
+#end if
+#if 'X' in str($pwhere):
+  #set $pwhere_temp = $pwhere.replace('X', '\\')
+  #set $pwhere = $pwhere_temp
+#end if
+#if '__sq__' in str($pwhere):
+  #set $pwhere_temp = $pwhere.replace('__sq__', "'")
+  #set $pwhere = $pwhere_temp
+#end if
+#if '__db__' in str($pwhere):
+  #set $pwhere_temp = $pwhere.replace('__db__', '"')
+  #set $pwhere = $pwhere_temp
+#end if
+
+#if str($pwhere):
+  --p-where=$pwhere
+#end if
+
+#if $pexcludeids:
+ --p-exclude-ids
+#end if
+
+--o-filtered-table=ofilteredtable
+
+#if str($examples) != 'None':
+--examples=$examples
+#end if
+
+;
+cp ofilteredtable.qza $ofilteredtable
+
+  ]]></command>
+  <inputs>
+    <param format="qza,no_unzip.zip" label="--i-table: ARTIFACT FeatureTable[Frequency] The feature table from which features should be filtered.                                    [required]" name="itable" optional="False" type="data" />
+    <param label="--p-min-frequency: INTEGER The minimum total frequency that a feature must have to be retained.                            [default: 0]" name="pminfrequency" optional="True" type="integer" value="0" />
+    <param label="--p-max-frequency: INTEGER The maximum total frequency that a feature can have to be retained. If no value is provided this will default to infinity (i.e., no maximum frequency filter will be applied).                                    [optional]" name="pmaxfrequency" optional="False" type="text" />
+    <param label="--p-min-samples: INTEGER The minimum number of samples that a feature must be observed in to be retained.                [default: 0]" name="pminsamples" optional="True" type="integer" value="0" />
+    <param label="--p-max-samples: INTEGER The maximum number of samples that a feature can be observed in to be retained. If no value is provided this will default to infinity (i.e., no maximum sample filter will be applied).                     [optional]" name="pmaxsamples" optional="False" type="text" />
+    <repeat name="input_files_mmetadatafile" optional="True" title="--m-metadata-file">
+      <param format="tabular,qza,no_unzip.zip" label="--m-metadata-file: METADATA... (multiple          Feature metadata used with `where` parameter when arguments will    selecting features to retain, or with `exclude-ids` be merged)        when selecting features to discard.          [optional]" name="additional_input" optional="True" type="data" />
+    </repeat>
+    <param label="--p-where: TEXT       SQLite WHERE clause specifying feature metadata criteria that must be met to be included in the filtered feature table. If not provided, all features in `metadata` that are also in the feature table will be retained.                                 [optional]" name="pwhere" optional="False" type="text" />
+    <param label="--p-exclude-ids: --p-exclude-ids: / --p-no-exclude-ids If true, the features selected by `metadata` or `where` parameters will be excluded from the filtered table instead of being retained.       [default: False]" name="pexcludeids" selected="False" type="boolean" />
+    <param label="--examples: Show usage examples and exit." name="examples" optional="False" type="data" />
+    
+  </inputs>
+
+  <outputs>
+    <data format="qza" label="${tool.name} on ${on_string}: filteredtable.qza" name="ofilteredtable" />
+    
+  </outputs>
+
+  <help><![CDATA[
+Filter features from table
+###############################################################
+
+Filter features from table based on frequency and/or metadata. Any samples
+with a frequency of zero after feature filtering will also be removed. See
+the filtering tutorial on https://docs.qiime2.org for additional details.
+
+Parameters
+----------
+table : FeatureTable[Frequency]
+    The feature table from which features should be filtered.
+min_frequency : Int, optional
+    The minimum total frequency that a feature must have to be retained.
+max_frequency : Int, optional
+    The maximum total frequency that a feature can have to be retained. If
+    no value is provided this will default to infinity (i.e., no maximum
+    frequency filter will be applied).
+min_samples : Int, optional
+    The minimum number of samples that a feature must be observed in to be
+    retained.
+max_samples : Int, optional
+    The maximum number of samples that a feature can be observed in to be
+    retained. If no value is provided this will default to infinity (i.e.,
+    no maximum sample filter will be applied).
+metadata : Metadata, optional
+    Feature metadata used with `where` parameter when selecting features to
+    retain, or with `exclude_ids` when selecting features to discard.
+where : Str, optional
+    SQLite WHERE clause specifying feature metadata criteria that must be
+    met to be included in the filtered feature table. If not provided, all
+    features in `metadata` that are also in the feature table will be
+    retained.
+exclude_ids : Bool, optional
+    If true, the features selected by `metadata` or `where` parameters will
+    be excluded from the filtered table instead of being retained.
+
+Returns
+-------
+filtered_table : FeatureTable[Frequency]
+    The resulting feature table filtered by feature.
+  ]]></help>
+  <macros>
+    <import>qiime_citation.xml</import>
+  </macros>
+  <expand macro="qiime_citation"/>
+</tool>
\ No newline at end of file