annotate qiime2/qiime_sample-classifier_split-table.xml @ 29:3ba9833030c1 draft

Uploaded
author florianbegusch
date Fri, 04 Sep 2020 13:12:49 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
1 <?xml version="1.0" ?>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
2 <tool id="qiime_sample-classifier_split-table" name="qiime sample-classifier split-table"
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
3 version="2020.8">
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
4 <description>Split a feature table into training and testing sets.</description>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
5 <requirements>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
6 <requirement type="package" version="2020.8">qiime2</requirement>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
7 </requirements>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
8 <command><![CDATA[
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
9 qiime sample-classifier split-table
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
10
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
11 --i-table=$itable
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
12 # if $input_files_mmetadatafile:
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
13 # def list_dict_to_string(list_dict):
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
14 # set $file_list = list_dict[0]['additional_input'].__getattr__('file_name')
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
15 # for d in list_dict[1:]:
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
16 # set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name')
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
17 # end for
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
18 # return $file_list
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
19 # end def
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
20 --m-metadata-file=$list_dict_to_string($input_files_mmetadatafile)
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
21 # end if
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
22
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
23 #if '__ob__' in str($mmetadatacolumn):
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
24 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__ob__', '[')
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
25 #set $mmetadatacolumn = $mmetadatacolumn_temp
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
26 #end if
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
27 #if '__cb__' in str($mmetadatacolumn):
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
28 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__cb__', ']')
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
29 #set $mmetadatacolumn = $mmetadatacolumn_temp
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
30 #end if
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
31 #if 'X' in str($mmetadatacolumn):
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
32 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('X', '\\')
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
33 #set $mmetadatacolumn = $mmetadatacolumn_temp
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
34 #end if
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
35 #if '__sq__' in str($mmetadatacolumn):
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
36 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__sq__', "'")
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
37 #set $mmetadatacolumn = $mmetadatacolumn_temp
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
38 #end if
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
39 #if '__db__' in str($mmetadatacolumn):
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
40 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__db__', '"')
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
41 #set $mmetadatacolumn = $mmetadatacolumn_temp
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
42 #end if
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
43
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
44 --m-metadata-column=$mmetadatacolumn
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
45
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
46
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
47 --p-test-size=$ptestsize
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
48
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
49 #if str($prandomstate):
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
50 --p-random-state=$prandomstate
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
51 #end if
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
52 #if $pnostratify:
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
53 --p-no-stratify
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
54 #end if
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
55
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
56 #if str($pmissingsamples) != 'None':
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
57 --p-missing-samples=$pmissingsamples
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
58 #end if
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
59
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
60 --o-training-table=otrainingtable
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
61
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
62 --o-test-table=otesttable
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
63
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
64 #if str($examples) != 'None':
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
65 --examples=$examples
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
66 #end if
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
67
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
68 ;
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
69 cp otesttable.qza $otesttable
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
70
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
71 ]]></command>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
72 <inputs>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
73 <param format="qza,no_unzip.zip" label="--i-table: ARTIFACT FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³ | Balance⁴ | PercentileNormalized⁵ | Design⁶] Feature table containing all features that should be used for target prediction. [required]" name="itable" optional="False" type="data" />
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
74 <repeat name="input_files_mmetadatafile" optional="True" title="--m-metadata-file">
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
75 <param format="tabular,qza,no_unzip.zip" label="--m-metadata-file: METADATA" name="additional_input" optional="True" type="data" />
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
76 </repeat>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
77 <param label="--m-metadata-column: COLUMN MetadataColumn[Numeric | Categorical] Numeric metadata column to use as prediction target. [required]" name="mmetadatacolumn" optional="False" type="text" />
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
78 <param exclude_min="True" label="--p-test-size: PROPORTION Range(0.0, 1.0, inclusive_start=False) Fraction of input samples to exclude from training set and use for classifier testing. [default: 0.2]" max="1.0" min="0.0" name="ptestsize" optional="True" type="float" value="0.2" />
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
79 <param label="--p-random-state: INTEGER Seed used by random number generator. [optional]" name="prandomstate" optional="False" type="text" />
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
80 <param label="--p-no-stratify: Do not evenly stratify training and test data among metadata categories. If True, all values in column must match at least two samples. [default: True]" name="pnostratify" selected="False" type="boolean" />
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
81 <param label="--p-missing-samples: " name="pmissingsamples" optional="True" type="select">
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
82 <option selected="True" value="None">Selection is Optional</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
83 <option value="error">error</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
84 <option value="ignore">ignore</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
85 </param>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
86 <param label="--examples: Show usage examples and exit." name="examples" optional="False" type="data" />
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
87
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
88 </inputs>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
89
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
90 <outputs>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
91 <data format="qza" label="${tool.name} on ${on_string}: trainingtable.qza" name="otrainingtable" />
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
92 <data format="qza" label="${tool.name} on ${on_string}: testtable.qza" name="otesttable" />
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
93
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
94 </outputs>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
95
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
96 <help><![CDATA[
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
97 Split a feature table into training and testing sets.
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
98 ###############################################################
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
99
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
100 Split a feature table into training and testing sets. By default stratifies
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
101 training and test sets on a metadata column, such that values in that
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
102 column are evenly represented across training and test sets.
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
103
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
104 Parameters
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
105 ----------
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
106 table : FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³ | Balance⁴ | PercentileNormalized⁵ | Design⁶]
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
107 Feature table containing all features that should be used for target
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
108 prediction.
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
109 metadata : MetadataColumn[Numeric | Categorical]
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
110 Numeric metadata column to use as prediction target.
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
111 test_size : Float % Range(0.0, 1.0, inclusive_start=False), optional
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
112 Fraction of input samples to exclude from training set and use for
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
113 classifier testing.
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
114 random_state : Int, optional
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
115 Seed used by random number generator.
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
116 stratify : Bool, optional
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
117 Evenly stratify training and test data among metadata categories. If
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
118 True, all values in column must match at least two samples.
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
119 missing_samples : Str % Choices('error', 'ignore'), optional
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
120 How to handle missing samples in metadata. "error" will fail if missing
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
121 samples are detected. "ignore" will cause the feature table and
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
122 metadata to be filtered, so that only samples found in both files are
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
123 retained.
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
124
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
125 Returns
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
126 -------
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
127 training_table : FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³ | Balance⁴ | PercentileNormalized⁵ | Design⁶]
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
128 Feature table containing training samples
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
129 test_table : FeatureTable[Frequency¹ | RelativeFrequency² | PresenceAbsence³ | Balance⁴ | PercentileNormalized⁵ | Design⁶]
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
130 Feature table containing test samples
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
131 ]]></help>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
132 <macros>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
133 <import>qiime_citation.xml</import>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
134 </macros>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
135 <expand macro="qiime_citation"/>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
136 </tool>