annotate qiime2-2020.8/qiime_sample-classifier_split-table.xml @ 0:5c352d975ef7 draft

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