comparison neighbors_clusters_markers.xml @ 0:94f1b9c7286f draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/seurat_v5 commit a9214c07b0cc929a51fd92a369bb89c675b6c88d
author iuc
date Wed, 11 Sep 2024 10:21:37 +0000
parents
children 51eb02d9b17a
comparison
equal deleted inserted replaced
-1:000000000000 0:94f1b9c7286f
1 <tool id="seurat_clustering" name="Seurat Find Clusters" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description>- Neighbors and Markers</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="requirements"/>
7 <expand macro="version_command"/>
8 <command detect_errors="exit_code"><![CDATA[
9 @CMD@
10 ]]></command>
11 <configfiles>
12 <configfile name="script_file"><![CDATA[
13 @CMD_imports@
14 @CMD_read_inputs@
15
16 #if $method.method == 'FindNeighbors'
17 seurat_obj<-FindNeighbors(
18 seurat_obj,
19 #if $method.reduction != ''
20 reduction = '$method.reduction',
21 #end if
22 #if $method.dims != ''
23 dims = 1:$method.dims,
24 #end if
25 k.param = $method.k_param,
26 nn.method = '$method.nn_method.nn_method',
27 #if $method.nn_method.nn_method == 'rann'
28 nn.eps = $method.nn_method.nn_eps,
29 #else if $method.nn_method.nn_method == 'annoy'
30 annoy.metric = '$method.nn_method.annoy_metric',
31 #end if
32 compute.snn = $method.adv.compute_snn.compute_snn,
33 #if $method.adv.compute_snn.compute_snn == 'TRUE'
34 #if $method.adv.compute_snn.prune_snn
35 prune.snn = $method.adv.compute_snn.prune_snn,
36 #end if
37 distance.matrix = $method.adv.compute_snn.distance_matrix,
38 #else if $method.adv.compute_snn.compute_snn == 'FALSE'
39 distance.matrix = $method.adv.compute_snn.distance_matrix.distance_matrix,
40 #if $method.adv.compute_snn.distance_matrix.distance_matrix == 'FALSE'
41 return.neighbor = $method.adv.compute_snn.distance_matrix.return_neighbor,
42 #end if
43 #end if
44 l2.norm = $method.adv.l2_norm,
45 n.trees = $method.adv.n_trees
46 )
47
48 #else if $method.method == 'FindMultiModalNeighbors'
49 seurat_obj<-FindMultiModalNeighbors(
50 seurat_obj,
51 reduction.list = list('$method.reduction_1', '$method.reduction_2'),
52 dims.list = list(1:$method.dims_1, 1:$method.dims_2),
53 k.nn = $method.k_nn,
54 knn.graph.name = '$method.adv.knn_graph_name',
55 snn.graph.name = '$method.adv.snn_graph_name',
56 weighted.nn.name = '$method.adv.weighted_nn_name',
57 #if $method.adv.modality_weight_name != ''
58 modality.weight.name = '$method.adv.modality_weight_name',
59 #end if
60 knn.range = $method.adv.knn_range
61 )
62
63 #else if $method.method == 'FindClusters'
64 @reticulate_hack@
65 seurat_obj<-FindClusters(
66 seurat_obj,
67 modularity.fxn = $method.modularity_fxn,
68 resolution = $method.resolution,
69 algorithm = $method.algorithm.algorithm,
70 #if $method.algorithm.algorithm == '4'
71 #if $method.algorithm.initial_membership
72 initial.membership = $method.algorithm.initial_membership,
73 #end if
74 #if $method.algorithm.node_sizes
75 node.sizes = $method.algorithm.node_sizes,
76 #end if
77 method = '$method.algorithm.method_cluster',
78 #end if
79 n.start = $method.n_start,
80 n.iter = $method.n_iter,
81 random.seed = $method.random_seed,
82 #if $method.graph_name != ''
83 graph.name = '$method.graph_name',
84 #end if
85 #if $method.cluster_name != ''
86 cluster.name = '$method.cluster_name'
87 #end if
88 )
89
90 #else if $method.method == 'FindAllMarkers'
91
92 #if $method.features
93 features_list<-paste(readLines('$method.features'), collapse=",")
94 #end if
95
96 seurat_obj<-FindAllMarkers(
97 seurat_obj,
98 #if $method.features
99 features = c(unlist(strsplit(features_list, ","))),
100 #end if
101 logfc.threshold = $method.logfc_threshold,
102 test.use = '$method.test_use.test_use',
103 #if $method.test_use.test_use == 'negbinom'
104 #if $method.test_use.latent_vars != ''
105 latent.vars = c(unlist(strsplit(gsub(" ", "", '$method.test_use.latent_vars'), ","))),
106 #end if
107 min.cells.feature = $method.test_use.min_cells_feature,
108 #else if $method.test_use.test_use == 'poisson'
109 #if $method.test_use.latent_vars != ''
110 latent.vars = c(unlist(strsplit(gsub(" ", "", '$method.test_use.latent_vars'), ","))),
111 #end if
112 min.cells.feature = $method.test_use.min_cells_feature,
113 #else if $method.test_use.test_use =='LR'
114 #if $method.test_use.latent_vars != ''
115 latent.vars = c(unlist(strsplit(gsub(" ", "", '$method.test_use.latent_vars'), ","))),
116 #end if
117 #else if $method.test_use.test_use == 'MAST'
118 #if $method.test_use.latent_vars != ''
119 latent.vars = c(unlist(strsplit(gsub(" ", "", '$method.test_use.latent_vars'), ","))),
120 #end if
121 #else if $method.test_use.test_use == 'roc'
122 return.thresh = $method.test_use.return_thresh,
123 #end if
124 slot = '$method.slot',
125 #if $method.adv.assay != ''
126 assay = '$method.adv.assay',
127 #end if
128 min.pct = $method.adv.min_pct,
129 #if $method.adv.min_diff_pct
130 min.diff.pct = $method.adv.min_diff_pct,
131 #end if
132 only.pos = $method.adv.only_pos,
133 #if $method.adv.max_cells_per_ident
134 max.cells.per.ident = $method.adv.max_cells_per_ident,
135 #end if
136 #if $method.adv.random_seed
137 random.seed = $method.adv.random_seed,
138 #end if
139 min.cells.group = $method.adv.min_cells_group,
140 #if $method.fc_name != ''
141 fc.name = '$method.adv.fc_name',
142 #end if
143 base = $method.adv.base,
144 densify = $method.adv.densify
145 )
146
147 #if $method.set_top_markers.set_top_markers == 'true'
148 N = $method.set_top_markers.topN
149 seurat_obj<-dplyr::slice_head(seurat_obj, n = N, by = cluster)
150 #end if
151
152 @CMD_write_markers_tab@
153
154 #else if $method.method == 'FindMarkers'
155
156 #if $method.features
157 features_list<-paste(readLines('$method.features'), collapse=",")
158 #end if
159 #if $method.cells.cells == 'true'
160 cell_1_list<-paste(readLines('$method.cells_1'), collapse=",")
161 cell_2_list<-paste(readLines('$method.cells_2'), collapse=",")
162 #end if
163
164 seurat_obj<-FindMarkers(
165 seurat_obj,
166 slot = '$method.slot',
167 #if $method.cells.cells == 'true'
168 cells.1 = c(unlist(strsplit(cell_1_list, ","))),
169 cells.2 = c(unlist(strsplit(cell_2_list, ","))),
170 #end if
171 #if $method.regroup.regroup == 'true'
172 group.by = '$method.regroup.group_by',
173 #if $method.regroup.subset_ident != ''
174 subset.ident = '$method.regroup.subset_ident',
175 #end if
176 #end if
177 #if $method.ident.ident == 'true'
178 ident.1 = '$method.ident.ident_1',
179 #if $method.ident.ident_2 != ''
180 ident.2 = c(unlist(strsplit(gsub(" ", "", '$method.ident.ident_2'), ","))),
181 #end if
182 #end if
183 #if $method.features
184 features = c(unlist(strsplit(features_list, ","))),
185 #end if
186 logfc.threshold = $method.logfc_threshold,
187 test.use = '$method.test_use.test_use',
188 #if $method.test_use.test_use == 'negbinom'
189 #if $method.test_use.latent_vars != ''
190 latent.vars = c(unlist(strsplit(gsub(" ", "", '$method.test_use.latent_vars'), ","))),
191 #end if
192 min.cells.feature = $method.test_use.min_cells_feature,
193 #else if $method.test_use.test_use == 'poisson'
194 #if $method.test_use.latent_vars != ''
195 latent.vars = c(unlist(strsplit(gsub(" ", "", '$method.test_use.latent_vars'), ","))),
196 #end if
197 min.cells.feature = $method.test_use.min_cells_feature,
198 #else if $method.test_use.test_use =='LR'
199 #if $method.test_use.latent_vars != ''
200 latent.vars = c(unlist(strsplit(gsub(" ", "", '$method.test_use.latent_vars'), ","))),
201 #end if
202 #else if $method.test_use.test_use == 'MAST'
203 #if $method.test_use.latent_vars != ''
204 latent.vars = c(unlist(strsplit(gsub(" ", "", '$method.test_use.latent_vars'), ","))),
205 #end if
206 #end if
207 #if $method.adv.assay != ''
208 assay = '$method.adv.assay',
209 #end if
210 min.pct = $method.adv.min_pct,
211 #if $method.adv.min_diff_pct
212 min.diff.pct = $method.adv.min_diff_pct,
213 #end if
214 only.pos = $method.adv.only_pos,
215 #if $method.adv.max_cells_per_ident
216 max.cells.per.ident = $method.adv.max_cells_per_ident,
217 #end if
218 #if $method.adv.random_seed
219 random.seed = $method.adv.random_seed,
220 #end if
221 min.cells.group = $method.adv.min_cells_group,
222 #if $method.adv.fc_name != ''
223 fc.name = '$method.adv.fc_name',
224 #end if
225 densify = $method.adv.densify
226 )
227
228 @CMD_write_markers_tab@
229
230 #else if $method.method == 'FindConservedMarkers'
231 seurat_obj<-FindConservedMarkers(
232 seurat_obj,
233 ident.1 = $method.ident_1,
234 #if $method.ident_2 != ''
235 ident.2 = $method.ident_2,
236 #end if
237 grouping.var = '$method.grouping_var',
238 #if $method.assay != ''
239 assay = '$method.assay',
240 #end if
241 slot = '$method.slot',
242 min.cells.group = $method.min_cells_group
243 )
244
245 @CMD_write_markers_tab@
246
247 #end if
248
249 @CMD_rds_write_outputs@
250
251 ]]></configfile>
252 </configfiles>
253 <inputs>
254 <expand macro="input_rds"/>
255 <conditional name="method">
256 <param name="method" type="select" label="Method used">
257 <option value="FindNeighbors">Compute nearest neighbors with 'FindNeighbors'</option>
258 <option value="FindMultiModalNeighbors">Compute nearest neighbors for multimodal data with 'FindMultiModalNeighbors'</option>
259 <option value="FindClusters">Identify cell clusters with 'FindClusters'</option>
260 <option value="FindAllMarkers">Identify marker genes with 'FindAllMarkers'</option>
261 <option value="FindMarkers">Identify marker genes for specific groups with 'FindMarkers'</option>
262 <option value="FindConservedMarkers">Find markers conserved between groups with 'FindConservedMarkers'</option>
263 </param>
264 <when value="FindNeighbors">
265 <expand macro="select_reduction_pca"/>
266 <expand macro="set_dims"/>
267 <param name="k_param" type="integer" value="20" label="Set k for k-nearest neighbors" help="(k.param)"/>
268 <conditional name="nn_method">
269 <param name="nn_method" type="select" label="Method for finding nearest neighbors" help="(nn.method)">
270 <option value="rann">rann</option>
271 <option value="annoy" selected="true">annoy</option>
272 </param>
273 <when value="rann">
274 <param name="nn_eps" type="float" value="0.0" label="Set error bound for nearest neighbor search" help="(nn.eps)"/>
275 </when>
276 <when value="annoy">
277 <param name="annoy_metric" type="select" label="Distance metric for annoy method" help="(annoy.metric)">
278 <option value="euclidean" selected="true">euclidean</option>
279 <option value="cosine">cosine</option>
280 <option value="manhattan">manhattan</option>
281 <option value="hamming">hamming</option>
282 </param>
283 </when>
284 </conditional>
285 <section name="adv" title="Advanced Options">
286 <param name="n_trees" type="integer" value="50" label="Number of trees for nearest neighbor search" help="(n.trees)"/>
287 <param name="l2_norm" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Take l2Norm of data" help="(l2.norm)"/>
288 <conditional name="compute_snn">
289 <param name="compute_snn" type="select" label="Compute the shared nearest neighbor (SNN) graph" help="(compute.snn)">
290 <option value="FALSE">No</option>
291 <option value="TRUE" selected="true">Yes</option>
292 </param>
293 <when value="FALSE">
294 <conditional name="distance_matrix">
295 <param name="distance_matrix" type="select" label="Use a distance matrix" help="(distance.matrix)">
296 <option value="FALSE" selected="true">No</option>
297 <option value="TRUE">Yes</option>
298 </param>
299 <when value="FALSE">
300 <param name="return_neighbor" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Return result as neighbor object" help="(return.neighbor)"/>
301 </when>
302 <when value="TRUE"></when>
303 </conditional>
304 </when>
305 <when value="TRUE">
306 <param name="prune_snn" type="float" optional="true" value="" min="0" max="1" label="Set cutoff for Jaccard index when computing overlap for SNN" help="0 no pruning, 1 prune everything (prune.SNN)"/>
307 <param name="distance_matrix" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="false" label="Use a distance matrix" help="(distance.matrix)"/>
308 </when>
309 </conditional>
310 </section>
311 </when>
312 <when value="FindMultiModalNeighbors">
313 <param name="reduction_1" type="text" value="pca" label="Reduction to use for first modality">
314 <expand macro="valid_name"/>
315 </param>
316 <param name="dims_1" type="integer" value="10" label="Number of dimensions to use from first reduction"/>
317 <param name="reduction_2" type="text" value="apca" label="Reduction to use for second modality">
318 <expand macro="valid_name"/>
319 </param>
320 <param name="dims_2" type="integer" value="10" label="Number of dimensions to use from second reduction"/>
321 <param name="k_nn" type="integer" value="20" label="Number of multimodal neighbors to compute" help="(k.nn)"/>
322 <section name="adv" title="Advanced Options">
323 <param name="knn_graph_name" type="text" value="wknn" label="Name for multimodal knn graph" help="(knn.graph.name)">
324 <expand macro="valid_name"/>
325 </param>
326 <param name="snn_graph_name" type="text" value="wsnn" label="Name for multimodal snn graph" help="(snn.graph.name)">
327 <expand macro="valid_name"/>
328 </param>
329 <param name="weighted_nn_name" type="text" value="weighted.nn" label="Name for multimodal neighbor object" help="(weighted.nn.name)">
330 <expand macro="valid_name"/>
331 </param>
332 <param name="modality_weight_name" optional="true" type="text" value="" label="Name for storing modality weights in metadata" help="(modality.weight.name)">
333 <expand macro="valid_name"/>
334 </param>
335 <param name="knn_range" type="integer" value="200" label="Number of approximate neighbors to compute" help="(knn.range)"/>
336 </section>
337 </when>
338 <when value="FindClusters">
339 <param name="modularity_fxn" type="select" label="Select modularity function" help="(modularity.fxn)">
340 <option value="1" selected="true">standard</option>
341 <option value="2">alternative</option>
342 </param>
343 <param argument="resolution" type="float" value="0.8" label="Resolution"/>
344 <conditional name="algorithm">
345 <param argument="algorithm" type="select" label="Algorithm for modularity optimization">
346 <option value="1" selected="true">1. Original Louvain</option>
347 <option value="2">2. Louvain with multilevel refinement</option>
348 <option value="3">3. SLM</option>
349 <option value="4">4. Leiden</option>
350 </param>
351 <when value="4">
352 <param name="initial_membership" type="integer" optional="true" value="" label="Set initial membership when using Python leidenalg function" help="defaults to singleton partition (initial.membership)"/>
353 <param name="node_sizes" type="integer" optional="true" value="" label="Set node size when using Python leidenalg function" help="(node.sizes)"/>
354 <param name="method_cluster" type="select" label="Method for leiden" help="matrix is fast for small data, enable igraph for larger data (method.cluster)">
355 <option value="matrix" selected="true">matrix</option>
356 <option value="igraph">igraph</option>
357 </param>
358 </when>
359 <when value="1">
360 </when>
361 <when value="2">
362 </when>
363 <when value="3">
364 </when>
365 </conditional>
366 <param name="n_start" type="integer" value="10" label="Number of random starts" help="(n.start)"/>
367 <param name="n_iter" type="integer" value="10" label="Maximal number of iterations per random start" help="(n.iter)"/>
368 <param name="random_seed" type="integer" value="0" label="Set random seed" help="(random.seed)"/>
369 <param name="group_singletons" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="true" label="Group singletons into nearest cluster" help="Set to false to create a cluster for all singletons (group.singletons)"/>
370 <param name="graph_name" type="text" optional="true" value="" label="Name of graph to use for the clustering algorithm" help="(graph.name)">
371 <expand macro="valid_name"/>
372 </param>
373 <param name="cluster_name" type="text" optional="true" value="" label="Name for output clusters" help="(cluster.name)">
374 <expand macro="valid_name"/>
375 </param>
376 </when>
377 <when value="FindAllMarkers">
378 <expand macro="markers_inputs"/>
379 <conditional name="set_top_markers">
380 <param name="set_top_markers" type="select" label="Limit output to top N markers per cluster">
381 <option value="true">Yes</option>
382 <option value="false" selected="true">No</option>
383 </param>
384 <when value="true">
385 <expand macro="set_topN"/>
386 </when>
387 <when value="false">
388 </when>
389 </conditional>
390 <section name="adv" title="Advanced Options">
391 <param argument="base" type="integer" value="2" label="Base with respect to which logarithms are computed"/>
392 <expand macro="advanced_markers_inputs"/>
393 </section>
394 </when>
395 <when value="FindMarkers">
396 <conditional name="cells">
397 <param name="cells" type="select" label="Compare markers for two groups of cells">
398 <option value="true">Yes</option>
399 <option value="false" selected="true">No</option>
400 </param>
401 <when value="true">
402 <param name="cells_1" type="data" format="txt,tabular" label="List of cell names for group 1" help="text file with one cell on each line (cells.1)"/>
403 <param name="cells_2" type="data" format="txt,tabular" label="List of cell names for group 2" help="text file with one cell on each line (cells.2)"/>
404 </when>
405 <when value="false">
406 </when>
407 </conditional>
408 <conditional name="regroup">
409 <param name="regroup" type="select" label="Change cell identities before finding markers">
410 <option value="true">Yes</option>
411 <option value="false" selected="true">No</option>
412 </param>
413 <when value="true">
414 <param name="group_by" type="text" value="group" label="Name of identity class to regroup cells into" help="a group from the cell metadata to find markers for (group.by)"/>
415 <param name="subset_ident" type="text" optional="true" value="" label="Identity class to subset before regrouping" help="only include cells from this cluster/identity in each new group (subset.ident)"/>
416 </when>
417 <when value="false">
418 </when>
419 </conditional>
420 <conditional name="ident">
421 <param name="ident" type="select" label="Compare markers between clusters of cells">
422 <option value="true">Yes</option>
423 <option value="false" selected="true">No</option>
424 </param>
425 <when value="true">
426 <param name="ident_1" type="text" optional="true" value="" label="Identity class to define markers for" help="e.g. cluster number or ident group name (ident.1)"/>
427 <param name="ident_2" type="text" optional="true" value="" label="Second identity class to compare" help="e.g. comma-separated list of cluster numbers or idents, leave blank to compare ident.1 against all other clusters. (ident.2)">
428 <expand macro="valid_list"/>
429 </param>
430 </when>
431 <when value="false">
432 </when>
433 </conditional>
434 <expand macro="markers_inputs"/>
435 <section name="adv" title="Advanced Options">
436 <expand macro="advanced_markers_inputs"/>
437 </section>
438 </when>
439 <when value="FindConservedMarkers">
440 <param name="ident_1" type="text" value="ident1" label="Identity class to define markers for" help="(ident.1)"/>
441 <param name="ident_2" type="text" optional="true" value="" label="Second identity class for comparison" help="leave blank to compare ident.1 to all other cells (ident.2)"/>
442 <param name="grouping_var" type="text" value="group" label="Grouping variable" help="(grouping.var)"/>
443 <expand macro="select_assay_RNA"/>
444 <expand macro="select_slot_data"/>
445 <param name="min_cells_group" type="integer" value="3" label="Minimum number of cells in one group" help="(min.cells.group)"/>
446 </when>
447 </conditional>
448 <expand macro="inputs_common_advanced"/>
449 </inputs>
450 <outputs>
451 <expand macro="seurat_outputs"/>
452 <expand macro="markers_out"/>
453 </outputs>
454 <tests>
455 <test expect_num_outputs="2">
456 <!-- test1: FindNeighbors -->
457 <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/pca.rds"/>
458 <conditional name="method">
459 <param name="method" value="FindNeighbors"/>
460 <param name="dims" value="9"/>
461 <conditional name="nn_method">
462 <param name="nn_method" value="annoy"/>
463 <param name="annoy_metric" value="euclidean"/>
464 </conditional>
465 </conditional>
466 <section name="advanced_common">
467 <param name="show_log" value="true"/>
468 </section>
469 <output name="hidden_output">
470 <assert_contents>
471 <has_text_matching expression="FindNeighbors"/>
472 </assert_contents>
473 </output>
474 <output name="rds_out" location="https://zenodo.org/records/13732784/files/neighbors.rds" ftype="rds" compare="sim_size"/>
475 </test>
476 <test expect_num_outputs="2">
477 <!-- test2: FindMultiModalNeighbors -->
478 <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/citeseq_dims.rds"/>
479 <conditional name="method">
480 <param name="method" value="FindMultiModalNeighbors"/>
481 <param name="reduction_1" value="pca"/>
482 <param name="dims_1" value="8"/>
483 <param name="reduction_2" value="apca"/>
484 <param name="dims_2" value="8"/>
485 </conditional>
486 <section name="advanced_common">
487 <param name="show_log" value="true"/>
488 </section>
489 <output name="hidden_output">
490 <assert_contents>
491 <has_text_matching expression="FindMultiModalNeighbors"/>
492 </assert_contents>
493 </output>
494 <output name="rds_out" location="https://zenodo.org/records/13732784/files/multimodalneighbors.rds" ftype="rds" compare="sim_size"/>
495 </test>
496 <test expect_num_outputs="2">
497 <!-- test3: FindClusters -->
498 <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/neighbors.rds"/>
499 <conditional name="method">
500 <param name="method" value="FindClusters"/>
501 <param name="resolution" value="0.8"/>
502 <conditional name="algorithm">
503 <param name="algorithm" value="1"/>
504 </conditional>
505 <param name="n_start" value="10"/>
506 <param name="n_iter" value="10"/>
507 <param name="random_seed" value="0"/>
508 <param name="group_singletons" value="TRUE"/>
509 </conditional>
510 <section name="advanced_common">
511 <param name="show_log" value="true"/>
512 </section>
513 <output name="hidden_output">
514 <assert_contents>
515 <has_text_matching expression="FindClusters"/>
516 </assert_contents>
517 </output>
518 <output name="rds_out" location="https://zenodo.org/records/13732784/files/clusters.rds" ftype="rds" compare="sim_size"/>
519 </test>
520 <test expect_num_outputs="2">
521 <!-- test4: FindClusters - leidenalg Installed -->
522 <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/neighbors.rds"/>
523 <conditional name="method">
524 <param name="method" value="FindClusters"/>
525 <param name="modularity_fxn" value="1"/>
526 <param name="resolution" value="0.5"/>
527 <conditional name="algorithm">
528 <param name="algorithm" value="4"/>
529 <param name="method_cluster" value="matrix"/>
530 </conditional>
531 <param name="n_start" value="10"/>
532 <param name="n_iter" value="10"/>
533 <param name="random_seed" value="0"/>
534 <param name="group_singletons" value="TRUE"/>
535 </conditional>
536 <section name="advanced_common">
537 <param name="show_log" value="true"/>
538 </section>
539 <output name="hidden_output">
540 <assert_contents>
541 <has_text_matching expression="FindClusters"/>
542 </assert_contents>
543 </output>
544 <output name="rds_out" location="https://zenodo.org/records/13732784/files/clusters_leiden.rds" ftype="rds" compare="sim_size"/>
545 </test>
546 <test expect_num_outputs="3">
547 <!-- test5: FindAllMarkers -->
548 <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/clusters.rds"/>
549 <conditional name="method">
550 <param name="method" value="FindAllMarkers"/>
551 <param name="logfc_threshold" value="0.1"/>
552 <param name="slot" value="data"/>
553 <conditional name="test_use">
554 <param name="test_use" value="wilcox"/>
555 </conditional>
556 <conditional name="set_top_markers">
557 <param name="set_top_markers" value="true"/>
558 </conditional>
559 </conditional>
560 <section name="advanced_common">
561 <param name="show_log" value="true"/>
562 </section>
563 <output name="hidden_output">
564 <assert_contents>
565 <has_text_matching expression="FindAllMarkers"/>
566 </assert_contents>
567 </output>
568 <output name="rds_out" location="https://zenodo.org/records/13732784/files/allmarkers.rds" ftype="rds"/>
569 <output name="markers_tabular" location="https://zenodo.org/records/13732784/files/allmarkers.csv" ftype="csv">
570 <assert_contents>
571 <has_text_matching expression="avg_log2FC"/>
572 </assert_contents>
573 </output>
574 </test>
575 <test expect_num_outputs="3">
576 <!-- test6: FindMarkers - Default -->
577 <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/clusters.rds"/>
578 <conditional name="method">
579 <param name="method" value="FindMarkers"/>
580 <param name="slot" value="data"/>
581 <conditional name="cells">
582 <param name="cells" value="false"/>
583 </conditional>
584 <conditional name="ident">
585 <param name="ident" value="true"/>
586 <param name="ident_1" value="0"/>
587 <param name="ident_2" value="1"/>
588 </conditional>
589 <param name="logfc_threshold" value="0.1"/>
590 <conditional name="test_use">
591 <param name="test_use" value="wilcox"/>
592 </conditional>
593 </conditional>
594 <section name="advanced_common">
595 <param name="show_log" value="true"/>
596 </section>
597 <output name="hidden_output">
598 <assert_contents>
599 <has_text_matching expression="FindMarkers"/>
600 </assert_contents>
601 </output>
602 <output name="rds_out" location="https://zenodo.org/records/13732784/files/markers.rds" ftype="rds"/>
603 <output name="markers_tabular" location="https://zenodo.org/records/13732784/files/markers.csv" ftype="csv">
604 <assert_contents>
605 <has_text_matching expression="avg_log2FC"/>
606 </assert_contents>
607 </output>
608 </test>
609 <test expect_num_outputs="3">
610 <!-- test7: FindMarkers - Limma Installed -->
611 <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/clusters.rds"/>
612 <conditional name="method">
613 <param name="method" value="FindMarkers"/>
614 <param name="slot" value="data"/>
615 <conditional name="cells">
616 <param name="cells" value="false"/>
617 </conditional>
618 <conditional name="ident">
619 <param name="ident" value="true"/>
620 <param name="ident_1" value="0"/>
621 <param name="ident_2" value="1"/>
622 </conditional>
623 <param name="logfc_threshold" value="0.1"/>
624 <conditional name="test_use">
625 <param name="test_use" value="wilcox_limma"/>
626 </conditional>
627 </conditional>
628 <section name="advanced_common">
629 <param name="show_log" value="true"/>
630 </section>
631 <output name="hidden_output">
632 <assert_contents>
633 <has_text_matching expression="FindMarkers"/>
634 </assert_contents>
635 </output>
636 <output name="rds_out" location="https://zenodo.org/records/13732784/files/markersLimma.rds" ftype="rds"/>
637 <output name="markers_tabular" location="https://zenodo.org/records/13732784/files/markersLimma.csv" ftype="csv">
638 <assert_contents>
639 <has_text_matching expression="avg_log2FC"/>
640 </assert_contents>
641 </output>
642 </test>
643 <test expect_num_outputs="3">
644 <!-- test8: FindMarkers - MAST Installed -->
645 <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/clusters.rds"/>
646 <conditional name="method">
647 <param name="method" value="FindMarkers"/>
648 <param name="slot" value="data"/>
649 <conditional name="cells">
650 <param name="cells" value="false"/>
651 </conditional>
652 <conditional name="ident">
653 <param name="ident" value="true"/>
654 <param name="ident_1" value="0"/>
655 <param name="ident_2" value="1"/>
656 </conditional>
657 <param name="logfc_threshold" value="0.1"/>
658 <conditional name="test_use">
659 <param name="test_use" value="MAST"/>
660 </conditional>
661 </conditional>
662 <section name="advanced_common">
663 <param name="show_log" value="true"/>
664 </section>
665 <output name="hidden_output">
666 <assert_contents>
667 <has_text_matching expression="FindMarkers"/>
668 </assert_contents>
669 </output>
670 <output name="rds_out" location="https://zenodo.org/records/13732784/files/markersMAST.rds" ftype="rds"/>
671 <output name="markers_tabular" location="https://zenodo.org/records/13732784/files/markersMAST.csv" ftype="csv">
672 <assert_contents>
673 <has_text_matching expression="avg_log2FC"/>
674 </assert_contents>
675 </output>
676 </test>
677 <test expect_num_outputs="3">
678 <!-- test9: FindMarkers - DESeq2 Installed -->
679 <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/clusters.rds"/>
680 <conditional name="method">
681 <param name="method" value="FindMarkers"/>
682 <param name="slot" value="counts"/>
683 <conditional name="cells">
684 <param name="cells" value="false"/>
685 </conditional>
686 <conditional name="ident">
687 <param name="ident" value="true"/>
688 <param name="ident_1" value="0"/>
689 <param name="ident_2" value="1"/>
690 </conditional>
691 <param name="logfc_threshold" value="0.1"/>
692 <conditional name="test_use">
693 <param name="test_use" value="DESeq2"/>
694 </conditional>
695 </conditional>
696 <section name="advanced_common">
697 <param name="show_log" value="true"/>
698 </section>
699 <output name="hidden_output">
700 <assert_contents>
701 <has_text_matching expression="FindMarkers"/>
702 </assert_contents>
703 </output>
704 <output name="rds_out" location="https://zenodo.org/records/13732784/files/markersDESeq2.rds" ftype="rds"/>
705 <output name="markers_tabular" location="https://zenodo.org/records/13732784/files/markersDESeq2.csv" ftype="csv">
706 <assert_contents>
707 <has_text_matching expression="avg_log2FC"/>
708 </assert_contents>
709 </output>
710 </test>
711 <test expect_num_outputs="3">
712 <!-- test10: FindConservedMarkers -->
713 <param name="seurat_rds" location="https://zenodo.org/records/13732784/files/integrated_umap.rds"/>
714 <conditional name="method">
715 <param name="method" value="FindConservedMarkers"/>
716 <param name="ident_1" value="0"/>
717 <param name="ident_2" value="1"/>
718 <param name="grouping_var" value="Group"/>
719 </conditional>
720 <section name="advanced_common">
721 <param name="show_log" value="true"/>
722 </section>
723 <output name="hidden_output">
724 <assert_contents>
725 <has_text_matching expression="FindConservedMarkers"/>
726 </assert_contents>
727 </output>
728 <output name="rds_out" location="https://zenodo.org/records/13732784/files/conserved_markers.rds" ftype="rds"/>
729 <output name="markers_tabular" location="https://zenodo.org/records/13732784/files/conserved_markers.csv" ftype="csv">
730 <assert_contents>
731 <has_text_matching expression="Group_B_avg_log2FC"/>
732 </assert_contents>
733 </output>
734 </test>
735 </tests>
736 <help><![CDATA[
737 Seurat
738 ======
739
740 Seurat is an R package designed for QC, analysis, and exploration of single-cell RNA-seq data.
741
742 Seurat aims to enable users to identify and interpret sources of heterogeneity from single-cell transcriptomic measurements, and to integrate diverse types of single-cell data.
743
744 FindNeighbors
745 =============
746
747 Compute the k.param nearest neighbors for a given dataset.
748
749 Can also optionally (via compute.SNN), construct a shared nearest neighbor graph by calculating the neighborhood overlap (Jaccard index) between every cell and its k.param nearest neighbors.
750
751 More details on the `seurat documentation
752 <https://satijalab.org/seurat/reference/findneighbors>`__
753
754 FindMultiModalNeighbors
755 =======================
756
757 This function will construct a weighted nearest neighbor (WNN) graph for two modalities (e.g. RNA-seq and CITE-seq). For each cell, we identify the nearest neighbors based on a weighted combination of two modalities.
758
759 Takes as input two dimensional reductions, one computed for each modality.
760
761 More details on the `seurat documentation
762 <https://satijalab.org/seurat/reference/findmultimodalneighbors>`__
763
764 FindClusters
765 ============
766
767 Identify clusters of cells by a shared nearest neighbor (SNN) modularity optimization based clustering algorithm.
768
769 First calculate k-nearest neighbors and construct the SNN graph. Then optimize the modularity function to determine clusters.
770
771 More details on the `seurat documentation
772 <https://satijalab.org/seurat/reference/findclusters>`__
773
774
775 FindAllMarkers
776 ==============
777
778 Find markers (differentially expressed genes) for each of the identity classes in a dataset
779
780 Outputs a matrix containing a ranked list of putative markers, and associated statistics (p-values, ROC score, etc.)
781
782 Methods:
783
784 "wilcox" : Identifies differentially expressed genes between two groups of cells using a Wilcoxon Rank Sum test (default); will use a fast implementation by Presto if installed
785
786 "wilcox_limma" : Identifies differentially expressed genes between two groups of cells using the limma implementation of the Wilcoxon Rank Sum test; set this option to reproduce results from Seurat v4
787
788 "bimod" : Likelihood-ratio test for single cell gene expression, (McDavid et al., Bioinformatics, 2013)
789
790 "roc" : Identifies 'markers' of gene expression using ROC analysis. For each gene, evaluates (using AUC) a classifier built on that gene alone, to classify between two groups of cells. An AUC value of 1 means that expression values for this gene alone can perfectly classify the two groupings (i.e. Each of the cells in cells.1 exhibit a higher level than each of the cells in cells.2). An AUC value of 0 also means there is perfect classification, but in the other direction. A value of 0.5 implies that the gene has no predictive power to classify the two groups. Returns a 'predictive power' (abs(AUC-0.5) * 2) ranked matrix of putative differentially expressed genes.
791
792 "t" : Identify differentially expressed genes between two groups of cells using Student's t-test.
793
794 "negbinom" : Identifies differentially expressed genes between two groups of cells using a negative binomial generalized linear model. Use only for UMI-based datasets
795
796 "poisson" : Identifies differentially expressed genes between two groups of cells using a poisson generalized linear model. Use only for UMI-based datasets
797
798 "LR" : Uses a logistic regression framework to determine differentially expressed genes. Constructs a logistic regression model predicting group membership based on each feature individually and compares this to a null model with a likelihood ratio test.
799
800 "MAST" : Identifies differentially expressed genes between two groups of cells using a hurdle model tailored to scRNA-seq data. Utilizes the MAST package to run the DE testing.
801
802 "DESeq2" : Identifies differentially expressed genes between two groups of cells based on a model using DESeq2 which uses a negative binomial distribution (Love et al, Genome Biology, 2014).This test does not support pre-filtering of genes based on average difference (or percent detection rate) between cell groups. However, genes may be pre-filtered based on their minimum detection rate (min.pct) across both cell groups.
803
804 More details on the `seurat documentation
805 <https://satijalab.org/seurat/reference/findallmarkers>`__
806
807 FindMarkers
808 ===========
809
810 Find markers (differentially expressed genes) for identity classes (clusters) or groups of cells
811
812 Outputs a data.frame with a ranked list of putative markers as rows, and associated statistics as columns (p-values, ROC score, etc., depending on the test used (test.use)).
813
814 Methods - as for FindAllMarkers
815
816 More details on the `seurat documentation
817 <https://satijalab.org/seurat/reference/findmarkers>`__
818
819 FindConservedMarkers
820 ====================
821
822 Finds markers that are conserved between the groups
823
824 Uses metap::minimump as meta.method.
825
826 More details on the `seurat documentation
827 <https://satijalab.org/seurat/reference/findconservedmarkers>`__
828
829 ]]></help>
830 <expand macro="citations"/>
831 </tool>