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

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