annotate qiime2-2020.8/qiime_sample-classifier_split-table.xml @ 20:d93d8888f0b0 draft

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