comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:370e0b6e9826
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 cp mmetadatafile.qza $mmetadatafile
51 ]]></command>
52 <inputs>
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"/>
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"/>
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"/>
56 <param label="--p-random-state: INTEGER Seed used by random number generator. [optional]" name="prandomstate" optional="True" type="integer"/>
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"/>
58 <param label="--p-missing-samples: " name="pmissingsamples" optional="True" type="select">
59 <option selected="True" value="None">Selection is Optional</option>
60 <option value="error">error</option>
61 <option value="ignore">ignore</option>
62 </param>
63
64 <repeat name="input_files_mmetadatafile" optional="True" title="--m-metadata-file">
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" />
66 </repeat>
67
68 </inputs>
69 <outputs>
70 <data format="qza" label="${tool.name} on ${on_string}: trainingtable.qza" name="otrainingtable"/>
71 <data format="qza" label="${tool.name} on ${on_string}: testtable.qza" name="otesttable"/>
72 </outputs>
73 <help><![CDATA[
74 Split a feature table into training and testing sets.
75 #####################################################
76
77 Split a feature table into training and testing sets. By default stratifies
78 training and test sets on a metadata column, such that values in that
79 column are evenly represented across training and test sets.
80
81 Parameters
82 ----------
83 table : FeatureTable[Frequency]
84 Feature table containing all features that should be used for target
85 prediction.
86 metadata : MetadataColumn[Numeric | Categorical]
87 Numeric metadata column to use as prediction target.
88 test_size : Float % Range(0.0, 1.0, inclusive_start=False), optional
89 Fraction of input samples to exclude from training set and use for
90 classifier testing.
91 random_state : Int, optional
92 Seed used by random number generator.
93 stratify : Bool, optional
94 Evenly stratify training and test data among metadata categories. If
95 True, all values in column must match at least two samples.
96 missing_samples : Str % Choices('error', 'ignore'), optional
97 How to handle missing samples in metadata. "error" will fail if missing
98 samples are detected. "ignore" will cause the feature table and
99 metadata to be filtered, so that only samples found in both files are
100 retained.
101
102 Returns
103 -------
104 training_table : FeatureTable[Frequency]
105 Feature table containing training samples
106 test_table : FeatureTable[Frequency]
107 Feature table containing test samples
108 ]]></help>
109 <macros>
110 <import>qiime_citation.xml</import>
111 </macros>
112 <expand macro="qiime_citation"/>
113 </tool>