comparison cluster_reduce_dimension.xml @ 17:178242b82297 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/scanpy/ commit 91121b1e72696f17478dae383badaa71e9f96dbb
author iuc
date Sat, 14 Sep 2024 12:45:46 +0000
parents 4d8f983cd751
children
comparison
equal deleted inserted replaced
16:f9353ee6a0d4 17:178242b82297
1 <tool id="scanpy_cluster_reduce_dimension" name="Cluster, infer trajectories and embed" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@profile@"> 1 <tool id="scanpy_cluster_reduce_dimension" name="Scanpy cluster, embed" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description>with scanpy</description> 2 <description>and infer trajectories</description>
3 <macros> 3 <macros>
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 <xml name="pca_inputs"> 5 <xml name="pca_inputs">
6 <param argument="n_comps" type="integer" min="0" value="50" label="Number of principal components to compute" help="If the value is larger than the number of observations the number of observations is used instead"/> 6 <param argument="n_comps" type="integer" min="0" value="50" label="Number of principal components to compute" help="If the value is larger than the number of observations the number of observations is used instead"/>
7 <param argument="dtype" type="text" value="float32" label="Numpy data type string to which to convert the result" help=""> 7 <param argument="layer" type="text" value="" optional="true" label="If provided, which element of layers to use for PCA">
8 <expand macro="sanitize_query" /> 8 <expand macro="sanitize_query"/>
9 </param>
10 <param argument="dtype" type="select" label="Numpy data type string to which to convert the result">
11 <option value="float32" selected="true">float32</option>
12 <option value="int32">int32</option>
13 <option value="int64">int64</option>
14 <option value="uint32">uint32</option>
15 <option value="uint64">uint64</option>
16 <option value="float16">float16</option>
17 <option value="float64">float64</option>
9 </param> 18 </param>
10 <conditional name="pca"> 19 <conditional name="pca">
11 <param argument="chunked" type="select" label="Type of PCA?"> 20 <param argument="chunked" type="select" label="Type of PCA?">
21 <option value="False" selected="true">Full PCA</option>
12 <option value="True">Incremental PCA on segments (incremental PCA automatically zero centers and ignores settings of 'random_seed' and 'svd_solver')</option> 22 <option value="True">Incremental PCA on segments (incremental PCA automatically zero centers and ignores settings of 'random_seed' and 'svd_solver')</option>
13 <option value="False" selected="true">Full PCA</option>
14 </param> 23 </param>
15 <when value="True"> 24 <when value="True">
16 <param argument="chunk_size" type="integer" min="0" value="" label="chunk_size" help="Number of observations to include in each chunk"/> 25 <param argument="chunk_size" type="integer" min="0" value="" label="chunk_size" help="Number of observations to include in each chunk"/>
17 </when> 26 </when>
18 <when value="False"> 27 <when value="False">
19 <param argument="zero_center" type="boolean" truevalue="True" falsevalue="False" checked="true" 28 <param argument="zero_center" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Compute standard PCA from covariance matrix?" help="If not, it omits zero-centering variables (uses *TruncatedSVD* from scikit-learn), which allows to handle sparse input efficiently."/>
20 label="Compute standard PCA from covariance matrix?"
21 help="If not, it omits zero-centering variables (uses *TruncatedSVD* from scikit-learn), which allows to handle sparse input efficiently."/>
22 <expand macro="svd_solver"/> 29 <expand macro="svd_solver"/>
23 <param argument="random_state" type="integer" value="0" label="Initial states for the optimization" help=""/> 30 <param argument="random_state" type="integer" value="0" label="Change to use different initial states for the optimization"/>
24 </when> 31 </when>
25 </conditional> 32 </conditional>
26 <param argument="use_highly_variable" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Use highly variable genes only?" help="They should be use if they have been determined beforehand."/> 33 <param argument="mask_var" type="text" value="" optional="true" label="To run only on a certain set of genes given by a string referring to an array in" help="By default, uses .var['highly_variable'] if available, else everything"/>
27 </xml> 34 </xml>
28 <xml name="param_random_state"> 35 <xml name="param_random_state">
29 <param argument="random_state" type="integer" value="0" label="Random state" help="Change the initialization of the optimization."/> 36 <param argument="random_state" type="integer" value="0" label="Random state" help="Change the initialization of the optimization."/>
30 </xml> 37 </xml>
31 <xml name="param_use_weights"> 38 <xml name="param_use_weights" token_checked="">
32 <param argument="use_weights" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Use weights from knn graph?"/> 39 <param argument="use_weights" type="boolean" truevalue="True" falsevalue="False" checked="@CHECKED@" label="Use weights from knn graph?"/>
33 </xml> 40 </xml>
34 <token name="@CMD_pca_help@"><![CDATA[ 41 <token name="@CMD_PCA_HELP@"><![CDATA[
35 The PCA is computed using the implementation of *scikit-learn*. 42 The PCA is computed using the implementation of *scikit-learn*.
36 43
37 The returned AnnData object contains: 44 The returned AnnData object contains:
38 45
39 - PCA coordinates in the multi-dimensional observation annotation (obsm) 46 - PCA coordinates in the multi-dimensional observation annotation (obsm)
41 - The variance decomposition in the unstructured annotation (uns) 48 - The variance decomposition in the unstructured annotation (uns)
42 - Ratio of explained variance for PCA (variance) 49 - Ratio of explained variance for PCA (variance)
43 - Explained variance, equivalent to the eigenvalues of the covariance matrix 50 - Explained variance, equivalent to the eigenvalues of the covariance matrix
44 51
45 This data is accessible using the inspect tool for AnnData 52 This data is accessible using the inspect tool for AnnData
46 ]]></token> 53 ]]>
47 <token name="@CMD_pca_params@"><![CDATA[ 54 </token>
48 data=adata,
49 n_comps=min($method.n_comps, adata.n_vars),
50 dtype='$method.dtype',
51 copy=False,
52 chunked=$method.pca.chunked,
53 #if $method.pca.chunked == 'True'
54 chunk_size=$method.pca.chunk_size,
55 #else
56 zero_center=$method.pca.zero_center,
57 svd_solver='$method.pca.svd_solver',
58 random_state=$method.pca.random_state,
59 #end if
60 use_highly_variable=$method.use_highly_variable
61 ]]></token>
62 </macros> 55 </macros>
63 <expand macro="bio_tools"/> 56 <expand macro="bio_tools"/>
64 <expand macro="requirements"> 57 <expand macro="requirements">
58 <requirement type="package" version="0.5.6">umap-learn</requirement>
59 <requirement type="package" version="0.10.2">leidenalg</requirement>
60 <requirement type="package" version="0.8.2">louvain</requirement>
61 <requirement type="package" version="1.5.1">scikit-learn</requirement>
65 </expand> 62 </expand>
66 <expand macro="version_command"/> 63 <expand macro="version_command"/>
67 <command detect_errors="exit_code"><![CDATA[ 64 <command detect_errors="exit_code"><![CDATA[
68 @CMD@ 65 @CMD@
69 ]]></command> 66 ]]>
67 </command>
70 <configfiles> 68 <configfiles>
71 <configfile name="script_file"><![CDATA[ 69 <configfile name="script_file"><![CDATA[
72 @CMD_imports@ 70 @CMD_IMPORTS@
73 @CMD_read_inputs@ 71 @CMD_READ_INPUTS@
74 72
75 #if $method.method == 'tl.louvain' 73 #if $method.method == 'tl.louvain'
76 sc.tl.louvain( 74 sc.tl.louvain(
77 adata=adata, 75 adata=adata,
78 flavor = '$method.flavor.flavor', 76 flavor = '$method.flavor.flavor',
81 #end if 79 #end if
82 random_state=$method.random_state, 80 random_state=$method.random_state,
83 key_added='$method.key_added', 81 key_added='$method.key_added',
84 directed=$method.directed, 82 directed=$method.directed,
85 use_weights=$method.use_weights, 83 use_weights=$method.use_weights,
84 @CMD_PARAM_NEIGHBORS_KEY@
86 copy=False) 85 copy=False)
87 86
88 #else if $method.method == 'tl.leiden' 87 #else if $method.method == 'tl.leiden'
89 sc.tl.leiden( 88 sc.tl.leiden(
90 adata=adata, 89 adata=adata,
91 resolution=$method.resolution, 90 resolution=$method.resolution,
92 random_state=$method.random_state, 91 random_state=$method.random_state,
93 key_added='$method.key_added', 92 key_added='$method.key_added',
93 directed=$method.directed,
94 use_weights=$method.use_weights, 94 use_weights=$method.use_weights,
95 n_iterations=$method.n_iterations, 95 n_iterations=$method.n_iterations,
96 @CMD_PARAM_NEIGHBORS_KEY@
97 flavor='$method.flavor',
96 copy=False) 98 copy=False)
97 99
98 #else if $method.method == 'pp.pca' 100 #else if $method.method == 'pp.pca'
99 sc.pp.pca(@CMD_pca_params@) 101 sc.pp.pca(
100 102 data=adata,
101 #else if $method.method == 'tl.pca' 103 n_comps=min($method.n_comps, adata.n_vars-1),
102 sc.tl.pca(@CMD_pca_params@) 104 #if $method.layer != ''
105 layer='$method.layer',
106 #end if
107 dtype='$method.dtype',
108 chunked=$method.pca.chunked,
109 #if $method.pca.chunked == 'True'
110 chunk_size=$method.pca.chunk_size,
111 #else
112 zero_center=$method.pca.zero_center,
113 #if $method.pca.svd_solver != ''
114 svd_solver='$method.pca.svd_solver',
115 #end if
116 random_state=$method.pca.random_state,
117 #end if
118 #if $method.mask_var != ''
119 mask_var='$method.mask_var',
120 #end if
121 copy=False)
103 122
104 #else if $method.method == 'tl.diffmap' 123 #else if $method.method == 'tl.diffmap'
105 sc.tl.diffmap( 124 sc.tl.diffmap(
106 adata=adata, 125 adata=adata,
107 n_comps=min($method.n_comps, adata.n_vars), 126 n_comps=min($method.n_comps, adata.n_vars-1),
127 random_state=$method.random_state,
128 @CMD_PARAM_NEIGHBORS_KEY@
108 copy =False) 129 copy =False)
109 130
110 #else if $method.method == 'tl.tsne' 131 #else if $method.method == 'tl.tsne'
132 import os
111 sc.tl.tsne( 133 sc.tl.tsne(
112 adata=adata, 134 adata=adata,
113 #if str($method.n_pcs) != '' 135 #if str($method.n_pcs) != ''
114 n_pcs=$method.n_pcs, 136 n_pcs=$method.n_pcs,
115 #end if 137 #end if
138 #if $method.use_rep != ''
139 use_rep='$method.use_rep',
140 #end if
116 perplexity=$method.perplexity, 141 perplexity=$method.perplexity,
142 metric='$method.metric',
117 early_exaggeration=$method.early_exaggeration, 143 early_exaggeration=$method.early_exaggeration,
118 learning_rate=$method.learning_rate, 144 learning_rate=$method.learning_rate,
119 random_state=$method.random_state, 145 random_state=$method.random_state,
120 use_fast_tsne=$method.use_fast_tsne, 146 n_jobs = int(os.getenv("GALAXY_SLOTS", 4)),
121 copy=False) 147 copy=False)
122 148
123 #else if $method.method == 'tl.umap' 149 #else if $method.method == 'tl.umap'
124 sc.tl.umap( 150 sc.tl.umap(
125 adata=adata, 151 adata=adata,
132 alpha=$method.alpha, 158 alpha=$method.alpha,
133 gamma=$method.gamma, 159 gamma=$method.gamma,
134 negative_sample_rate=$method.negative_sample_rate, 160 negative_sample_rate=$method.negative_sample_rate,
135 init_pos='$method.init_pos', 161 init_pos='$method.init_pos',
136 random_state=$method.random_state, 162 random_state=$method.random_state,
163 @CMD_PARAM_NEIGHBORS_KEY@
137 copy=False) 164 copy=False)
138 165
139 #else if $method.method == 'tl.draw_graph' 166 #else if $method.method == 'tl.draw_graph'
140 #if str($method.adjacency) != 'None' 167 #if str($method.adjacency) != 'None'
141 from scipy import io 168 from scipy import io
143 #end if 170 #end if
144 171
145 sc.tl.draw_graph( 172 sc.tl.draw_graph(
146 adata=adata, 173 adata=adata,
147 layout='$method.layout', 174 layout='$method.layout',
148 #if $method.root 175 #if str($method.root)
149 #set $root=([int(x.strip()) for x in str($method.root).split(',')]) 176 root=$method.root,
150 root=$root, 177 #end if
151 #end if
152 random_state=$method.random_state, 178 random_state=$method.random_state,
153 #if $method.init_pos
154 init_pos='$method.init_pos',
155 #end if
156 #if str($method.adjacency) != 'None' 179 #if str($method.adjacency) != 'None'
157 adjacency=adjacency, 180 adjacency=adjacency,
158 #end if 181 #end if
159 #if $method.key_ext 182 #if $method.key_added_ext != ''
160 key_ext='$method.key_ext', 183 key_added_ext='$method.key_added_ext',
161 #end if 184 #end if
162 copy=False) 185 #if $method.init_pos != ''
163 186 init_pos='$method.init_pos',
164 #else if $method.method == "tl.paga" 187 #end if
165 sc.tl.paga( 188 @CMD_PARAM_NEIGHBORS_KEY@
166 adata=adata,
167 groups='$method.groups',
168 use_rna_velocity=$method.use_rna_velocity,
169 model='$method.model',
170 copy=False) 189 copy=False)
171 190
172 #else if $method.method == "tl.dpt" 191 #else if $method.method == "tl.dpt"
173 sc.tl.dpt( 192 sc.tl.dpt(
174 adata=adata, 193 adata=adata,
175 n_dcs=$method.n_dcs, 194 n_dcs=$method.n_dcs,
176 n_branchings=$method.n_branchings, 195 n_branchings=$method.n_branchings,
177 min_group_size=$method.min_group_size, 196 min_group_size=$method.min_group_size,
178 allow_kendall_tau_shift=$method.allow_kendall_tau_shift, 197 allow_kendall_tau_shift=$method.allow_kendall_tau_shift,
198 @CMD_PARAM_NEIGHBORS_KEY@
199 copy=False)
200
201 #else if $method.method == "tl.paga"
202 sc.tl.paga(
203 adata=adata,
204 #if $method.groups != '':
205 groups='$method.groups',
206 #end if
207 use_rna_velocity=$method.use_rna_velocity,
208 model='$method.model',
209 @CMD_PARAM_NEIGHBORS_KEY@
179 copy=False) 210 copy=False)
180 211
181 #else if $method.method == "tl.embedding_density" 212 #else if $method.method == "tl.embedding_density"
182 sc.tl.embedding_density( 213 sc.tl.embedding_density(
183 adata=adata, 214 adata=adata,
184 basis='$method.basis', 215 basis='$method.basis',
185 #if $method.groupby 216 #if $method.groupby != ''
186 groupby='$method.groupby', 217 groupby='$method.groupby',
218 #end if
219 #if $method.key_added != ''
220 key_added='$method.key_added',
221 #end if
222 )
223
187 #end if 224 #end if
188 #if $method.key_added 225
189 key_added='$method.key_added', 226 @CMD_ANNDATA_WRITE_OUTPUTS@
190 #end if 227 ]]>
191 ) 228 </configfile>
192
193 #end if
194
195 @CMD_anndata_write_outputs@
196 ]]></configfile>
197 </configfiles> 229 </configfiles>
198 <inputs> 230 <inputs>
199 <expand macro="inputs_anndata"/> 231 <expand macro="inputs_anndata"/>
200 <conditional name="method"> 232 <conditional name="method">
201 <param argument="method" type="select" label="Method used"> 233 <param argument="method" type="select" label="Method used">
202 <option value="tl.louvain">Cluster cells into subgroups, using 'tl.louvain'</option> 234 <option value="tl.louvain">Cluster cells into subgroups, using 'tl.louvain'</option>
203 <option value="tl.leiden">Cluster cells into subgroups, using 'tl.leiden'</option> 235 <option value="tl.leiden">Cluster cells into subgroups, using 'tl.leiden'</option>
204 <option value="pp.pca">Computes PCA (principal component analysis) coordinates, loadings and variance decomposition, using 'pp.pca'</option> 236 <option value="pp.pca">Computes PCA (principal component analysis) coordinates, loadings and variance decomposition, using 'pp.pca'</option>
205 <option value="tl.pca">Computes PCA (principal component analysis) coordinates, loadings and variance decomposition, using 'tl.pca'</option>
206 <option value="tl.diffmap">Diffusion Maps, using 'tl.diffmap'</option> 237 <option value="tl.diffmap">Diffusion Maps, using 'tl.diffmap'</option>
207 <option value="tl.tsne">t-distributed stochastic neighborhood embedding (tSNE), using 'tl.tsne'</option> 238 <option value="tl.tsne">t-distributed stochastic neighborhood embedding (tSNE), using 'tl.tsne'</option>
208 <option value="tl.umap">Embed the neighborhood graph using UMAP, using 'tl.umap'</option> 239 <option value="tl.umap">Embed the neighborhood graph using UMAP, using 'tl.umap'</option>
209 <option value="tl.draw_graph">Force-directed graph drawing, using 'tl.draw_graph'</option> 240 <option value="tl.draw_graph">Force-directed graph drawing, using 'tl.draw_graph'</option>
210 <option value="tl.dpt">Infer progression of cells through geodesic distance along the graph, using 'tl.dpt'</option> 241 <option value="tl.dpt">Infer progression of cells through geodesic distance along the graph, using 'tl.dpt'</option>
211 <option value="tl.paga">Generate cellular maps of differentiation manifolds with complex topologies, using 'tl.paga'</option> 242 <option value="tl.paga">Generate cellular maps of differentiation manifolds with complex topologies, using 'tl.paga'</option>
212 <option value="tl.embedding_density">Calculate the density of cells in an embedding (per condition)</option> 243 <option value="tl.embedding_density">Calculate the density of cells in an embedding (per condition), using 'tl.embedding_density'</option>
213 </param> 244 </param>
214 <when value="tl.louvain"> 245 <when value="tl.louvain">
215 <conditional name="flavor"> 246 <conditional name="flavor">
216 <param argument="flavor" type="select" label="Flavor for the clustering" help=""> 247 <param argument="flavor" type="select" label="Flavor for the clustering">
217 <option value="vtraag">vtraag (much more powerful)</option> 248 <option value="vtraag" selected="true">vtraag (much more powerful than igraph)</option>
218 <option value="igraph">igraph</option> 249 <option value="igraph">Built in igraph method</option>
219 </param> 250 </param>
220 <when value="vtraag"> 251 <when value="vtraag">
221 <param argument="resolution" type="float" value="1.0" 252 <param argument="resolution" type="float" value="1.0" label="Resolution" help="Higher resolution means finding more and smaller clusters, which defaults to 1.0. See “Time as a resolution parameter” in Lambiotte et al, 2014"/>
222 label="Resolution"
223 help="Higher resolution means finding more and smaller clusters, which defaults to 1.0. See “Time as a resolution parameter” in Lambiotte et al, 2009"/>
224 </when> 253 </when>
225 <when value="igraph"/> 254 <when value="igraph"/>
226 </conditional> 255 </conditional>
227 <expand macro="param_random_state"/> 256 <expand macro="param_random_state"/>
228 <param argument="key_added" type="text" value="louvain" optional="true" label="Key under which to add the cluster labels" help=""> 257 <param argument="key_added" type="text" value="louvain" optional="true" label="Key under which to add the cluster labels">
229 <expand macro="sanitize_query" /> 258 <expand macro="sanitize_query"/>
230 </param> 259 </param>
231 <param argument="directed" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Interpret the adjacency matrix as directed graph?"/> 260 <param argument="directed" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Interpret the adjacency matrix as directed graph?"/>
232 <expand macro="param_use_weights"/> 261 <expand macro="param_use_weights" checked="false"/>
262 <expand macro="param_neighbors_key"/>
233 </when> 263 </when>
234 <when value="tl.leiden"> 264 <when value="tl.leiden">
235 <param argument="resolution" type="float" value="1" label="Coarseness of the clusterin" help="Higher values lead to more clusters"/> 265 <param argument="resolution" type="float" value="1" label="Coarseness of the clusterin" help="Higher values lead to more clusters"/>
236 <expand macro="param_random_state"/> 266 <expand macro="param_random_state"/>
237 <param argument="key_added" type="text" value="leiden" label="Key under which to add the cluster labels" help=""> 267 <param argument="key_added" type="text" value="leiden" label="Key under which to add the cluster labels">
238 <expand macro="sanitize_query" /> 268 <expand macro="sanitize_query"/>
239 </param> 269 </param>
240 <expand macro="param_use_weights"/> 270 <param argument="directed" type="boolean" truevalue="True" falsevalue="None" checked="false" label="Treat the graph as directed or undirected?"/>
271 <expand macro="param_use_weights" checked="true"/>
241 <param argument="n_iterations" type="integer" value="-1" label="How many iterations of the Leiden clustering algorithm to perform." help="Positive values above 2 define the total number of iterations to perform, -1 has the algorithm run until it reaches its optimal clustering."/> 272 <param argument="n_iterations" type="integer" value="-1" label="How many iterations of the Leiden clustering algorithm to perform." help="Positive values above 2 define the total number of iterations to perform, -1 has the algorithm run until it reaches its optimal clustering."/>
273 <expand macro="param_neighbors_key"/>
274 <param argument="flavor" type="select" label="Flavor for the clustering">
275 <option value="leidenalg" selected="true">leidenalg</option>
276 <option value="igraph">Built in igraph method</option>
277 </param>
242 </when> 278 </when>
243 <when value="pp.pca"> 279 <when value="pp.pca">
244 <expand macro="pca_inputs"/> 280 <expand macro="pca_inputs"/>
245 </when> 281 </when>
246 <when value="tl.pca">
247 <expand macro="pca_inputs"/>
248 </when>
249 <when value="tl.diffmap"> 282 <when value="tl.diffmap">
250 <param argument="n_comps" type="integer" min="0" value="15" optional="true" label="Number of dimensions of the representation" help=""/> 283 <param argument="n_comps" type="integer" min="0" value="15" optional="true" label="Number of dimensions of the representation"/>
284 <param argument="random_state" type="integer" value="0" label="Seed used by the random number generator"/>
285 <expand macro="param_neighbors_key"/>
251 </when> 286 </when>
252 <when value="tl.tsne"> 287 <when value="tl.tsne">
253 <param name="n_pcs" type="integer" min="0" value="" optional="true" label="Number of PCs to use" help=""/> 288 <param argument="n_pcs" type="integer" min="0" value="" optional="true" label="Number of PCs to use"/>
254 <param name="perplexity" type="float" value="30" label="Perplexity" help="The perplexity is related to the number of nearest neighbors that is used in other manifold learning algorithms. Larger datasets usually require a larger perplexity. Consider selecting a value between 5 and 50. The choice is not extremely critical since t-SNE is quite insensitive to this parameter."/> 289 <expand macro="param_use_rep"/>
255 <param name="early_exaggeration" type="float" value="12.0" label="Early exaggeration" help="Controls how tight natural clusters in the original space are in the embedded space and how much space will be between them. For larger values, the space between natural clusters will be larger in the embedded space. Again, the choice of this parameter is not very critical. If the cost function increases during initial optimization, the early exaggeration factor or the learning rate might be too high."/> 290 <param argument="perplexity" type="float" value="30" label="Perplexity" help="The perplexity is related to the number of nearest neighbors that is used in other manifold learning algorithms. Larger datasets usually require a larger perplexity. Consider selecting a value between 5 and 50. The choice is not extremely critical since t-SNE is quite insensitive to this parameter."/>
256 <param name="learning_rate" type="float" value="1000" label="Learning rate" help="The learning rate can be a critical parameter. It should be between 100 and 1000. If the cost function increases during initial optimization, the early exaggeration factor or the learning rate might be too high. If the cost function gets stuck in a bad local minimum increasing the learning rate helps sometimes."/> 291 <param argument="metric" type="select">
257 <param name="random_state" type="integer" value="0" label="Random state" help="Change this to use different intial states for the optimization"/> 292 <expand macro="distance_metric_options"/>
258 <param argument="use_fast_tsne" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Use the MulticoreTSNE package if possible?"/> 293 </param>
294 <param argument="early_exaggeration" type="float" value="12.0" label="Early exaggeration" help="Controls how tight natural clusters in the original space are in the embedded space and how much space will be between them. For larger values, the space between natural clusters will be larger in the embedded space. Again, the choice of this parameter is not very critical. If the cost function increases during initial optimization, the early exaggeration factor or the learning rate might be too high."/>
295 <param argument="learning_rate" type="float" value="1000" label="Learning rate" help="The learning rate can be a critical parameter. It should be between 100 and 1000. If the cost function increases during initial optimization, the early exaggeration factor or the learning rate might be too high. If the cost function gets stuck in a bad local minimum increasing the learning rate helps sometimes."/>
296 <param argument="random_state" type="integer" value="0" label="Random state" help="Change this to use different intial states for the optimization"/>
259 </when> 297 </when>
260 <when value="tl.umap"> 298 <when value="tl.umap">
261 <param argument="min_dist" type="float" value="0.5" label="Effective minimum distance between embedded points" help="Smaller values will result in a more clustered/clumped embedding where nearby points on the manifold are drawn closer together, while larger values will result on a more even dispersal of points. The value should be set relative to the 'spread' value, which determines the scale at which embedded points will be spread out. The default of in the 'umap-learn' package is 0.1."/> 299 <param argument="min_dist" type="float" value="0.5" label="Effective minimum distance between embedded points" help="Smaller values will result in a more clustered/clumped embedding where nearby points on the manifold are drawn closer together, while larger values will result on a more even dispersal of points. The value should be set relative to the 'spread' value, which determines the scale at which embedded points will be spread out. The default of in the 'umap-learn' package is 0.1."/>
262 <param argument="spread" type="float" value="1.0" label="Effective scale of embedded points" help="In combination with 'min_dist' this determines how clustered/clumped the embedded points are."/> 300 <param argument="spread" type="float" value="1.0" label="Effective scale of embedded points" help="In combination with 'min_dist' this determines how clustered/clumped the embedded points are."/>
263 <param argument="n_components" type="integer" min="0" value="2" label="Number of dimensions of the embedding" help=""/> 301 <param argument="n_components" type="integer" min="0" value="2" label="Number of dimensions of the embedding"/>
264 <param argument="maxiter" type="integer" min="0" value="" optional="true" label="Number of iterations (epochs) of the optimization" help="Called 'n_epochs' in the original UMAP."/> 302 <param argument="maxiter" type="integer" min="0" value="" optional="true" label="Number of iterations (epochs) of the optimization" help="Called 'n_epochs' in the original UMAP."/>
265 <param argument="alpha" type="float" value="1.0" label="Initial learning rate for the embedding optimization" help=""/> 303 <param argument="alpha" type="float" value="1.0" label="Initial learning rate for the embedding optimization"/>
266 <param argument="gamma" type="float" value="1.0" label="Weighting applied to negative samples in low dimensional embedding optimization" help="Values higher than one will result in greater weight being given to negative samples."/> 304 <param argument="gamma" type="float" value="1.0" label="Weighting applied to negative samples in low dimensional embedding optimization" help="Values higher than one will result in greater weight being given to negative samples."/>
267 <param argument="negative_sample_rate" type="integer" min="0" value="5" label="The number of negative edge/1-simplex samples to use per positive edge/1-simplex sample in optimizing the low dimensional embedding" help=""/> 305 <param argument="negative_sample_rate" type="integer" min="0" value="5" label="The number of negative edge/1-simplex samples to use per positive edge/1-simplex sample in optimizing the low dimensional embedding"/>
268 <param argument="init_pos" type="select" label="How to initialize the low dimensional embedding" help="Called 'init' in the original UMAP"> 306 <param argument="init_pos" type="select" label="How to initialize the low dimensional embedding" help="Called 'init' in the original UMAP">
307 <option value="spectral" selected="true">Spectral embedding of the graph</option>
269 <option value="paga">Position from paga</option> 308 <option value="paga">Position from paga</option>
270 <option value="spectral" selected="true">Spectral embedding of the graph</option>
271 <option value="random">Initial embedding positions at random</option> 309 <option value="random">Initial embedding positions at random</option>
272 </param> 310 </param>
273 <expand macro="param_random_state"/> 311 <param argument="random_state" type="integer" value="0" label="Seed used by the random number generator"/>
312 <expand macro="param_neighbors_key"/>
274 </when> 313 </when>
275 <when value="tl.draw_graph"> 314 <when value="tl.draw_graph">
276 <expand macro="param_layout"/> 315 <expand macro="param_layout"/>
277 <expand macro="param_root"/> 316 <param argument="root" type="integer" value="" optional="true" label="Root for tree layouts"/>
278 <expand macro="param_random_state"/> 317 <param argument="random_state" type="integer" value="0" optional="true" label="Random state" help="For layouts with random initialization like 'fr', change this to use different intial states for the optimization."/>
318 <param argument="adjacency" type="data" format="mtx" optional="true" label="Sparse adjacency matrix of the graph" help="If not set, it uses the unstructured annotation (uns) / neighbors / connectivities"/>
319 <param argument="key_added_ext" type="text" optional="true" value="" label="External key" help="If not set, it appends 'layout'">
320 <expand macro="sanitize_query"/>
321 </param>
279 <param argument="init_pos" type="text" optional="true" value="" label="Precomputed coordinates for initialization" help="It should be a valid 2d observation (e.g. paga)"> 322 <param argument="init_pos" type="text" optional="true" value="" label="Precomputed coordinates for initialization" help="It should be a valid 2d observation (e.g. paga)">
280 <expand macro="sanitize_query" /> 323 <expand macro="sanitize_query"/>
281 </param> 324 </param>
282 <param argument="adjacency" type="data" format="mtx" optional="true" label="Sparse adjacency matrix of the graph" help="If not set, it uses the unstructured annotation (uns) / neighbors / connectivities"/> 325 <expand macro="param_neighbors_key"/>
283 <param argument="key_ext" type="text" optional="true" value="" label="External key" help="If not set, it appends 'layout'">
284 <expand macro="sanitize_query" />
285 </param>
286 </when> 326 </when>
287 <when value="tl.dpt"> 327 <when value="tl.dpt">
288 <param argument="n_dcs" type="integer" min="0" value="10" label="Number of diffusion components to use" help=""/> 328 <param argument="n_dcs" type="integer" min="0" value="10" label="Number of diffusion components to use"/>
289 <param argument="n_branchings" type="integer" min="0" value="0" label="Number of branchings to detect" help=""/> 329 <param argument="n_branchings" type="integer" min="0" value="0" label="Number of branchings to detect"/>
290 <param argument="min_group_size" type="float" min="0" value="0.01" label="Min group size" help="During recursive splitting of branches ('dpt groups') for 'n_branchings' &gt; 1, do not consider groups that contain less than 'min_group_size' data points. If a float, 'min_group_size' refers to a fraction of the total number of data points."/> 330 <param argument="min_group_size" type="float" min="0" value="0.01" label="Min group size" help="During recursive splitting of branches ('dpt groups') for 'n_branchings' &gt; 1, do not consider groups that contain less than 'min_group_size' data points. If a float, 'min_group_size' refers to a fraction of the total number of data points."/>
291 <param argument="allow_kendall_tau_shift" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Allow Kendal tau shift?" help="If a very small branch is detected upon splitting, shift away from maximum correlation in Kendall tau criterion of Haghverdi et al (2016) to stabilize the splitting."/> 331 <param argument="allow_kendall_tau_shift" type="boolean" truevalue="True" falsevalue="False" checked="true" label="Allow Kendal tau shift?" help="If a very small branch is detected upon splitting, shift away from maximum correlation in Kendall tau criterion of Haghverdi et al (2016) to stabilize the splitting."/>
332 <expand macro="param_neighbors_key"/>
292 </when> 333 </when>
293 <when value="tl.paga"> 334 <when value="tl.paga">
294 <param argument="groups" type="text" value="louvain" label="Key for categorical in the input" help="You can pass your predefined groups by choosing any categorical annotation of observations ('adata.obs')."> 335 <param argument="groups" type="text" optional="true" value="" label="Key for categorical in the input" help="You can pass your predefined groups by choosing any categorical annotation of observations ('adata.obs').">
295 <expand macro="sanitize_query" /> 336 <expand macro="sanitize_query"/>
296 </param> 337 </param>
297 <param argument="use_rna_velocity" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Use RNA velocity to orient edges in the abstracted graph and estimate transitions?" help="Requires that 'adata.uns' contains a directed single-cell graph with key '['velocyto_transitions']'. This feature might be subject to change in the future."/> 338 <param argument="use_rna_velocity" type="boolean" truevalue="True" falsevalue="False" checked="false" label="Use RNA velocity to orient edges in the abstracted graph and estimate transitions?" help="Requires that 'adata.uns' contains a directed single-cell graph with key '['velocyto_transitions']'. This feature might be subject to change in the future."/>
298 <param argument="model" type="select" label="PAGA connectivity model" help=""> 339 <param argument="model" type="select" label="PAGA connectivity model">
299 <option value="v1.2">v1.2</option> 340 <option value="v1.2" selected="true">v1.2</option>
300 <option value="v1.0">v1.0</option> 341 <option value="v1.0">v1.0</option>
301 </param> 342 </param>
343 <expand macro="param_neighbors_key"/>
302 </when> 344 </when>
303 <when value="tl.embedding_density"> 345 <when value="tl.embedding_density">
304 <param argument="basis" type="text" value="umap" label="The embedding over which the density will be calculated." help="This embedded representation should be found in adata.obsm['X_[basis]']"> 346 <param argument="basis" type="text" value="umap" label="The embedding over which the density will be calculated." help="This embedded representation should be found in adata.obsm['X_[basis]']">
305 <expand macro="sanitize_query" /> 347 <expand macro="sanitize_query"/>
306 </param> 348 </param>
307 <param argument="groupby" type="text" optional="true" value="" label="Key for categorical observation/cell annotation for which densities are calculated per category." > 349 <param argument="groupby" type="text" optional="true" value="" label="Key for categorical observation/cell annotation for which densities are calculated per category." >
308 <expand macro="sanitize_query" /> 350 <expand macro="sanitize_query"/>
309 </param> 351 </param>
310 <param argument="key_added" type="text" optional="true" value="" label="Name of the .obs covariate that will be added with the density estimates."> 352 <param argument="key_added" type="text" optional="true" value="" label="Name of the .obs covariate that will be added with the density estimates.">
311 <expand macro="sanitize_query" /> 353 <expand macro="sanitize_query"/>
312 </param> 354 </param>
313 </when> 355 </when>
314 </conditional> 356 </conditional>
315 <expand macro="inputs_common_advanced"/> 357 <expand macro="inputs_common_advanced"/>
316 </inputs> 358 </inputs>
317 <outputs> 359 <outputs>
318 <expand macro="anndata_outputs"/> 360 <expand macro="anndata_outputs"/>
319 </outputs> 361 </outputs>
320 <tests> 362 <tests>
321 <test expect_num_outputs="2"> 363
322 <!-- test 1 --> 364 <!-- test 1 -->
323 <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" /> 365 <test expect_num_outputs="2">
366 <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad"/>
324 <conditional name="method"> 367 <conditional name="method">
325 <param name="method" value="tl.louvain"/> 368 <param name="method" value="tl.louvain"/>
326 <conditional name="flavor">
327 <param name="flavor" value="vtraag"/>
328 <param name="resolution" value="1.0"/>
329 </conditional>
330 <param name="random_state" value="10"/> 369 <param name="random_state" value="10"/>
331 <param name="key_added" value="louvain"/> 370 </conditional>
332 <param name="directed" value="true"/> 371 <section name="advanced_common">
333 <param name="use_weights" value="false"/> 372 <param name="show_log" value="true"/>
334 </conditional>
335 <section name="advanced_common">
336 <param name="show_log" value="true" />
337 </section> 373 </section>
338 <output name="hidden_output"> 374 <output name="hidden_output">
339 <assert_contents> 375 <assert_contents>
340 <has_text_matching expression="sc.tl.louvain"/> 376 <has_text_matching expression="sc.tl.louvain"/>
341 <has_text_matching expression="adata=adata"/> 377 <has_text_matching expression="adata=adata"/>
345 <has_text_matching expression="key_added='louvain'"/> 381 <has_text_matching expression="key_added='louvain'"/>
346 <has_text_matching expression="directed=True"/> 382 <has_text_matching expression="directed=True"/>
347 <has_text_matching expression="use_weights=False"/> 383 <has_text_matching expression="use_weights=False"/>
348 </assert_contents> 384 </assert_contents>
349 </output> 385 </output>
350 <output name="anndata_out" file="tl.louvain.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/> 386 <output name="anndata_out" ftype="h5ad">
351 </test> 387 <assert_contents>
352 <test expect_num_outputs="2"> 388 <has_h5_keys keys="obs/louvain"/>
353 <!-- test 2 --> 389 <has_h5_keys keys="uns/louvain"/>
354 <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" /> 390 </assert_contents>
391 </output>
392 </test>
393
394 <!-- test 2 -->
395 <test expect_num_outputs="2">
396 <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad"/>
355 <conditional name="method"> 397 <conditional name="method">
356 <param name="method" value="tl.leiden"/> 398 <param name="method" value="tl.leiden"/>
357 <param name="random_state" value="1"/>
358 <param name="random_state" value="10"/> 399 <param name="random_state" value="10"/>
359 <param name="key_added" value="leiden"/> 400 </conditional>
360 <param name="use_weights" value="false"/> 401 <section name="advanced_common">
361 <param name="n_iterations" value="-1"/> 402 <param name="show_log" value="true"/>
362 </conditional>
363 <section name="advanced_common">
364 <param name="show_log" value="true" />
365 </section> 403 </section>
366 <output name="hidden_output"> 404 <output name="hidden_output">
367 <assert_contents> 405 <assert_contents>
368 <has_text_matching expression="sc.tl.leiden"/> 406 <has_text_matching expression="sc.tl.leiden"/>
369 <has_text_matching expression="resolution=1"/> 407 <has_text_matching expression="resolution=1"/>
370 <has_text_matching expression="random_state=10"/> 408 <has_text_matching expression="random_state=10"/>
371 <has_text_matching expression="key_added='leiden'"/> 409 <has_text_matching expression="key_added='leiden'"/>
372 <has_text_matching expression="use_weights=False"/> 410 <has_text_matching expression="use_weights=True"/>
373 <has_text_matching expression="n_iterations=-1"/> 411 <has_text_matching expression="n_iterations=-1"/>
374 </assert_contents> 412 </assert_contents>
375 </output> 413 </output>
376 <output name="anndata_out" file="tl.leiden.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/> 414 <output name="anndata_out" ftype="h5ad">
377 </test> 415 <assert_contents>
378 <test expect_num_outputs="2"> 416 <has_h5_keys keys="obs/leiden"/>
379 <!-- test 3 --> 417 <has_h5_keys keys="uns/leiden"/>
380 <param name="adata" value="krumsiek11.h5ad" /> 418 </assert_contents>
419 </output>
420 </test>
421
422 <!-- test 3 -->
423 <test expect_num_outputs="2">
424 <param name="adata" value="krumsiek11.h5ad"/>
381 <conditional name="method"> 425 <conditional name="method">
382 <param name="method" value="pp.pca"/> 426 <param name="method" value="pp.pca"/>
383 <param name="n_comps" value="50"/> 427 </conditional>
384 <param name="dtype" value="float32"/> 428 <section name="advanced_common">
385 <conditional name="pca"> 429 <param name="show_log" value="true"/>
386 <param name="chunked" value="False"/>
387 <param name="zero_center" value="true"/>
388 <param name="svd_solver" value="auto"/>
389 <param name="random_state" value="0"/>
390 </conditional>
391 <param name="use_highly_variable" value="false"/>
392 </conditional>
393 <section name="advanced_common">
394 <param name="show_log" value="true" />
395 </section> 430 </section>
396 <output name="hidden_output"> 431 <output name="hidden_output">
397 <assert_contents> 432 <assert_contents>
398 <has_text_matching expression="sc.pp.pca"/> 433 <has_text_matching expression="sc.pp.pca"/>
399 <has_text_matching expression="dtype='float32'"/> 434 <has_text_matching expression="dtype='float32'"/>
400 <has_text_matching expression="copy=False"/> 435 <has_text_matching expression="copy=False"/>
401 <has_text_matching expression="chunked=False"/> 436 <has_text_matching expression="chunked=False"/>
402 <has_text_matching expression="zero_center=True"/> 437 <has_text_matching expression="zero_center=True"/>
403 <has_text_matching expression="svd_solver='auto'"/>
404 <has_text_matching expression="random_state=0"/> 438 <has_text_matching expression="random_state=0"/>
405 <has_text_matching expression="use_highly_variable=False"/> 439 </assert_contents>
406 </assert_contents> 440 </output>
407 </output> 441 <output name="anndata_out" ftype="h5ad">
408 <output name="anndata_out" file="pp.pca.krumsiek11.h5ad" ftype="h5ad" compare="sim_size" delta="100000" delta_frac="0.15"/> 442 <assert_contents>
409 </test> 443 <has_h5_keys keys="uns/pca"/>
410 <test expect_num_outputs="2"> 444 <has_h5_keys keys="obsm/X_pca"/>
411 <!-- test 4 --> 445 <has_h5_keys keys="varm/PCs"/>
412 <param name="adata" value="krumsiek11.h5ad" /> 446 </assert_contents>
447 </output>
448 </test>
449
450 <!-- test 4 -->
451 <test expect_num_outputs="2">
452 <param name="adata" value="krumsiek11.h5ad"/>
413 <conditional name="method"> 453 <conditional name="method">
414 <param name="method" value="pp.pca"/> 454 <param name="method" value="pp.pca"/>
415 <param name="n_comps" value="20"/> 455 <param name="n_comps" value="20"/>
416 <param name="dtype" value="float32"/>
417 <conditional name="pca"> 456 <conditional name="pca">
418 <param name="chunked" value="True"/> 457 <param name="chunked" value="True"/>
419 <param name="chunk_size" value="50"/> 458 <param name="chunk_size" value="50"/>
420 </conditional> 459 </conditional>
421 <param name="use_highly_variable" value="false"/> 460 </conditional>
422 </conditional> 461 <section name="advanced_common">
423 <section name="advanced_common"> 462 <param name="show_log" value="true"/>
424 <param name="show_log" value="true" />
425 </section> 463 </section>
426 <output name="hidden_output"> 464 <output name="hidden_output">
427 <assert_contents> 465 <assert_contents>
428 <has_text_matching expression="sc.pp.pca"/> 466 <has_text_matching expression="sc.pp.pca"/>
429 <has_text_matching expression="data=adata"/> 467 <has_text_matching expression="data=adata"/>
430 <has_text_matching expression="dtype='float32'"/> 468 <has_text_matching expression="dtype='float32'"/>
431 <has_text_matching expression="copy=False"/> 469 <has_text_matching expression="copy=False"/>
432 <has_text_matching expression="chunked=True"/> 470 <has_text_matching expression="chunked=True"/>
433 <has_text_matching expression="chunk_size=50"/> 471 <has_text_matching expression="chunk_size=50"/>
434 <has_text_matching expression="use_highly_variable=False"/> 472 </assert_contents>
435 </assert_contents> 473 </output>
436 </output> 474 <output name="anndata_out" ftype="h5ad">
437 <output name="anndata_out" file="pp.pca.krumsiek11_chunk.h5ad" ftype="h5ad" compare="sim_size"/> 475 <assert_contents>
438 </test> 476 <has_h5_keys keys="uns/pca"/>
439 <test expect_num_outputs="2"> 477 <has_h5_keys keys="obsm/X_pca"/>
440 <!-- test 5 --> 478 <has_h5_keys keys="varm/PCs"/>
441 <param name="adata" value="krumsiek11.h5ad" /> 479 </assert_contents>
442 <conditional name="method"> 480 </output>
443 <param name="method" value="tl.pca"/> 481 </test>
444 <param name="n_comps" value="50"/> 482
445 <param name="dtype" value="float32"/> 483 <!-- test 5 -->
446 <conditional name="pca"> 484 <test expect_num_outputs="2">
447 <param name="chunked" value="False"/> 485 <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad"/>
448 <param name="zero_center" value="True"/>
449 <param name="svd_solver" value="auto"/>
450 <param name="random_state" value="0"/>
451 </conditional>
452 <param name="use_highly_variable" value="false"/>
453 </conditional>
454 <section name="advanced_common">
455 <param name="show_log" value="true" />
456 </section>
457 <output name="hidden_output">
458 <assert_contents>
459 <has_text_matching expression="sc.tl.pca"/>
460 <has_text_matching expression="dtype='float32'"/>
461 <has_text_matching expression="copy=False"/>
462 <has_text_matching expression="chunked=False"/>
463 <has_text_matching expression="zero_center=True"/>
464 <has_text_matching expression="svd_solver='auto'"/>
465 <has_text_matching expression="use_highly_variable=False"/>
466 </assert_contents>
467 </output>
468 <output name="anndata_out" file="tl.pca.krumsiek11.h5ad" ftype="h5ad" compare="sim_size" delta="100000" delta_frac="0.15"/>
469 </test>
470 <test expect_num_outputs="2">
471 <!-- test 6 -->
472 <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
473 <conditional name="method"> 486 <conditional name="method">
474 <param name="method" value="tl.diffmap"/> 487 <param name="method" value="tl.diffmap"/>
475 <param name="n_comps" value="15"/> 488 </conditional>
476 </conditional> 489 <section name="advanced_common">
477 <section name="advanced_common"> 490 <param name="show_log" value="true"/>
478 <param name="show_log" value="true" />
479 </section> 491 </section>
480 <output name="hidden_output"> 492 <output name="hidden_output">
481 <assert_contents> 493 <assert_contents>
482 <has_text_matching expression="sc.tl.diffmap"/> 494 <has_text_matching expression="sc.tl.diffmap"/>
483 </assert_contents> 495 </assert_contents>
484 </output> 496 </output>
485 <output name="anndata_out" file="tl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/> 497 <output name="anndata_out" ftype="h5ad">
486 </test> 498 <assert_contents>
487 <test expect_num_outputs="2"> 499 <has_h5_keys keys="obsm/X_diffmap"/>
488 <!-- test 7 --> 500 <has_h5_keys keys="uns/diffmap_evals"/>
489 <param name="adata" value="krumsiek11.h5ad" /> 501 </assert_contents>
502 </output>
503 </test>
504
505 <!-- test 6 -->
506 <test expect_num_outputs="2">
507 <param name="adata" value="krumsiek11.h5ad"/>
490 <conditional name="method"> 508 <conditional name="method">
491 <param name="method" value="tl.tsne"/> 509 <param name="method" value="tl.tsne"/>
492 <param name="n_pcs" value="10"/> 510 <param name="n_pcs" value="10"/>
493 <param name="perplexity" value="30"/> 511 </conditional>
494 <param name="early_exaggeration" value="12.0"/> 512 <section name="advanced_common">
495 <param name="learning_rate" value="1000"/> 513 <param name="show_log" value="true"/>
496 <param name="random_state" value="0"/>
497 <param name="use_fast_tsne" value="true"/>
498 </conditional>
499 <section name="advanced_common">
500 <param name="show_log" value="true" />
501 </section> 514 </section>
502 <output name="hidden_output"> 515 <output name="hidden_output">
503 <assert_contents> 516 <assert_contents>
504 <has_text_matching expression="sc.tl.tsne"/> 517 <has_text_matching expression="sc.tl.tsne"/>
505 <has_text_matching expression="n_pcs=10"/> 518 <has_text_matching expression="n_pcs=10"/>
506 <has_text_matching expression="perplexity=30.0"/> 519 <has_text_matching expression="perplexity=30.0"/>
507 <has_text_matching expression="early_exaggeration=12.0"/> 520 <has_text_matching expression="early_exaggeration=12.0"/>
508 <has_text_matching expression="learning_rate=1000.0"/> 521 <has_text_matching expression="learning_rate=1000.0"/>
509 <has_text_matching expression="random_state=0"/> 522 <has_text_matching expression="random_state=0"/>
510 <has_text_matching expression="use_fast_tsne=True"/> 523 </assert_contents>
511 </assert_contents> 524 </output>
512 </output> 525 <output name="anndata_out" ftype="h5ad">
513 <output name="anndata_out" file="tl.tsne.krumsiek11.h5ad" ftype="h5ad" compare="sim_size"/> 526 <assert_contents>
514 </test> 527 <has_h5_keys keys="uns/tsne"/>
515 <test expect_num_outputs="2"> 528 <has_h5_keys keys="obsm/X_tsne"/>
516 <!-- test 8 --> 529 </assert_contents>
517 <param name="adata" value="pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" /> 530 </output>
531 </test>
532
533 <!-- test 7 -->
534 <test expect_num_outputs="2">
535 <param name="adata" value="pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad"/>
518 <conditional name="method"> 536 <conditional name="method">
519 <param name="method" value="tl.umap"/> 537 <param name="method" value="tl.umap"/>
520 <param name="min_dist" value="0.5"/>
521 <param name="spread" value="1.0"/>
522 <param name="n_components" value="2"/>
523 <param name="maxiter" value="2"/> 538 <param name="maxiter" value="2"/>
524 <param name="alpha" value="1.0"/> 539 </conditional>
525 <param name="gamma" value="1.0"/> 540 <section name="advanced_common">
526 <param name="negative_sample_rate" value="5"/> 541 <param name="show_log" value="true"/>
527 <param name="init_pos" value="spectral"/>
528 <param name="random_state" value="0"/>
529 </conditional>
530 <section name="advanced_common">
531 <param name="show_log" value="true" />
532 </section> 542 </section>
533 <output name="hidden_output"> 543 <output name="hidden_output">
534 <assert_contents> 544 <assert_contents>
535 <has_text_matching expression="sc.tl.umap"/> 545 <has_text_matching expression="sc.tl.umap"/>
536 <has_text_matching expression="min_dist=0.5"/> 546 <has_text_matching expression="min_dist=0.5"/>
542 <has_text_matching expression="negative_sample_rate=5"/> 552 <has_text_matching expression="negative_sample_rate=5"/>
543 <has_text_matching expression="init_pos='spectral'"/> 553 <has_text_matching expression="init_pos='spectral'"/>
544 <has_text_matching expression="random_state=0"/> 554 <has_text_matching expression="random_state=0"/>
545 </assert_contents> 555 </assert_contents>
546 </output> 556 </output>
547 <output name="anndata_out" file="tl.umap.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"> 557 <output name="anndata_out" ftype="h5ad">
548 <assert_contents> 558 <assert_contents>
549 <has_h5_keys keys="X, obs, obsm, uns, var" /> 559 <has_h5_keys keys="uns/umap"/>
550 </assert_contents> 560 <has_h5_keys keys="obsm/X_umap"/>
551 </output> 561 </assert_contents>
552 </test> 562 </output>
553 <test expect_num_outputs="2"> 563 </test>
554 <!-- test 9 --> 564
565 <!-- test 8 -->
566 <test expect_num_outputs="2">
555 <param name="adata" value="pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad"/> 567 <param name="adata" value="pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad"/>
556 <conditional name="method"> 568 <conditional name="method">
557 <param name="method" value="tl.draw_graph"/> 569 <param name="method" value="tl.draw_graph"/>
558 <param name="layout" value="fa"/> 570 </conditional>
559 <param name="random_state" value="0"/> 571 <section name="advanced_common">
560 </conditional> 572 <param name="show_log" value="true"/>
561 <section name="advanced_common">
562 <param name="show_log" value="true" />
563 </section> 573 </section>
564 <output name="hidden_output"> 574 <output name="hidden_output">
565 <assert_contents> 575 <assert_contents>
566 <has_text_matching expression="sc.tl.draw_graph"/> 576 <has_text_matching expression="sc.tl.draw_graph"/>
567 <has_text_matching expression="layout='fa'"/> 577 <has_text_matching expression="layout='fa'"/>
568 <has_text_matching expression="random_state=0"/> 578 <has_text_matching expression="random_state=0"/>
569 </assert_contents> 579 </assert_contents>
570 </output> 580 </output>
571 <output name="anndata_out" file="tl.draw_graph.pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/> 581 <output name="anndata_out" ftype="h5ad">
572 </test> 582 <assert_contents>
573 <test expect_num_outputs="2"> 583 <has_h5_keys keys="uns/draw_graph"/>
574 <!-- test 10 --> 584 <has_h5_keys keys="obsm/X_draw_graph_fr"/>
575 <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad"/> 585 </assert_contents>
576 <conditional name="method"> 586 </output>
577 <param name="method" value="tl.paga"/> 587 </test>
578 <param name="groups" value="paul15_clusters"/> 588
579 <param name="use_rna_velocity" value="False"/> 589 <!-- test 9 -->
580 <param name="model" value="v1.2"/> 590 <test expect_num_outputs="2">
581 </conditional> 591 <param name="adata" value="tl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad"/>
582 <section name="advanced_common">
583 <param name="show_log" value="true" />
584 </section>
585 <output name="hidden_output">
586 <assert_contents>
587 <has_text_matching expression="sc.tl.paga"/>
588 <has_text_matching expression="groups='paul15_clusters'"/>
589 <has_text_matching expression="use_rna_velocity=False"/>
590 <has_text_matching expression="model='v1.2'"/>
591 </assert_contents>
592 </output>
593 <output name="anndata_out" file="tl.paga.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/>
594 </test>
595 <test expect_num_outputs="2">
596 <!-- test 11 -->
597 <param name="adata" value="tl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
598 <conditional name="method"> 592 <conditional name="method">
599 <param name="method" value="tl.dpt"/> 593 <param name="method" value="tl.dpt"/>
600 <param name="n_dcs" value="15"/> 594 <param name="n_dcs" value="15"/>
601 <param name="n_branchings" value="1"/> 595 <param name="n_branchings" value="1"/>
602 <param name="min_group_size" value="0.01"/> 596 </conditional>
603 <param name="allow_kendall_tau_shift" value="True"/> 597 <section name="advanced_common">
604 </conditional> 598 <param name="show_log" value="true"/>
605 <section name="advanced_common">
606 <param name="show_log" value="true" />
607 </section> 599 </section>
608 <output name="hidden_output"> 600 <output name="hidden_output">
609 <assert_contents> 601 <assert_contents>
610 <has_text_matching expression="sc.tl.dpt"/> 602 <has_text_matching expression="sc.tl.dpt"/>
611 <has_text_matching expression="n_dcs=15"/> 603 <has_text_matching expression="n_dcs=15"/>
612 <has_text_matching expression="n_branchings=1"/> 604 <has_text_matching expression="n_branchings=1"/>
613 <has_text_matching expression="min_group_size=0.01"/> 605 <has_text_matching expression="min_group_size=0.01"/>
614 <has_text_matching expression="allow_kendall_tau_shift=True"/> 606 <has_text_matching expression="allow_kendall_tau_shift=True"/>
615 </assert_contents> 607 </assert_contents>
616 </output> 608 </output>
617 <output name="anndata_out" file="tl.dpt.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/> 609 <output name="anndata_out" ftype="h5ad">
618 </test> 610 <assert_contents>
619 <test expect_num_outputs="2"> 611 <has_h5_keys keys="obs/dpt_groups,obs/dpt_order,obs/dpt_order_indices"/>
620 <!-- test 12 --> 612 <has_h5_keys keys="uns/dpt_changepoints,uns/dpt_grouptips"/>
621 <param name="adata" value="tl.umap.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" /> 613 </assert_contents>
614 </output>
615 </test>
616
617 <!-- test 10 -->
618 <test expect_num_outputs="2">
619 <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad"/>
620 <conditional name="method">
621 <param name="method" value="tl.paga"/>
622 <param name="groups" value="paul15_clusters"/>
623 </conditional>
624 <section name="advanced_common">
625 <param name="show_log" value="true"/>
626 </section>
627 <output name="hidden_output">
628 <assert_contents>
629 <has_text_matching expression="sc.tl.paga"/>
630 <has_text_matching expression="groups='paul15_clusters'"/>
631 <has_text_matching expression="use_rna_velocity=False"/>
632 <has_text_matching expression="model='v1.2'"/>
633 </assert_contents>
634 </output>
635 <output name="anndata_out" ftype="h5ad">
636 <assert_contents>
637 <has_h5_keys keys="uns/paga,uns/paul15_clusters_sizes"/>
638 </assert_contents>
639 </output>
640 </test>
641
642 <!-- test 11 -->
643 <test expect_num_outputs="2">
644 <param name="adata" value="tl.umap.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad"/>
622 <conditional name="method"> 645 <conditional name="method">
623 <param name="method" value="tl.embedding_density"/> 646 <param name="method" value="tl.embedding_density"/>
624 <param name="basis" value="umap"/>
625 <param name="key_added" value="umap_density"/> 647 <param name="key_added" value="umap_density"/>
626 </conditional> 648 </conditional>
627 <section name="advanced_common"> 649 <section name="advanced_common">
628 <param name="show_log" value="true" /> 650 <param name="show_log" value="true"/>
629 </section> 651 </section>
630 <output name="hidden_output"> 652 <output name="hidden_output">
631 <assert_contents> 653 <assert_contents>
632 <has_text_matching expression="sc.tl.embedding_density"/> 654 <has_text_matching expression="sc.tl.embedding_density"/>
633 <has_text_matching expression="basis='umap'"/> 655 <has_text_matching expression="basis='umap'"/>
634 <has_text_matching expression="key_added='umap_density'"/> 656 <has_text_matching expression="key_added='umap_density'"/>
635 </assert_contents> 657 </assert_contents>
636 </output> 658 </output>
637 <output name="anndata_out" file="tl.embedding_density.umap.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/> 659 <output name="anndata_out" ftype="h5ad">
660 <assert_contents>
661 <has_h5_keys keys="obs/umap_density"/>
662 <has_h5_keys keys="uns/umap_density_params"/>
663 </assert_contents>
664 </output>
638 </test> 665 </test>
639 </tests> 666 </tests>
640 <help><![CDATA[ 667 <help><![CDATA[
668
641 Cluster cells into subgroups (`tl.louvain`) 669 Cluster cells into subgroups (`tl.louvain`)
642 =========================================== 670 ===========================================
643 671
644 Cluster cells using the Louvain algorithm (Blondel et al, 2008) in the implementation 672 Cluster cells using the Louvain algorithm (Blondel et al, 2008) in the implementation
645 of Traag et al,2017. The Louvain algorithm has been proposed for single-cell 673 of Traag et al,2017. The Louvain algorithm has been proposed for single-cell
648 This requires to run `pp.neighbors`, first. 676 This requires to run `pp.neighbors`, first.
649 677
650 More details on the `tl.louvain scanpy documentation 678 More details on the `tl.louvain scanpy documentation
651 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.louvain.html>`_ 679 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.louvain.html>`_
652 680
681
653 Cluster cells into subgroups (`tl.leiden`) 682 Cluster cells into subgroups (`tl.leiden`)
654 ========================================== 683 ==========================================
655 684
656 Cluster cells using the Leiden algorithm (Traag et al, 2018), an improved version of the Louvain algorithm (Blondel et al, 2008). 685 Cluster cells using the Leiden algorithm (Traag et al, 2018), an improved version of the Louvain algorithm (Blondel et al, 2008).
657 686
658 The Louvain algorithm has been proposed for single-cell analysis by Levine et al, 2015. 687 The Louvain algorithm has been proposed for single-cell analysis by Levine et al, 2015.
659 688
660 More details on the `tl.leiden scanpy documentation 689 More details on the `tl.leiden scanpy documentation
661 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.leiden.html>`_ 690 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.leiden.html>`_
662 691
692
663 Computes PCA (principal component analysis) coordinates, loadings and variance decomposition, using `pp.pca` 693 Computes PCA (principal component analysis) coordinates, loadings and variance decomposition, using `pp.pca`
664 ============================================================================================================ 694 ============================================================================================================
665 695
666 @CMD_pca_outputs@
667
668 More details on the `pp.pca scanpy documentation 696 More details on the `pp.pca scanpy documentation
669 <https://scanpy.readthedocs.io/en/stable/api/scanpy.pp.pca.html>`__ 697 <https://scanpy.readthedocs.io/en/stable/api/scanpy.pp.pca.html>`__
670 698
671 Computes PCA (principal component analysis) coordinates, loadings and variance decomposition, using `tl.pca`
672 ============================================================================================================
673
674 @CMD_pca_outputs@
675
676 More details on the `tl.pca scanpy documentation
677 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.pca.html>`__
678 699
679 Diffusion Maps, using `tl.diffmap` 700 Diffusion Maps, using `tl.diffmap`
680 ================================== 701 ==================================
681 702
682 Diffusion maps (Coifman et al 2005) has been proposed for visualizing single-cell 703 Diffusion maps (Coifman et al 2005) has been proposed for visualizing single-cell
696 as colum. It can be accessed using the inspect tool for AnnData 717 as colum. It can be accessed using the inspect tool for AnnData
697 718
698 More details on the `tl.diffmap scanpy documentation 719 More details on the `tl.diffmap scanpy documentation
699 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.diffmap.html>`__ 720 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.diffmap.html>`__
700 721
722
701 t-distributed stochastic neighborhood embedding (tSNE), using `tl.tsne` 723 t-distributed stochastic neighborhood embedding (tSNE), using `tl.tsne`
702 ======================================================================= 724 =======================================================================
703 725
704 t-distributed stochastic neighborhood embedding (tSNE) (Maaten et al, 2008) has been 726 t-distributed stochastic neighborhood embedding (tSNE) (Maaten et al, 2008) has been
705 proposed for visualizating single-cell data by (Amir et al, 2013). Here, by default, 727 proposed for visualizating single-cell data by (Amir et al, 2013). Here, by default,
707 729
708 It returns `X_tsne`, tSNE coordinates of data. 730 It returns `X_tsne`, tSNE coordinates of data.
709 731
710 More details on the `tl.tsne scanpy documentation 732 More details on the `tl.tsne scanpy documentation
711 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.tsne.html>`__ 733 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.tsne.html>`__
734
712 735
713 Embed the neighborhood graph using UMAP, using `tl.umap` 736 Embed the neighborhood graph using UMAP, using `tl.umap`
714 ======================================================== 737 ========================================================
715 738
716 UMAP (Uniform Manifold Approximation and Projection) is a manifold learning 739 UMAP (Uniform Manifold Approximation and Projection) is a manifold learning
719 the topology of the data, which we represent throughout Scanpy using a 742 the topology of the data, which we represent throughout Scanpy using a
720 neighborhood graph. tSNE, by contrast, optimizes the distribution of 743 neighborhood graph. tSNE, by contrast, optimizes the distribution of
721 nearest-neighbor distances in the embedding such that these best match the 744 nearest-neighbor distances in the embedding such that these best match the
722 distribution of distances in the high-dimensional space. We use the 745 distribution of distances in the high-dimensional space. We use the
723 implementation of `umap-learn <https://github.com/lmcinnes/umap>`__ 746 implementation of `umap-learn <https://github.com/lmcinnes/umap>`__
724 (McInnes et al, 2018). For a few comparisons of UMAP with tSNE, see this `preprint 747 (McInnes et al, 2018). For a few comparisons of UMAP with tSNE, see this `paper
725 <https://doi.org/10.1101/298430>`__. 748 <https://www.nature.com/articles/nbt.4314>`__.
726 749
727 The UMAP coordinates of data are added to the return AnnData in the multi-dimensional 750 The UMAP coordinates of data are added to the return AnnData in the multi-dimensional
728 observations annotation (obsm). This data is accessible using the inspect tool for AnnData 751 observations annotation (obsm). This data is accessible using the inspect tool for AnnData
729 752
730 More details on the `tl.umap scanpy documentation 753 More details on the `tl.umap scanpy documentation
731 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.umap.html>`__ 754 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.umap.html>`__
755
732 756
733 Force-directed graph drawing, using `tl.draw_graph` 757 Force-directed graph drawing, using `tl.draw_graph`
734 =================================================== 758 ===================================================
735 759
736 Force-directed graph drawing describes a class of long-established algorithms for visualizing graphs. 760 Force-directed graph drawing describes a class of long-established algorithms for visualizing graphs.
746 The coordinates of graph layout are added to the return AnnData in the multi-dimensional 770 The coordinates of graph layout are added to the return AnnData in the multi-dimensional
747 observations annotation (obsm). This data is accessible using the inspect tool for AnnData. 771 observations annotation (obsm). This data is accessible using the inspect tool for AnnData.
748 772
749 More details on the `tl.draw_graph scanpy documentation 773 More details on the `tl.draw_graph scanpy documentation
750 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.draw_graph.html>`__ 774 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.draw_graph.html>`__
775
751 776
752 Infer progression of cells through geodesic distance along the graph (`tl.dpt`) 777 Infer progression of cells through geodesic distance along the graph (`tl.dpt`)
753 =============================================================================== 778 ===============================================================================
754 779
755 Reconstruct the progression of a biological process from snapshot 780 Reconstruct the progression of a biological process from snapshot
806 831
807 These datasets are stored in the unstructured annotation (uns) and can be accessed using the inspect tool for AnnData objects 832 These datasets are stored in the unstructured annotation (uns) and can be accessed using the inspect tool for AnnData objects
808 833
809 More details on the `tl.paga scanpy documentation 834 More details on the `tl.paga scanpy documentation
810 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.paga.html>`_ 835 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.paga.html>`_
811 ]]></help> 836
837
838 Calculates the density of cells in an embedding (per condition). (`tl.embedding_density`)
839 =========================================================================================
840
841 Gaussian kernel density estimation is used to calculate the density of cells in an embedded space. This can be performed per category over a categorical cell annotation.
842
843 Note that density values are scaled to be between 0 and 1. Thus, the density value at each cell is only comparable to densities in the same category.
844
845 More details on the `tl.embedding_density scanpy documentation
846 <https://scanpy.readthedocs.io/en/stable/generated/scanpy.tl.embedding_density.html>`_
847 ]]>
848 </help>
812 <expand macro="citations"/> 849 <expand macro="citations"/>
813 </tool> 850 </tool>