annotate qiime2-2020.8/qiime_sample-classifier_classify-samples-from-dist.xml @ 24:272b7509a98b draft

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