comparison qiime2-2020.8/qiime_sample-classifier_classify-samples-from-dist.xml @ 0:5c352d975ef7 draft

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