annotate qiime2/qiime_sample-classifier_classify-samples-from-dist.xml @ 29:3ba9833030c1 draft

Uploaded
author florianbegusch
date Fri, 04 Sep 2020 13:12:49 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
1 <?xml version="1.0" ?>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
2 <tool id="qiime_sample-classifier_classify-samples-from-dist" name="qiime sample-classifier classify-samples-from-dist"
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
3 version="2020.8">
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
4 <description>Run k-nearest-neighbors on a labeled distance matrix.</description>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
5 <requirements>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
6 <requirement type="package" version="2020.8">qiime2</requirement>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
7 </requirements>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
8 <command><![CDATA[
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
9 qiime sample-classifier classify-samples-from-dist
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
10
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
11 --i-distance-matrix=$idistancematrix
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
12 # if $input_files_mmetadatafile:
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
13 # def list_dict_to_string(list_dict):
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
14 # set $file_list = list_dict[0]['additional_input'].__getattr__('file_name')
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
15 # for d in list_dict[1:]:
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
16 # set $file_list = $file_list + ' --m-metadata-file=' + d['additional_input'].__getattr__('file_name')
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
17 # end for
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
18 # return $file_list
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
19 # end def
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
20 --m-metadata-file=$list_dict_to_string($input_files_mmetadatafile)
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
21 # end if
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
22
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
23 #if '__ob__' in str($mmetadatacolumn):
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
24 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__ob__', '[')
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
25 #set $mmetadatacolumn = $mmetadatacolumn_temp
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
26 #end if
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
27 #if '__cb__' in str($mmetadatacolumn):
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
28 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__cb__', ']')
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
29 #set $mmetadatacolumn = $mmetadatacolumn_temp
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
30 #end if
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
31 #if 'X' in str($mmetadatacolumn):
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
32 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('X', '\\')
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
33 #set $mmetadatacolumn = $mmetadatacolumn_temp
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
34 #end if
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
35 #if '__sq__' in str($mmetadatacolumn):
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
36 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__sq__', "'")
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
37 #set $mmetadatacolumn = $mmetadatacolumn_temp
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
38 #end if
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
39 #if '__db__' in str($mmetadatacolumn):
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
40 #set $mmetadatacolumn_temp = $mmetadatacolumn.replace('__db__', '"')
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
41 #set $mmetadatacolumn = $mmetadatacolumn_temp
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
42 #end if
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
43
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
44 --m-metadata-column=$mmetadatacolumn
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
45
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
46
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
47 --p-k=$pk
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
48
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
49 #if str($ppalette) != 'None':
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
50 --p-palette=$ppalette
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
51 #end if
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
52
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
53 --o-predictions=opredictions
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
54
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
55 --o-accuracy-results=oaccuracyresults
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
56
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
57 #if str($examples) != 'None':
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
58 --examples=$examples
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
59 #end if
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
60
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
61 ;
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
62 cp opredictions.qza $opredictions
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
63
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
64 ;
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
65 qiime tools export oaccuracyresults.qzv --output-path out
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
66 && mkdir -p '$oaccuracyresults.files_path'
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
67 && cp -r out/* '$oaccuracyresults.files_path'
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
68 && mv '$oaccuracyresults.files_path/index.html' '$oaccuracyresults'
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
69
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
70 ]]></command>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
71 <inputs>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
72 <param format="qza,no_unzip.zip" label="--i-distance-matrix: ARTIFACT DistanceMatrix a distance matrix [required]" name="idistancematrix" optional="False" type="data" />
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
73 <repeat name="input_files_mmetadatafile" optional="True" title="--m-metadata-file">
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
74 <param format="tabular,qza,no_unzip.zip" label="--m-metadata-file: METADATA" name="additional_input" optional="True" type="data" />
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
75 </repeat>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
76 <param label="--m-metadata-column: COLUMN MetadataColumn[Categorical] Categorical metadata column to use as prediction target. [required]" name="mmetadatacolumn" optional="False" type="text" />
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
77 <param label="--p-k: INTEGER Number of nearest neighbors [default: 1]" name="pk" optional="True" type="integer" value="1" />
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
78 <param label="--p-palette: " name="ppalette" optional="True" type="select">
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
79 <option selected="True" value="None">Selection is Optional</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
80 <option value="YellowOrangeBrown">YellowOrangeBrown</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
81 <option value="YellowOrangeRed">YellowOrangeRed</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
82 <option value="OrangeRed">OrangeRed</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
83 <option value="PurpleRed">PurpleRed</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
84 <option value="RedPurple">RedPurple</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
85 <option value="BluePurple">BluePurple</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
86 <option value="GreenBlue">GreenBlue</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
87 <option value="PurpleBlue">PurpleBlue</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
88 <option value="YellowGreen">YellowGreen</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
89 <option value="summer">summer</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
90 <option value="copper">copper</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
91 <option value="viridis">viridis</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
92 <option value="cividis">cividis</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
93 <option value="plasma">plasma</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
94 <option value="inferno">inferno</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
95 <option value="magma">magma</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
96 <option value="sirocco">sirocco</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
97 <option value="drifting">drifting</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
98 <option value="melancholy">melancholy</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
99 <option value="enigma">enigma</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
100 <option value="eros">eros</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
101 <option value="spectre">spectre</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
102 <option value="ambition">ambition</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
103 <option value="mysteriousstains">mysteriousstains</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
104 <option value="daydream">daydream</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
105 <option value="solano">solano</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
106 <option value="navarro">navarro</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
107 <option value="dandelions">dandelions</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
108 <option value="deepblue">deepblue</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
109 <option value="verve">verve</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
110 <option value="greyscale">greyscale</option>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
111 </param>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
112 <param label="--examples: Show usage examples and exit." name="examples" optional="False" type="data" />
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
113
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
114 </inputs>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
115
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
116 <outputs>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
117 <data format="qza" label="${tool.name} on ${on_string}: predictions.qza" name="opredictions" />
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
118 <data format="html" label="${tool.name} on ${on_string}: accuracyresults.html" name="oaccuracyresults" />
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
119
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
120 </outputs>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
121
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
122 <help><![CDATA[
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
123 Run k-nearest-neighbors on a labeled distance matrix.
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
124 ###############################################################
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
125
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
126 Run k-nearest-neighbors on a labeled distance matrix. Return cross-
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
127 validated (leave one out) predictions and accuracy. k = 1 by default
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
128
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
129 Parameters
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
130 ----------
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
131 distance_matrix : DistanceMatrix
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
132 a distance matrix
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
133 metadata : MetadataColumn[Categorical]
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
134 Categorical metadata column to use as prediction target.
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
135 k : Int, optional
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
136 Number of nearest neighbors
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
137 palette : Str % Choices('YellowOrangeBrown', 'YellowOrangeRed', 'OrangeRed', 'PurpleRed', 'RedPurple', 'BluePurple', 'GreenBlue', 'PurpleBlue', 'YellowGreen', 'summer', 'copper', 'viridis', 'cividis', 'plasma', 'inferno', 'magma', 'sirocco', 'drifting', 'melancholy', 'enigma', 'eros', 'spectre', 'ambition', 'mysteriousstains', 'daydream', 'solano', 'navarro', 'dandelions', 'deepblue', 'verve', 'greyscale'), optional
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
138 The color palette to use for plotting.
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
139
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
140 Returns
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
141 -------
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
142 predictions : SampleData[ClassifierPredictions]
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
143 leave one out predictions for each sample
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
144 accuracy_results : Visualization
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
145 Accuracy results visualization.
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
146 ]]></help>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
147 <macros>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
148 <import>qiime_citation.xml</import>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
149 </macros>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
150 <expand macro="qiime_citation"/>
3ba9833030c1 Uploaded
florianbegusch
parents:
diff changeset
151 </tool>