comparison filter.xml @ 11:2d02d9702d3a draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/scanpy/ commit aba2a85f5da6e1094f382d1f0d94c4b8f2544a7d
author iuc
date Wed, 08 Nov 2023 14:44:39 +0000
parents b409c2486353
children a03ff8633507
comparison
equal deleted inserted replaced
10:b409c2486353 11:2d02d9702d3a
1 <tool id="scanpy_filter" name="Filter" version="@galaxy_version@" profile="@profile@"> 1 <tool id="scanpy_filter" name="Filter" version="@galaxy_version@" 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 </macros> 5 </macros>
6 <expand macro="bio_tools"/>
7 <expand macro="requirements"/> 7 <expand macro="requirements"/>
8 <expand macro="version_command"/> 8 <expand macro="version_command"/>
9 <command detect_errors="exit_code"><![CDATA[ 9 <command detect_errors="exit_code"><![CDATA[
10 @CMD@ 10 @CMD@
11 ]]></command> 11 ]]></command>
50 #end if 50 #end if
51 #if str($method.groupby) != '' 51 #if str($method.groupby) != ''
52 groupby='$method.groupby', 52 groupby='$method.groupby',
53 #end if 53 #end if
54 use_raw=$method.use_raw, 54 use_raw=$method.use_raw,
55 log=$method.log,
56 key_added='$method.key_added', 55 key_added='$method.key_added',
57 min_in_group_fraction=$method.min_in_group_fraction, 56 min_in_group_fraction=$method.min_in_group_fraction,
58 max_out_group_fraction=$method.max_out_group_fraction, 57 max_out_group_fraction=$method.max_out_group_fraction,
59 min_fold_change=$method.min_fold_change) 58 min_fold_change=$method.min_fold_change)
60 59
171 </param> 170 </param>
172 <param argument="groupby" type="text" optional="true" label="The key of the observations grouping to consider"> 171 <param argument="groupby" type="text" optional="true" label="The key of the observations grouping to consider">
173 <expand macro="sanitize_query" /> 172 <expand macro="sanitize_query" />
174 </param> 173 </param>
175 <expand macro="param_use_raw"/> 174 <expand macro="param_use_raw"/>
176 <expand macro="param_log"/>
177 <param argument="key_added" type="text" value="rank_genes_groups_filtered" label="Key that will contain new values"> 175 <param argument="key_added" type="text" value="rank_genes_groups_filtered" label="Key that will contain new values">
178 <expand macro="sanitize_query" /> 176 <expand macro="sanitize_query" />
179 </param> 177 </param>
180 <param argument="min_in_group_fraction" type="float" min="0" max="1" value="0.25" label="Minimum fraction of genes expressing the gene within the categories"/> 178 <param argument="min_in_group_fraction" type="float" min="0" max="1" value="0.25" label="Minimum fraction of genes expressing the gene within the categories"/>
181 <param argument="max_out_group_fraction" type="float" min="0" max="1" value="0.5" label="Maximum fraction of genes expressing the gene outside the categories"/> 179 <param argument="max_out_group_fraction" type="float" min="0" max="1" value="0.5" label="Maximum fraction of genes expressing the gene outside the categories"/>
226 </inputs> 224 </inputs>
227 <outputs> 225 <outputs>
228 <expand macro="anndata_outputs"/> 226 <expand macro="anndata_outputs"/>
229 </outputs> 227 </outputs>
230 <tests> 228 <tests>
231 <test> 229 <test expect_num_outputs="2">
232 <!-- test 0 --> 230 <!-- test 1 -->
233 <param name="adata" value="krumsiek11.h5ad" /> 231 <param name="adata" value="krumsiek11.h5ad" />
234 <conditional name="method"> 232 <conditional name="method">
235 <param name="method" value="pp.filter_cells"/> 233 <param name="method" value="pp.filter_cells"/>
236 <conditional name="filter"> 234 <conditional name="filter">
237 <param name="filter" value="min_counts"/> 235 <param name="filter" value="min_counts"/>
250 <has_text_matching expression="min_counts=3"/> 248 <has_text_matching expression="min_counts=3"/>
251 </assert_contents> 249 </assert_contents>
252 </output> 250 </output>
253 <output name="anndata_out" file="pp.filter_cells.krumsiek11-min_counts.h5ad" ftype="h5ad" compare="sim_size"/> 251 <output name="anndata_out" file="pp.filter_cells.krumsiek11-min_counts.h5ad" ftype="h5ad" compare="sim_size"/>
254 </test> 252 </test>
255 <test> 253 <test expect_num_outputs="2">
256 <!-- test 1 --> 254 <!-- test 2 -->
257 <param name="adata" value="krumsiek11.h5ad" /> 255 <param name="adata" value="krumsiek11.h5ad" />
258 <conditional name="method"> 256 <conditional name="method">
259 <param name="method" value="pp.filter_cells"/> 257 <param name="method" value="pp.filter_cells"/>
260 <conditional name="filter"> 258 <conditional name="filter">
261 <param name="filter" value="max_genes"/> 259 <param name="filter" value="max_genes"/>
272 <has_text_matching expression="max_genes=100"/> 270 <has_text_matching expression="max_genes=100"/>
273 </assert_contents> 271 </assert_contents>
274 </output> 272 </output>
275 <output name="anndata_out" file="pp.filter_cells.krumsiek11-max_genes.h5ad" ftype="h5ad" compare="sim_size"/> 273 <output name="anndata_out" file="pp.filter_cells.krumsiek11-max_genes.h5ad" ftype="h5ad" compare="sim_size"/>
276 </test> 274 </test>
277 <test> 275 <test expect_num_outputs="2">
278 <!-- test 2 --> 276 <!-- test 3 -->
279 <param name="adata" value="krumsiek11.h5ad" /> 277 <param name="adata" value="krumsiek11.h5ad" />
280 <conditional name="method"> 278 <conditional name="method">
281 <param name="method" value="pp.filter_genes"/> 279 <param name="method" value="pp.filter_genes"/>
282 <conditional name="filter"> 280 <conditional name="filter">
283 <param name="filter" value="min_counts"/> 281 <param name="filter" value="min_counts"/>
293 <has_text_matching expression="min_counts=3"/> 291 <has_text_matching expression="min_counts=3"/>
294 </assert_contents> 292 </assert_contents>
295 </output> 293 </output>
296 <output name="anndata_out" file="pp.filter_genes.krumsiek11-min_counts.h5ad" ftype="h5ad" compare="sim_size"/> 294 <output name="anndata_out" file="pp.filter_genes.krumsiek11-min_counts.h5ad" ftype="h5ad" compare="sim_size"/>
297 </test> 295 </test>
298 <!-- <test> --> 296
299 <!-- <!-\- test 3 -\-> --> 297 <!-- test 4 -->
300 <!-- <!-\- Input dataset appears to be missing rank_genes_groups key... -\-> --> 298 <!-- Fails to write to anndata after tl.filter_rank_genes_groups
301 <!-- <param name="adata" value="tl.rank_genes_groups.krumsiek11.h5ad" /> --> 299 Issue has been reported here: https://github.com/scverse/anndata/issues/726
302 <!-- <conditional name="method"> --> 300 The current fix is: del adata.uns['rank_genes_groups_filtered'] -->
303 <!-- <param name="method" value="tl.filter_rank_genes_groups"/> --> 301 <!--<test expect_num_outputs="2">
304 <!-- <param name="key" value="rank_genes_groups"/> --> 302 <param name="adata" value="tl.rank_genes_groups.krumsiek11.h5ad" />
305 <!-- <param name="use_raw" value="False"/> --> 303 <conditional name="method">
306 <!-- <param name="log" value="False"/> --> 304 <param name="method" value="tl.filter_rank_genes_groups"/>
307 <!-- <param name="key_added" value="rank_genes_groups_filtered"/> --> 305 <param name="key" value="rank_genes_groups"/>
308 <!-- <param name="min_in_group_fraction" value="0.25"/> --> 306 <param name="use_raw" value="False"/>
309 <!-- <param name="max_out_group_fraction" value="0.5"/> --> 307 <param name="key_added" value="rank_genes_groups_filtered"/>
310 <!-- <param name="min_fold_change" value="3"/> --> 308 <param name="min_in_group_fraction" value="0.25"/>
311 <!-- </conditional> --> 309 <param name="max_out_group_fraction" value="0.5"/>
312 <!-- <output name="hidden_output"> --> 310 <param name="min_fold_change" value="3"/>
313 <!-- <assert_contents> --> 311 </conditional>
314 <!-- <has_text_matching expression="tl.filter_rank_genes_groups"/> --> 312 <section name="advanced_common">
315 <!-- <has_text_matching expression="key='rank_genes_groups'"/> --> 313 <param name="show_log" value="true" />
316 <!-- <has_text_matching expression="use_raw=False"/> --> 314 </section>
317 <!-- <has_text_matching expression="log=False"/> --> 315 <output name="hidden_output">
318 <!-- <has_text_matching expression="key_added='rank_genes_groups_filtered'"/> --> 316 <assert_contents>
319 <!-- <has_text_matching expression="min_in_group_fraction=0.25"/> --> 317 <has_text_matching expression="tl.filter_rank_genes_groups"/>
320 <!-- <has_text_matching expression="max_out_group_fraction=0.5"/> --> 318 <has_text_matching expression="key='rank_genes_groups'"/>
321 <!-- <has_text_matching expression="min_fold_change=3"/> --> 319 <has_text_matching expression="use_raw=False"/>
322 <!-- </assert_contents> --> 320 <has_text_matching expression="log=False"/>
323 <!-- </output> --> 321 <has_text_matching expression="key_added='rank_genes_groups_filtered'"/>
324 <!-- <output name="anndata_out" file="pp.filter_rank_genes_groups.h5ad" ftype="h5ad" compare="sim_size"/> --> 322 <has_text_matching expression="min_in_group_fraction=0.25"/>
325 <!-- </test> --> 323 <has_text_matching expression="max_out_group_fraction=0.5"/>
326 <test> 324 <has_text_matching expression="min_fold_change=3"/>
327 <!-- test 4 --> 325 </assert_contents>
326 </output>
327 <output name="anndata_out" file="pp.filter_rank_genes_groups.h5ad" ftype="h5ad" compare="sim_size"/>
328 </test>-->
329 <test expect_num_outputs="2">
330 <!-- test 5 -->
328 <param name="adata" value="blobs.h5ad"/> 331 <param name="adata" value="blobs.h5ad"/>
329 <conditional name="method"> 332 <conditional name="method">
330 <param name="method" value="pp.highly_variable_genes"/> 333 <param name="method" value="pp.highly_variable_genes"/>
331 <conditional name="flavor"> 334 <conditional name="flavor">
332 <param name="flavor" value="seurat"/> 335 <param name="flavor" value="seurat"/>
351 <has_text_matching expression="subset=False"/> 354 <has_text_matching expression="subset=False"/>
352 </assert_contents> 355 </assert_contents>
353 </output> 356 </output>
354 <output name="anndata_out" file="pp.highly_variable_genes.seurat.blobs.h5ad" ftype="h5ad" compare="sim_size" delta="100000" delta_frac="0.2"/> 357 <output name="anndata_out" file="pp.highly_variable_genes.seurat.blobs.h5ad" ftype="h5ad" compare="sim_size" delta="100000" delta_frac="0.2"/>
355 </test> 358 </test>
356 <test> 359 <test expect_num_outputs="2">
357 <!-- test 5 --> 360 <!-- test 6 -->
358 <param name="adata" value="krumsiek11.h5ad" /> 361 <param name="adata" value="krumsiek11.h5ad" />
359 <conditional name="method"> 362 <conditional name="method">
360 <param name="method" value="pp.highly_variable_genes"/> 363 <param name="method" value="pp.highly_variable_genes"/>
361 <conditional name="flavor"> 364 <conditional name="flavor">
362 <param name="flavor" value="cell_ranger"/> 365 <param name="flavor" value="cell_ranger"/>
377 <has_text_matching expression="subset=True"/> 380 <has_text_matching expression="subset=True"/>
378 </assert_contents> 381 </assert_contents>
379 </output> 382 </output>
380 <output name="anndata_out" file="pp.highly_variable_genes.krumsiek11-cell_ranger.h5ad" ftype="h5ad" compare="sim_size" delta="100000" delta_frac="0.9"/> 383 <output name="anndata_out" file="pp.highly_variable_genes.krumsiek11-cell_ranger.h5ad" ftype="h5ad" compare="sim_size" delta="100000" delta_frac="0.9"/>
381 </test> 384 </test>
382 <test> 385 <test expect_num_outputs="2">
383 <!-- test 6 --> 386 <!-- test 7 -->
384 <param name="adata" value="krumsiek11.h5ad" /> 387 <param name="adata" value="krumsiek11.h5ad" />
385 <conditional name="method"> 388 <conditional name="method">
386 <param name="method" value="pp.subsample"/> 389 <param name="method" value="pp.subsample"/>
387 <conditional name="type"> 390 <conditional name="type">
388 <param name="type" value="fraction" /> 391 <param name="type" value="fraction" />
400 <has_text_matching expression="random_state=0"/> 403 <has_text_matching expression="random_state=0"/>
401 </assert_contents> 404 </assert_contents>
402 </output> 405 </output>
403 <output name="anndata_out" file="pp.subsample.krumsiek11_fraction.h5ad" ftype="h5ad" compare="sim_size"/> 406 <output name="anndata_out" file="pp.subsample.krumsiek11_fraction.h5ad" ftype="h5ad" compare="sim_size"/>
404 </test> 407 </test>
405 <test> 408 <test expect_num_outputs="2">
406 <!-- test 7 --> 409 <!-- test 8 -->
407 <param name="adata" value="krumsiek11.h5ad" /> 410 <param name="adata" value="krumsiek11.h5ad" />
408 <conditional name="method"> 411 <conditional name="method">
409 <param name="method" value="pp.subsample"/> 412 <param name="method" value="pp.subsample"/>
410 <conditional name="type"> 413 <conditional name="type">
411 <param name="type" value="n_obs" /> 414 <param name="type" value="n_obs" />
423 <has_text_matching expression="random_state=0"/> 426 <has_text_matching expression="random_state=0"/>
424 </assert_contents> 427 </assert_contents>
425 </output> 428 </output>
426 <output name="anndata_out" file="pp.subsample.krumsiek11_n_obs.h5ad" ftype="h5ad" compare="sim_size"/> 429 <output name="anndata_out" file="pp.subsample.krumsiek11_n_obs.h5ad" ftype="h5ad" compare="sim_size"/>
427 </test> 430 </test>
428 <test> 431 <test expect_num_outputs="2">
429 <!-- test 8 --> 432 <!-- test 9 -->
430 <param name="adata" value="random-randint.h5ad" /> 433 <param name="adata" value="random-randint.h5ad" />
431 <conditional name="method"> 434 <conditional name="method">
432 <param name="method" value="pp.downsample_counts"/> 435 <param name="method" value="pp.downsample_counts"/>
433 <param name="total_counts" value="20000"/> 436 <param name="total_counts" value="20000"/>
434 <param name="random_state" value="0"/> 437 <param name="random_state" value="0"/>
459 462
460 Only provide one of the optional parameters `min_counts`, `min_genes`, 463 Only provide one of the optional parameters `min_counts`, `min_genes`,
461 `max_counts`, `max_genes` per call. 464 `max_counts`, `max_genes` per call.
462 465
463 More details on the `scanpy documentation 466 More details on the `scanpy documentation
464 <https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.pp.filter_cells.html>`__ 467 <https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.pp.filter_cells.html>`__
465 468
466 469
467 Filter genes based on number of cells or counts (`pp.filter_genes`) 470 Filter genes based on number of cells or counts (`pp.filter_genes`)
468 =================================================================== 471 ===================================================================
469 472
473 476
474 Only provide one of the optional parameters `min_counts`, `min_cells`, 477 Only provide one of the optional parameters `min_counts`, `min_cells`,
475 `max_counts`, `max_cells` per call. 478 `max_counts`, `max_cells` per call.
476 479
477 More details on the `scanpy documentation 480 More details on the `scanpy documentation
478 <https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.pp.filter_genes.html>`__ 481 <https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.pp.filter_genes.html>`__
479 482
480 483
481 Filters out genes based on fold change and fraction of genes expressing the gene within and outside the groupby categories (`tl.filter_rank_genes_groups`) 484 Filters out genes based on fold change and fraction of genes expressing the gene within and outside the groupby categories (`tl.filter_rank_genes_groups`)
482 ========================================================================================================================================================== 485 ==========================================================================================================================================================
483 486
484 More details on the `scanpy documentation 487 More details on the `scanpy documentation
485 <https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.tl.filter_rank_genes_groups.html>`__ 488 <https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.tl.filter_rank_genes_groups.html>`__
486 489
487 490
488 Annotate highly variable genes (`pp.highly_variable_genes`) 491 Annotate highly variable genes (`pp.highly_variable_genes`)
489 =========================================================== 492 ===========================================================
490 493
495 498
496 Subsample to a fraction of the number of observations (`pp.subsample`) 499 Subsample to a fraction of the number of observations (`pp.subsample`)
497 ====================================================================== 500 ======================================================================
498 501
499 More details on the `scanpy documentation 502 More details on the `scanpy documentation
500 <https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.pp.subsample.html>`__ 503 <https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.pp.subsample.html>`__
501 504
502 Downsample counts (`pp.downsample_counts`) 505 Downsample counts (`pp.downsample_counts`)
503 ========================================== 506 ==========================================
504 507
505 Downsample counts so that each cell has no more than `target_counts`. Cells with fewer counts than `target_counts` are unaffected by this. This 508 Downsample counts so that each cell has no more than `target_counts`. Cells with fewer counts than `target_counts` are unaffected by this. This
506 has been implemented by M. D. Luecken. 509 has been implemented by M. D. Luecken.
507 510
508 More details on the `scanpy documentation 511 More details on the `scanpy documentation
509 <https://icb-scanpy.readthedocs-hosted.com/en/@version@/api/scanpy.pp.downsample_counts.html>`__ 512 <https://icb-scanpy.readthedocs-hosted.com/en/stable/api/scanpy.pp.downsample_counts.html>`__
510 513
511 514
512 ]]></help> 515 ]]></help>
513 <expand macro="citations"/> 516 <expand macro="citations"/>
514 </tool> 517 </tool>