annotate qiime2/qiime_sample-classifier_split-table.xml @ 16:5021f9d76de4 draft

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