comparison cluster_reduce_dimension.xml @ 12:9740d430d9f3 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/scanpy/ commit c21958f44b81d740191999fb6015d5ae69538ee0
author iuc
date Wed, 31 Jul 2024 18:05:14 +0000
parents afdac2e27f1b
children b43f391d2919
comparison
equal deleted inserted replaced
11:336f7f889475 12:9740d430d9f3
1 <tool id="scanpy_cluster_reduce_dimension" name="Cluster, infer trajectories and embed" version="@galaxy_version@" profile="@profile@"> 1 <tool id="scanpy_cluster_reduce_dimension" name="Cluster, infer trajectories and embed" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@profile@">
2 <description>with scanpy</description> 2 <description>with scanpy</description>
3 <expand macro="bio_tools"/>
4 <macros> 3 <macros>
5 <import>macros.xml</import> 4 <import>macros.xml</import>
6 <xml name="pca_inputs"> 5 <xml name="pca_inputs">
7 <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"/>
8 <param argument="dtype" type="text" value="float32" label="Numpy data type string to which to convert the result" help=""> 7 <param argument="dtype" type="text" value="float32" label="Numpy data type string to which to convert the result" help="">
18 </when> 17 </when>
19 <when value="False"> 18 <when value="False">
20 <param argument="zero_center" type="boolean" truevalue="True" falsevalue="False" checked="true" 19 <param argument="zero_center" type="boolean" truevalue="True" falsevalue="False" checked="true"
21 label="Compute standard PCA from covariance matrix?" 20 label="Compute standard PCA from covariance matrix?"
22 help="If not, it omits zero-centering variables (uses *TruncatedSVD* from scikit-learn), which allows to handle sparse input efficiently."/> 21 help="If not, it omits zero-centering variables (uses *TruncatedSVD* from scikit-learn), which allows to handle sparse input efficiently."/>
23 <expand macro="svd_solver"/> 22 <expand macro="svd_solver"/>
24 <param argument="random_state" type="integer" value="0" label="Initial states for the optimization" help=""/> 23 <param argument="random_state" type="integer" value="0" label="Initial states for the optimization" help=""/>
25 </when> 24 </when>
26 </conditional> 25 </conditional>
27 <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."/> 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."/>
28 </xml> 27 </xml>
59 random_state=$method.pca.random_state, 58 random_state=$method.pca.random_state,
60 #end if 59 #end if
61 use_highly_variable=$method.use_highly_variable 60 use_highly_variable=$method.use_highly_variable
62 ]]></token> 61 ]]></token>
63 </macros> 62 </macros>
63 <expand macro="bio_tools"/>
64 <expand macro="requirements"> 64 <expand macro="requirements">
65 <requirement type="package" version="0.7.0">louvain</requirement>
66 </expand> 65 </expand>
67 <expand macro="version_command"/> 66 <expand macro="version_command"/>
68 <command detect_errors="exit_code"><![CDATA[ 67 <command detect_errors="exit_code"><![CDATA[
69 @CMD@ 68 @CMD@
70 ]]></command> 69 ]]></command>
109 copy =False) 108 copy =False)
110 109
111 #else if $method.method == 'tl.tsne' 110 #else if $method.method == 'tl.tsne'
112 sc.tl.tsne( 111 sc.tl.tsne(
113 adata=adata, 112 adata=adata,
114 #if $method.n_pcs 113 #if str($method.n_pcs) != ''
115 n_pcs=$method.n_pcs, 114 n_pcs=$method.n_pcs,
116 #end if 115 #end if
117 perplexity=$method.perplexity, 116 perplexity=$method.perplexity,
118 early_exaggeration=$method.early_exaggeration, 117 early_exaggeration=$method.early_exaggeration,
119 learning_rate=$method.learning_rate, 118 learning_rate=$method.learning_rate,
125 sc.tl.umap( 124 sc.tl.umap(
126 adata=adata, 125 adata=adata,
127 min_dist=$method.min_dist, 126 min_dist=$method.min_dist,
128 spread=$method.spread, 127 spread=$method.spread,
129 n_components=$method.n_components, 128 n_components=$method.n_components,
130 #if $method.maxiter 129 #if str($method.maxiter) != ''
131 maxiter=$method.maxiter, 130 maxiter=$method.maxiter,
132 #end if 131 #end if
133 alpha=$method.alpha, 132 alpha=$method.alpha,
134 gamma=$method.gamma, 133 gamma=$method.gamma,
135 negative_sample_rate=$method.negative_sample_rate, 134 negative_sample_rate=$method.negative_sample_rate,
136 init_pos='$method.init_pos', 135 init_pos='$method.init_pos',
137 random_state=$method.random_state, 136 random_state=$method.random_state,
138 copy=False) 137 copy=False)
139 138
140 #else if $method.method == 'tl.draw_graph' 139 #else if $method.method == 'tl.draw_graph'
141
142 #if str($method.adjacency) != 'None' 140 #if str($method.adjacency) != 'None'
143 from scipy import io 141 from scipy import io
144 adjacency = io.mmread('$method.adjacency') 142 adjacency = io.mmread('$method.adjacency')
145 #end if 143 #end if
146 144
147 sc.tl.draw_graph( 145 sc.tl.draw_graph(
148 adata=adata, 146 adata=adata,
149 layout='$method.layout', 147 layout='$method.layout',
150 #if str($method.root) != '' 148 #if $method.root
151 #set $root=([int(x.strip()) for x in str($method.root).split(',')]) 149 #set $root=([int(x.strip()) for x in str($method.root).split(',')])
152 root=$root, 150 root=$root,
153 #end if 151 #end if
154 random_state=$method.random_state, 152 random_state=$method.random_state,
155 #if str($method.init_pos) != '' 153 #if $method.init_pos
156 init_pos='$method.init_pos', 154 init_pos='$method.init_pos',
157 #end if 155 #end if
158 #if str($method.adjacency) != 'None' 156 #if str($method.adjacency) != 'None'
159 adjacency=adjacency, 157 adjacency=adjacency,
160 #end if 158 #end if
161 #if str($method.key_ext) != '' 159 #if $method.key_ext
162 key_ext='$method.key_ext', 160 key_ext='$method.key_ext',
163 #end if 161 #end if
164 copy=False) 162 copy=False)
165 163
166 #else if $method.method == "tl.paga" 164 #else if $method.method == "tl.paga"
177 n_dcs=$method.n_dcs, 175 n_dcs=$method.n_dcs,
178 n_branchings=$method.n_branchings, 176 n_branchings=$method.n_branchings,
179 min_group_size=$method.min_group_size, 177 min_group_size=$method.min_group_size,
180 allow_kendall_tau_shift=$method.allow_kendall_tau_shift, 178 allow_kendall_tau_shift=$method.allow_kendall_tau_shift,
181 copy=False) 179 copy=False)
180
181 #else if $method.method == "tl.embedding_density"
182 sc.tl.embedding_density(
183 adata=adata,
184 basis='$method.basis',
185 #if $method.groupby
186 groupby='$method.groupby',
187 #end if
188 #if $method.key_added
189 key_added='$method.key_added',
190 #end if
191 )
192
182 #end if 193 #end if
183 194
184 @CMD_anndata_write_outputs@ 195 @CMD_anndata_write_outputs@
185 ]]></configfile> 196 ]]></configfile>
186 </configfiles> 197 </configfiles>
196 <option value="tl.tsne">t-distributed stochastic neighborhood embedding (tSNE), using 'tl.tsne'</option> 207 <option value="tl.tsne">t-distributed stochastic neighborhood embedding (tSNE), using 'tl.tsne'</option>
197 <option value="tl.umap">Embed the neighborhood graph using UMAP, using 'tl.umap'</option> 208 <option value="tl.umap">Embed the neighborhood graph using UMAP, using 'tl.umap'</option>
198 <option value="tl.draw_graph">Force-directed graph drawing, using 'tl.draw_graph'</option> 209 <option value="tl.draw_graph">Force-directed graph drawing, using 'tl.draw_graph'</option>
199 <option value="tl.dpt">Infer progression of cells through geodesic distance along the graph, using 'tl.dpt'</option> 210 <option value="tl.dpt">Infer progression of cells through geodesic distance along the graph, using 'tl.dpt'</option>
200 <option value="tl.paga">Generate cellular maps of differentiation manifolds with complex topologies, using 'tl.paga'</option> 211 <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>
201 </param> 213 </param>
202 <when value="tl.louvain"> 214 <when value="tl.louvain">
203 <conditional name="flavor"> 215 <conditional name="flavor">
204 <param argument="flavor" type="select" label="Flavor for the clustering" help=""> 216 <param argument="flavor" type="select" label="Flavor for the clustering" help="">
205 <option value="vtraag">vtraag (much more powerful)</option> 217 <option value="vtraag">vtraag (much more powerful)</option>
280 </when> 292 </when>
281 <when value="tl.paga"> 293 <when value="tl.paga">
282 <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')."> 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').">
283 <expand macro="sanitize_query" /> 295 <expand macro="sanitize_query" />
284 </param> 296 </param>
285 <param argument="use_rna_velocity" type="boolean" truevalue="False" 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."/> 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."/>
286 <param argument="model" type="select" label="PAGA connectivity model" help=""> 298 <param argument="model" type="select" label="PAGA connectivity model" help="">
287 <option value="v1.2">v1.2</option> 299 <option value="v1.2">v1.2</option>
288 <option value="v1.0">v1.0</option> 300 <option value="v1.0">v1.0</option>
289 </param> 301 </param>
290 </when> 302 </when>
291 </conditional> 303 <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]']">
305 <expand macro="sanitize_query" />
306 </param>
307 <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" />
309 </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.">
311 <expand macro="sanitize_query" />
312 </param>
313 </when>
314 </conditional>
292 <expand macro="inputs_common_advanced"/> 315 <expand macro="inputs_common_advanced"/>
293 </inputs> 316 </inputs>
294 <outputs> 317 <outputs>
295 <expand macro="anndata_outputs"/> 318 <expand macro="anndata_outputs"/>
296 </outputs> 319 </outputs>
297 <tests> 320 <tests>
298 <test> 321 <test expect_num_outputs="2">
299 <!-- test 0 --> 322 <!-- test 1 -->
300 <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" /> 323 <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
301 <conditional name="method"> 324 <conditional name="method">
302 <param name="method" value="tl.louvain"/> 325 <param name="method" value="tl.louvain"/>
303 <conditional name="flavor"> 326 <conditional name="flavor">
304 <param name="flavor" value="vtraag"/> 327 <param name="flavor" value="vtraag"/>
324 <has_text_matching expression="use_weights=False"/> 347 <has_text_matching expression="use_weights=False"/>
325 </assert_contents> 348 </assert_contents>
326 </output> 349 </output>
327 <output name="anndata_out" file="tl.louvain.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/> 350 <output name="anndata_out" file="tl.louvain.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/>
328 </test> 351 </test>
329 <test> 352 <test expect_num_outputs="2">
330 <!-- test 1 --> 353 <!-- test 2 -->
331 <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" /> 354 <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
332 <conditional name="method"> 355 <conditional name="method">
333 <param name="method" value="tl.leiden"/> 356 <param name="method" value="tl.leiden"/>
334 <param name="random_state" value="1"/> 357 <param name="random_state" value="1"/>
335 <param name="random_state" value="10"/> 358 <param name="random_state" value="10"/>
350 <has_text_matching expression="n_iterations=-1"/> 373 <has_text_matching expression="n_iterations=-1"/>
351 </assert_contents> 374 </assert_contents>
352 </output> 375 </output>
353 <output name="anndata_out" file="tl.leiden.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/> 376 <output name="anndata_out" file="tl.leiden.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/>
354 </test> 377 </test>
355 <test> 378 <test expect_num_outputs="2">
356 <!-- test 1 --> 379 <!-- test 3 -->
357 <param name="adata" value="krumsiek11.h5ad" /> 380 <param name="adata" value="krumsiek11.h5ad" />
358 <conditional name="method"> 381 <conditional name="method">
359 <param name="method" value="pp.pca"/> 382 <param name="method" value="pp.pca"/>
360 <param name="n_comps" value="50"/> 383 <param name="n_comps" value="50"/>
361 <param name="dtype" value="float32"/> 384 <param name="dtype" value="float32"/>
382 <has_text_matching expression="use_highly_variable=False"/> 405 <has_text_matching expression="use_highly_variable=False"/>
383 </assert_contents> 406 </assert_contents>
384 </output> 407 </output>
385 <output name="anndata_out" file="pp.pca.krumsiek11.h5ad" ftype="h5ad" compare="sim_size" delta="100000" delta_frac="0.15"/> 408 <output name="anndata_out" file="pp.pca.krumsiek11.h5ad" ftype="h5ad" compare="sim_size" delta="100000" delta_frac="0.15"/>
386 </test> 409 </test>
387 <!--<test> 410 <test expect_num_outputs="2">
388 < test 3 > 411 <!-- test 4 -->
389 <param name="adata" value="krumsiek11.h5ad" /> 412 <param name="adata" value="krumsiek11.h5ad" />
390 <conditional name="method"> 413 <conditional name="method">
391 <param name="method" value="pp.pca"/> 414 <param name="method" value="pp.pca"/>
392 <param name="n_comps" value="20"/> 415 <param name="n_comps" value="20"/>
393 <param name="dtype" value="float32"/> 416 <param name="dtype" value="float32"/>
395 <param name="chunked" value="True"/> 418 <param name="chunked" value="True"/>
396 <param name="chunk_size" value="50"/> 419 <param name="chunk_size" value="50"/>
397 </conditional> 420 </conditional>
398 <param name="use_highly_variable" value="false"/> 421 <param name="use_highly_variable" value="false"/>
399 </conditional> 422 </conditional>
400 <assert_stdout> 423 <section name="advanced_common">
401 <has_text_matching expression="sc.pp.pca"/> 424 <param name="show_log" value="true" />
402 <has_text_matching expression="data=adata"/> 425 </section>
403 <has_text_matching expression="n_comps=20"/> 426 <output name="hidden_output">
404 <has_text_matching expression="dtype='float32'"/> 427 <assert_contents>
405 <has_text_matching expression="copy=False"/> 428 <has_text_matching expression="sc.pp.pca"/>
406 <has_text_matching expression="chunked=True"/> 429 <has_text_matching expression="data=adata"/>
407 <has_text_matching expression="chunk_size=50"/> 430 <has_text_matching expression="dtype='float32'"/>
408 <has_text_matching expression="use_highly_variable=False"/> 431 <has_text_matching expression="copy=False"/>
409 </assert_stdout> 432 <has_text_matching expression="chunked=True"/>
433 <has_text_matching expression="chunk_size=50"/>
434 <has_text_matching expression="use_highly_variable=False"/>
435 </assert_contents>
436 </output>
410 <output name="anndata_out" file="pp.pca.krumsiek11_chunk.h5ad" ftype="h5ad" compare="sim_size"/> 437 <output name="anndata_out" file="pp.pca.krumsiek11_chunk.h5ad" ftype="h5ad" compare="sim_size"/>
411 </test> 438 </test>
412 --> 439 <test expect_num_outputs="2">
413 <test> 440 <!-- test 5 -->
414 <!-- test 2 -->
415 <param name="adata" value="krumsiek11.h5ad" /> 441 <param name="adata" value="krumsiek11.h5ad" />
416 <conditional name="method"> 442 <conditional name="method">
417 <param name="method" value="tl.pca"/> 443 <param name="method" value="tl.pca"/>
418 <param name="n_comps" value="50"/> 444 <param name="n_comps" value="50"/>
419 <param name="dtype" value="float32"/> 445 <param name="dtype" value="float32"/>
439 <has_text_matching expression="use_highly_variable=False"/> 465 <has_text_matching expression="use_highly_variable=False"/>
440 </assert_contents> 466 </assert_contents>
441 </output> 467 </output>
442 <output name="anndata_out" file="tl.pca.krumsiek11.h5ad" ftype="h5ad" compare="sim_size" delta="100000" delta_frac="0.15"/> 468 <output name="anndata_out" file="tl.pca.krumsiek11.h5ad" ftype="h5ad" compare="sim_size" delta="100000" delta_frac="0.15"/>
443 </test> 469 </test>
444 <test> 470 <test expect_num_outputs="2">
445 <!-- test 3 --> 471 <!-- test 6 -->
446 <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" /> 472 <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
447 <conditional name="method"> 473 <conditional name="method">
448 <param name="method" value="tl.diffmap"/> 474 <param name="method" value="tl.diffmap"/>
449 <param name="n_comps" value="15"/> 475 <param name="n_comps" value="15"/>
450 </conditional> 476 </conditional>
456 <has_text_matching expression="sc.tl.diffmap"/> 482 <has_text_matching expression="sc.tl.diffmap"/>
457 </assert_contents> 483 </assert_contents>
458 </output> 484 </output>
459 <output name="anndata_out" file="tl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/> 485 <output name="anndata_out" file="tl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/>
460 </test> 486 </test>
461 <test> 487 <test expect_num_outputs="2">
462 <!-- test 4 --> 488 <!-- test 7 -->
463 <param name="adata" value="krumsiek11.h5ad" /> 489 <param name="adata" value="krumsiek11.h5ad" />
464 <conditional name="method"> 490 <conditional name="method">
465 <param name="method" value="tl.tsne"/> 491 <param name="method" value="tl.tsne"/>
466 <param name="n_pcs" value="10"/> 492 <param name="n_pcs" value="10"/>
467 <param name="perplexity" value="30"/> 493 <param name="perplexity" value="30"/>
484 <has_text_matching expression="use_fast_tsne=True"/> 510 <has_text_matching expression="use_fast_tsne=True"/>
485 </assert_contents> 511 </assert_contents>
486 </output> 512 </output>
487 <output name="anndata_out" file="tl.tsne.krumsiek11.h5ad" ftype="h5ad" compare="sim_size"/> 513 <output name="anndata_out" file="tl.tsne.krumsiek11.h5ad" ftype="h5ad" compare="sim_size"/>
488 </test> 514 </test>
489 <test> 515 <test expect_num_outputs="2">
490 <!-- test 5 --> 516 <!-- test 8 -->
491 <param name="adata" value="pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" /> 517 <param name="adata" value="pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" />
492 <conditional name="method"> 518 <conditional name="method">
493 <param name="method" value="tl.umap"/> 519 <param name="method" value="tl.umap"/>
494 <param name="min_dist" value="0.5"/> 520 <param name="min_dist" value="0.5"/>
495 <param name="spread" value="1.0"/> 521 <param name="spread" value="1.0"/>
522 <assert_contents> 548 <assert_contents>
523 <has_h5_keys keys="X, obs, obsm, uns, var" /> 549 <has_h5_keys keys="X, obs, obsm, uns, var" />
524 </assert_contents> 550 </assert_contents>
525 </output> 551 </output>
526 </test> 552 </test>
527 <test> 553 <test expect_num_outputs="2">
528 <!-- test 6 --> 554 <!-- test 9 -->
529 <param name="adata" value="pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad"/> 555 <param name="adata" value="pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad"/>
530 <conditional name="method"> 556 <conditional name="method">
531 <param name="method" value="tl.draw_graph"/> 557 <param name="method" value="tl.draw_graph"/>
532 <param name="layout" value="fa"/> 558 <param name="layout" value="fa"/>
533 <param name="random_state" value="0"/> 559 <param name="random_state" value="0"/>
542 <has_text_matching expression="random_state=0"/> 568 <has_text_matching expression="random_state=0"/>
543 </assert_contents> 569 </assert_contents>
544 </output> 570 </output>
545 <output name="anndata_out" file="tl.draw_graph.pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/> 571 <output name="anndata_out" file="tl.draw_graph.pp.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/>
546 </test> 572 </test>
547 <test> 573 <test expect_num_outputs="2">
548 <!-- test 7 --> 574 <!-- test 10 -->
549 <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad"/> 575 <param name="adata" value="pp.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad"/>
550 <conditional name="method"> 576 <conditional name="method">
551 <param name="method" value="tl.paga"/> 577 <param name="method" value="tl.paga"/>
552 <param name="groups" value="paul15_clusters"/> 578 <param name="groups" value="paul15_clusters"/>
553 <param name="use_rna_velocity" value="False"/> 579 <param name="use_rna_velocity" value="False"/>
564 <has_text_matching expression="model='v1.2'"/> 590 <has_text_matching expression="model='v1.2'"/>
565 </assert_contents> 591 </assert_contents>
566 </output> 592 </output>
567 <output name="anndata_out" file="tl.paga.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/> 593 <output name="anndata_out" file="tl.paga.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/>
568 </test> 594 </test>
569 <test> 595 <test expect_num_outputs="2">
570 <!-- test 8 --> 596 <!-- test 11 -->
571 <param name="adata" value="tl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" /> 597 <param name="adata" value="tl.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" />
572 <conditional name="method"> 598 <conditional name="method">
573 <param name="method" value="tl.dpt"/> 599 <param name="method" value="tl.dpt"/>
574 <param name="n_dcs" value="15"/> 600 <param name="n_dcs" value="15"/>
575 <param name="n_branchings" value="1"/> 601 <param name="n_branchings" value="1"/>
588 <has_text_matching expression="allow_kendall_tau_shift=True"/> 614 <has_text_matching expression="allow_kendall_tau_shift=True"/>
589 </assert_contents> 615 </assert_contents>
590 </output> 616 </output>
591 <output name="anndata_out" file="tl.dpt.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/> 617 <output name="anndata_out" file="tl.dpt.diffmap.neighbors_gauss_braycurtis.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/>
592 </test> 618 </test>
619 <test expect_num_outputs="2">
620 <!-- test 12 -->
621 <param name="adata" value="tl.umap.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" />
622 <conditional name="method">
623 <param name="method" value="tl.embedding_density"/>
624 <param name="basis" value="umap"/>
625 <param name="key_added" value="umap_density"/>
626 </conditional>
627 <section name="advanced_common">
628 <param name="show_log" value="true" />
629 </section>
630 <output name="hidden_output">
631 <assert_contents>
632 <has_text_matching expression="sc.tl.embedding_density"/>
633 <has_text_matching expression="basis='umap'"/>
634 <has_text_matching expression="key_added='umap_density'"/>
635 </assert_contents>
636 </output>
637 <output name="anndata_out" file="tl.embedding_density.umap.neighbors_umap_euclidean.recipe_weinreb17.paul15_subsample.h5ad" ftype="h5ad" compare="sim_size"/>
638 </test>
593 </tests> 639 </tests>
594 <help><![CDATA[ 640 <help><![CDATA[
595 Cluster cells into subgroups (`tl.louvain`) 641 Cluster cells into subgroups (`tl.louvain`)
596 =========================================== 642 ===========================================
597 643
600 analysis by Levine et al, 2015. 646 analysis by Levine et al, 2015.
601 647
602 This requires to run `pp.neighbors`, first. 648 This requires to run `pp.neighbors`, first.
603 649
604 More details on the `tl.louvain scanpy documentation 650 More details on the `tl.louvain scanpy documentation
605 <https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.tl.louvain.html>`_ 651 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.louvain.html>`_
606 652
607 Cluster cells into subgroups (`tl.leiden`) 653 Cluster cells into subgroups (`tl.leiden`)
608 ========================================== 654 ==========================================
609 655
610 Cluster cells using the Leiden algorithm (Traag et al, 2018), an improved version of the Louvain algorithm (Blondel et al, 2008). 656 Cluster cells using the Leiden algorithm (Traag et al, 2018), an improved version of the Louvain algorithm (Blondel et al, 2008).
611 657
612 The Louvain algorithm has been proposed for single-cell analysis by Levine et al, 2015. 658 The Louvain algorithm has been proposed for single-cell analysis by Levine et al, 2015.
613 659
614 More details on the `tl.leiden scanpy documentation 660 More details on the `tl.leiden scanpy documentation
615 <https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.tl.leiden.html>`_ 661 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.leiden.html>`_
616 662
617 Computes PCA (principal component analysis) coordinates, loadings and variance decomposition, using `pp.pca` 663 Computes PCA (principal component analysis) coordinates, loadings and variance decomposition, using `pp.pca`
618 ============================================================================================================ 664 ============================================================================================================
619 665
620 @CMD_pca_outputs@ 666 @CMD_pca_outputs@
621 667
622 More details on the `pp.pca scanpy documentation 668 More details on the `pp.pca scanpy documentation
623 <https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.pp.pca.html>`__ 669 <https://scanpy.readthedocs.io/en/stable/api/scanpy.pp.pca.html>`__
624 670
625 Computes PCA (principal component analysis) coordinates, loadings and variance decomposition, using `tl.pca` 671 Computes PCA (principal component analysis) coordinates, loadings and variance decomposition, using `tl.pca`
626 ============================================================================================================ 672 ============================================================================================================
627 673
628 @CMD_pca_outputs@ 674 @CMD_pca_outputs@
629 675
630 More details on the `tl.pca scanpy documentation 676 More details on the `tl.pca scanpy documentation
631 <https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.tl.pca.html>`__ 677 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.pca.html>`__
632 678
633 Diffusion Maps, using `tl.diffmap` 679 Diffusion Maps, using `tl.diffmap`
634 ================================== 680 ==================================
635 681
636 Diffusion maps (Coifman et al 2005) has been proposed for visualizing single-cell 682 Diffusion maps (Coifman et al 2005) has been proposed for visualizing single-cell
643 using a Gaussian kernel, use `method=='gauss'` in 689 using a Gaussian kernel, use `method=='gauss'` in
644 `pp.neighbors`. To use an exponential kernel, use the default 690 `pp.neighbors`. To use an exponential kernel, use the default
645 `method=='umap'`. Differences between these options shouldn't usually be 691 `method=='umap'`. Differences between these options shouldn't usually be
646 dramatic. 692 dramatic.
647 693
648 The diffusion map representation of data are added to the return AnnData in the multi-dimensional 694 The diffusion map representation of data are added to the return AnnData in the multi-dimensional
649 observations annotation (obsm). It is the right eigen basis of the transition matrix with eigenvectors 695 observations annotation (obsm). It is the right eigen basis of the transition matrix with eigenvectors
650 as colum. It can be accessed using the inspect tool for AnnData 696 as colum. It can be accessed using the inspect tool for AnnData
651 697
652 More details on the `tl.diffmap scanpy documentation 698 More details on the `tl.diffmap scanpy documentation
653 <https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.tl.diffmap.html>`__ 699 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.diffmap.html>`__
654 700
655 t-distributed stochastic neighborhood embedding (tSNE), using `tl.tsne` 701 t-distributed stochastic neighborhood embedding (tSNE), using `tl.tsne`
656 ======================================================================= 702 =======================================================================
657 703
658 t-distributed stochastic neighborhood embedding (tSNE) (Maaten et al, 2008) has been 704 t-distributed stochastic neighborhood embedding (tSNE) (Maaten et al, 2008) has been
659 proposed for visualizating single-cell data by (Amir et al, 2013). Here, by default, 705 proposed for visualizating single-cell data by (Amir et al, 2013). Here, by default,
660 we use the implementation of *scikit-learn* (Pedregosa et al, 2011). 706 we use the implementation of *scikit-learn* (Pedregosa et al, 2011).
661 707
662 It returns `X_tsne`, tSNE coordinates of data. 708 It returns `X_tsne`, tSNE coordinates of data.
663 709
664 More details on the `tl.tsne scanpy documentation 710 More details on the `tl.tsne scanpy documentation
665 <https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.tl.tsne.html>`__ 711 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.tsne.html>`__
666 712
667 Embed the neighborhood graph using UMAP, using `tl.umap` 713 Embed the neighborhood graph using UMAP, using `tl.umap`
668 ======================================================== 714 ========================================================
669 715
670 UMAP (Uniform Manifold Approximation and Projection) is a manifold learning 716 UMAP (Uniform Manifold Approximation and Projection) is a manifold learning
676 distribution of distances in the high-dimensional space. We use the 722 distribution of distances in the high-dimensional space. We use the
677 implementation of `umap-learn <https://github.com/lmcinnes/umap>`__ 723 implementation of `umap-learn <https://github.com/lmcinnes/umap>`__
678 (McInnes et al, 2018). For a few comparisons of UMAP with tSNE, see this `preprint 724 (McInnes et al, 2018). For a few comparisons of UMAP with tSNE, see this `preprint
679 <https://doi.org/10.1101/298430>`__. 725 <https://doi.org/10.1101/298430>`__.
680 726
681 The UMAP coordinates of data are added to the return AnnData in the multi-dimensional 727 The UMAP coordinates of data are added to the return AnnData in the multi-dimensional
682 observations annotation (obsm). This data is accessible using the inspect tool for AnnData 728 observations annotation (obsm). This data is accessible using the inspect tool for AnnData
683 729
684 More details on the `tl.umap scanpy documentation 730 More details on the `tl.umap scanpy documentation
685 <https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.tl.umap.html>`__ 731 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.umap.html>`__
686 732
687 Force-directed graph drawing, using `tl.draw_graph` 733 Force-directed graph drawing, using `tl.draw_graph`
688 =================================================== 734 ===================================================
689 735
690 Force-directed graph drawing describes a class of long-established algorithms for visualizing graphs. 736 Force-directed graph drawing describes a class of long-established algorithms for visualizing graphs.
691 It has been suggested for visualizing single-cell data by Islam et al, 11. 737 It has been suggested for visualizing single-cell data by Islam et al, 11.
692 Many other layouts as implemented in igraph are available. Similar approaches have been used by 738 Many other layouts as implemented in igraph are available. Similar approaches have been used by
693 Zunder et al, 2015 or Weinreb et al, 2016. 739 Zunder et al, 2015 or Weinreb et al, 2016.
694 740
695 This is an alternative to tSNE that often preserves the topology of the data better. 741 This is an alternative to tSNE that often preserves the topology of the data better.
696 This requires to run `pp.neighbors`, first. 742 This requires to run `pp.neighbors`, first.
697 743
698 The default layout (ForceAtlas2) uses the package fa2. 744 The default layout (ForceAtlas2) uses the package fa2.
699 745
700 The coordinates of graph layout are added to the return AnnData in the multi-dimensional 746 The coordinates of graph layout are added to the return AnnData in the multi-dimensional
701 observations annotation (obsm). This data is accessible using the inspect tool for AnnData. 747 observations annotation (obsm). This data is accessible using the inspect tool for AnnData.
702 748
703 More details on the `tl.draw_graph scanpy documentation 749 More details on the `tl.draw_graph scanpy documentation
704 <https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.tl.draw_graph.html>`__ 750 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.draw_graph.html>`__
705 751
706 Infer progression of cells through geodesic distance along the graph (`tl.dpt`) 752 Infer progression of cells through geodesic distance along the graph (`tl.dpt`)
707 =============================================================================== 753 ===============================================================================
708 754
709 Reconstruct the progression of a biological process from snapshot 755 Reconstruct the progression of a biological process from snapshot
712 version, which is able to deal with disconnected graphs (Wolf et al, 2017) and can 758 version, which is able to deal with disconnected graphs (Wolf et al, 2017) and can
713 be run in a `hierarchical` mode by setting the parameter 759 be run in a `hierarchical` mode by setting the parameter
714 `n_branchings>1`. We recommend, however, to only use 760 `n_branchings>1`. We recommend, however, to only use
715 `tl.dpt` for computing pseudotime (`n_branchings=0`) and 761 `tl.dpt` for computing pseudotime (`n_branchings=0`) and
716 to detect branchings via `paga`. For pseudotime, you need 762 to detect branchings via `paga`. For pseudotime, you need
717 to annotate your data with a root cell. 763 to annotate your data with a root cell.
718 764
719 This requires to run `pp.neighbors`, first. In order to 765 This requires to run `pp.neighbors`, first. In order to
720 reproduce the original implementation of DPT, use `method=='gauss'` in 766 reproduce the original implementation of DPT, use `method=='gauss'` in
721 this. Using the default `method=='umap'` only leads to minor quantitative 767 this. Using the default `method=='umap'` only leads to minor quantitative
722 differences, though. 768 differences, though.
728 - dpt_groups : Array of dim (number of samples) that stores the subgroup id ('0','1', ...) for each cell. The groups typically correspond to 'progenitor cells', 'undecided cells' or 'branches' of a process. 774 - dpt_groups : Array of dim (number of samples) that stores the subgroup id ('0','1', ...) for each cell. The groups typically correspond to 'progenitor cells', 'undecided cells' or 'branches' of a process.
729 775
730 The tool is similar to the R package `destiny` of Angerer et al (2016). 776 The tool is similar to the R package `destiny` of Angerer et al (2016).
731 777
732 More details on the `tl.dpt scanpy documentation 778 More details on the `tl.dpt scanpy documentation
733 <https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.tl.dpt.html>`_ 779 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.dpt.html>`_
734 780
735 781
736 Generate cellular maps of differentiation manifolds with complex topologies (`tl.paga`) 782 Generate cellular maps of differentiation manifolds with complex topologies (`tl.paga`)
737 ======================================================================================= 783 =======================================================================================
738 784
759 - Adjacency matrix of the tree-like subgraph that best explains the topology (connectivities_tree) 805 - Adjacency matrix of the tree-like subgraph that best explains the topology (connectivities_tree)
760 806
761 These datasets are stored in the unstructured annotation (uns) and can be accessed using the inspect tool for AnnData objects 807 These datasets are stored in the unstructured annotation (uns) and can be accessed using the inspect tool for AnnData objects
762 808
763 More details on the `tl.paga scanpy documentation 809 More details on the `tl.paga scanpy documentation
764 <https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.tl.paga.html>`_ 810 <https://scanpy.readthedocs.io/en/stable/api/scanpy.tl.paga.html>`_
765 ]]></help> 811 ]]></help>
766 <expand macro="citations"/> 812 <expand macro="citations"/>
767 </tool> 813 </tool>