annotate qiime2/qiime_sample-classifier_split-table.xml @ 0:370e0b6e9826 draft

Uploaded
author florianbegusch
date Wed, 17 Jul 2019 03:05:17 -0400
parents
children 914fa4daf16a
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" ?>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
2 <tool id="qiime_sample-classifier_split-table" name="qiime sample-classifier split-table" version="2019.4">
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
3 <description> - Split a feature table into training and testing sets.</description>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
4 <requirements>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
5 <requirement type="package" version="2019.4">qiime2</requirement>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
6 </requirements>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
7 <command><![CDATA[
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
8 qiime sample-classifier split-table
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
9
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
10 --i-table=$itable
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
11 --m-metadata-column="$mmetadatacolumn"
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
12
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
13
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
14
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
15 #if $input_files_mmetadatafile:
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
16 #def list_dict_to_string(list_dict):
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
17 #set $file_list = list_dict[0]['additional_input'].__getattr__('file_name')
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
18 #for d in list_dict[1:]:
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
19 #set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name')
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
20 #end for
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
21 #return $file_list
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
22 #end def
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
23
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
24 --m-metadata-file=$list_dict_to_string($input_files_mmetadatafile)
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
25 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
26
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
27
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
28
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
29 #if $ptestsize:
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
30 --p-test-size=$ptestsize
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
31 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
32
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
33 #if str($prandomstate):
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
34 --p-random-state="$prandomstate"
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
35 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
36
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
37 #if $pnostratify:
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
38 --p-no-stratify
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
39 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
40
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
41 #if str($pmissingsamples) != 'None':
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
42 --p-missing-samples=$pmissingsamples
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
43 #end if
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
44
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
45 --o-training-table=otrainingtable
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
46 --o-test-table=otesttable
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
47 ;
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
48 cp otrainingtable.qza $otrainingtable;
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
49 cp otesttable.qza $otesttable;
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
50 cp mmetadatafile.qza $mmetadatafile
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
51 ]]></command>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
52 <inputs>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
53 <param format="qza,no_unzip.zip" label="--i-table: ARTIFACT FeatureTable[Frequency] Feature table containing all features that should be used for target prediction. [required]" name="itable" optional="False" type="data"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
54 <param label="--m-metadata-column: COLUMN MetadataColumn[Numeric | Categorical] Numeric metadata column to use as prediction target. [required]" name="mmetadatacolumn" optional="False" type="text"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
55 <param 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]" name="ptestsize" optional="True" type="float" value="0.2" min="0" max="1" exclusive_end="True"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
56 <param label="--p-random-state: INTEGER Seed used by random number generator. [optional]" name="prandomstate" optional="True" type="integer"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
57 <param label="--p-no-stratify: Evenly stratify training and test data among metadata categories. If True, all values in column must match at least two samples. [default: False]" name="pnostratify" selected="False" type="boolean"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
58 <param label="--p-missing-samples: " name="pmissingsamples" optional="True" type="select">
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
59 <option selected="True" value="None">Selection is Optional</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
60 <option value="error">error</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
61 <option value="ignore">ignore</option>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
62 </param>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
63
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
64 <repeat name="input_files_mmetadatafile" optional="True" title="--m-metadata-file">
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
65 <param label="--m-metadata-file: Metadata file or artifact viewable as metadata. This option may be supplied multiple times to merge metadata. [optional]" name="additional_input" type="data" format="tabular,qza,no_unzip.zip" />
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
66 </repeat>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
67
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
68 </inputs>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
69 <outputs>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
70 <data format="qza" label="${tool.name} on ${on_string}: trainingtable.qza" name="otrainingtable"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
71 <data format="qza" label="${tool.name} on ${on_string}: testtable.qza" name="otesttable"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
72 </outputs>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
73 <help><![CDATA[
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
74 Split a feature table into training and testing sets.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
75 #####################################################
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
76
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
77 Split a feature table into training and testing sets. By default stratifies
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
78 training and test sets on a metadata column, such that values in that
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
79 column are evenly represented across training and test sets.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
80
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
81 Parameters
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
82 ----------
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
83 table : FeatureTable[Frequency]
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
84 Feature table containing all features that should be used for target
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
85 prediction.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
86 metadata : MetadataColumn[Numeric | Categorical]
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
87 Numeric metadata column to use as prediction target.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
88 test_size : Float % Range(0.0, 1.0, inclusive_start=False), optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
89 Fraction of input samples to exclude from training set and use for
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
90 classifier testing.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
91 random_state : Int, optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
92 Seed used by random number generator.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
93 stratify : Bool, optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
94 Evenly stratify training and test data among metadata categories. If
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
95 True, all values in column must match at least two samples.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
96 missing_samples : Str % Choices('error', 'ignore'), optional
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
97 How to handle missing samples in metadata. "error" will fail if missing
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
98 samples are detected. "ignore" will cause the feature table and
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
99 metadata to be filtered, so that only samples found in both files are
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
100 retained.
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
101
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
102 Returns
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
103 -------
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
104 training_table : FeatureTable[Frequency]
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
105 Feature table containing training samples
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
106 test_table : FeatureTable[Frequency]
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
107 Feature table containing test samples
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
108 ]]></help>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
109 <macros>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
110 <import>qiime_citation.xml</import>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
111 </macros>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
112 <expand macro="qiime_citation"/>
370e0b6e9826 Uploaded
florianbegusch
parents:
diff changeset
113 </tool>