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