diff qiime2/qiime_feature-table_filter-samples.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-samples.xml	Fri Sep 04 13:12:49 2020 +0000
@@ -0,0 +1,137 @@
+<?xml version="1.0" ?>
+<tool id="qiime_feature-table_filter-samples" name="qiime feature-table filter-samples"
+      version="2020.8">
+  <description>Filter samples from table</description>
+  <requirements>
+    <requirement type="package" version="2020.8">qiime2</requirement>
+  </requirements>
+  <command><![CDATA[
+qiime feature-table filter-samples
+
+--i-table=$itable
+
+--p-min-frequency=$pminfrequency
+
+#if str($pmaxfrequency):
+  --p-max-frequency=$pmaxfrequency
+#end if
+--p-min-features=$pminfeatures
+
+#if str($pmaxfeatures):
+  --p-max-features=$pmaxfeatures
+#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¹ | RelativeFrequency² | PresenceAbsence³ | Composition⁴] The feature table from which samples should be filtered.                                    [required]" name="itable" optional="False" type="data" />
+    <param label="--p-min-frequency: INTEGER The minimum total frequency that a sample 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 sample 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-features: INTEGER The minimum number of features that a sample must have to be retained.                            [default: 0]" name="pminfeatures" optional="True" type="integer" value="0" />
+    <param label="--p-max-features: INTEGER The maximum number of features that a sample can have to be retained. If no value is provided this will default to infinity (i.e., no maximum feature filter will be applied).                            [optional]" name="pmaxfeatures" 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          Sample metadata used with `where` parameter when arguments will    selecting samples to retain, or with `exclude-ids` when be merged)        selecting samples to discard.                [optional]" name="additional_input" optional="True" type="data" />
+    </repeat>
+    <param label="--p-where: TEXT       SQLite WHERE clause specifying sample metadata criteria that must be met to be included in the filtered feature table. If not provided, all samples 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 samples 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 samples from table
+###############################################################
+
+Filter samples from table based on frequency and/or metadata. Any features
+with a frequency of zero after sample filtering will also be removed. See
+the filtering tutorial on https://docs.qiime2.org for additional details.
+
+Parameters
+----------
+table : FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³ | Composition⁴]
+    The feature table from which samples should be filtered.
+min_frequency : Int, optional
+    The minimum total frequency that a sample must have to be retained.
+max_frequency : Int, optional
+    The maximum total frequency that a sample 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_features : Int, optional
+    The minimum number of features that a sample must have to be retained.
+max_features : Int, optional
+    The maximum number of features that a sample can have to be retained.
+    If no value is provided this will default to infinity (i.e., no maximum
+    feature filter will be applied).
+metadata : Metadata, optional
+    Sample metadata used with `where` parameter when selecting samples to
+    retain, or with `exclude_ids` when selecting samples to discard.
+where : Str, optional
+    SQLite WHERE clause specifying sample metadata criteria that must be
+    met to be included in the filtered feature table. If not provided, all
+    samples in `metadata` that are also in the feature table will be
+    retained.
+exclude_ids : Bool, optional
+    If true, the samples selected by `metadata` or `where` parameters will
+    be excluded from the filtered table instead of being retained.
+
+Returns
+-------
+filtered_table : FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³ | Composition⁴]
+    The resulting feature table filtered by sample.
+  ]]></help>
+  <macros>
+    <import>qiime_citation.xml</import>
+  </macros>
+  <expand macro="qiime_citation"/>
+</tool>
\ No newline at end of file