comparison scanpy-filter-genes.xml.bak @ 3:b2410da4e381 draft

planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 1d069e25584e436d7628694cb8853a15f1f85604
author ebi-gxa
date Wed, 20 Nov 2019 05:17:27 -0500
parents
children
comparison
equal deleted inserted replaced
2:882f4671d686 3:b2410da4e381
1 <?xml version="1.0" encoding="utf-8"?>
2 <tool id="scanpy_filter_genes" name="Scanpy FilterGenes" version="@TOOL_VERSION@+galaxy3">
3 <description>based on counts and numbers of cells expressed</description>
4 <macros>
5 <import>scanpy_macros2.xml</import>
6 </macros>
7 <expand macro="requirements"/>
8 <command detect_errors="exit_code"><![CDATA[
9 ln -s '${input_obj_file}' input.h5 &&
10 PYTHONIOENCODING=utf-8 scanpy-filter-genes
11 #if $parameters
12 #set pars = ' '.join(['--param g:{name} {min} {max}'.format(**$p) for $p in $parameters])
13 ${pars}
14 #end if
15 #if $categories
16 #set cats = ' '.join(['--category g:{name} {negate}{values}'.format(**$c) for $c in $categories])
17 ${cats}
18 #end if
19 #if $subsets
20 #set subs = ' '.join(['--subset g:{name} {subset}'.format(**$s) for $s in $subsets])
21 ${subs}
22 #end if
23 @INPUT_OPTS@
24 @OUTPUT_OPTS@
25 @EXPORT_MTX_OPTS@
26 ]]></command>
27
28 <inputs>
29 <expand macro="input_object_params"/>
30 <expand macro="output_object_params"/>
31
32 <repeat name="parameters" title="Parameters used to filter genes" min="1">
33 <param name="name" type="text" value="n_cells" label="Name of parameter to filter on" help="for example n_genes or n_counts">
34 <option value="n_cells">n_cells</option>
35 <option value="n_counts">n_counts</option>
36 </param>
37 <param name="min" type="float" min="0" value="0" label="Min value"/>
38 <param name="max" type="float" min="0" value="1e9" label="Max value"/>
39 </repeat>
40
41 <repeat name="categories" title="Categories used to filter genes" min="0">
42 <param name="name" type="text" value="" label="Name of the categorical variable to filter on"/>
43 <param name="values" type="text" value="" label="Comma-separated list of categories"/>
44 <param name="negate" type="boolean" truevalue="!" falsevalue="" checked="false" label="Apply as negative filter" help="If enabled, specified categories will be removed rather than retained."/>
45 </repeat>
46
47 <repeat name="subsets" title="Subsets used to filter genes" min="0">
48 <param name="name" type="text" value="" label="Name of the categorical variable to filter on"/>
49 <param name="subset" type="data" format="tabular" label="List of values to keep" help="A one-column headerless text file is required"/>
50 </repeat>
51 <expand macro="export_mtx_params"/>
52 </inputs>
53
54 <outputs>
55 <data name="output_h5" format="h5" from_work_dir="output.h5" label="${tool.name} on ${on_string}: Filtered genes"/>
56 <expand macro="export_mtx_outputs"/>
57 </outputs>
58
59 <tests>
60 <test>
61 <param name="input_obj_file" value="filter_cells.h5"/>
62 <param name="input_format" value="anndata"/>
63 <param name="output_format" value="anndata"/>
64 <repeat name="parameters">
65 <param name="name" value="n_cells"/>
66 <param name="min" value="3"/>
67 <param name="max" value="1e9"/>
68 </repeat>
69 <repeat name="parameters">
70 <param name="name" value="n_counts"/>
71 <param name="min" value="0"/>
72 <param name="max" value="1e9"/>
73 </repeat>
74 <output name="output_h5" file="filter_genes.h5" ftype="h5" compare="sim_size"/>
75 </test>
76 </tests>
77
78 <help><![CDATA[
79 =====================================================================
80 Filter genes based on arbitrary attributes (`scanpy.pp.filter_genes`)
81 =====================================================================
82
83 Keep genes that have at least `min_counts` counts or are expressed in at
84 least `min_cells` cells or have at most `max_counts` counts or are expressed
85 in at most `max_cells` cells. Other gene attributes can be used for filtering
86 too if available.
87
88
89 @HELP@
90
91 @VERSION_HISTORY@
92 ]]></help>
93 <expand macro="citations"/>
94 </tool>