comparison scanpy-filter-cells.xml @ 1:dcfb23758646 draft

"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 4846776f55931e176f7e77af7c185ec6fec7d142"
author ebi-gxa
date Mon, 16 Sep 2019 08:19:52 -0400
parents 9f0ca1641ab2
children c23d0ff783d4
comparison
equal deleted inserted replaced
0:9f0ca1641ab2 1:dcfb23758646
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <tool id="scanpy_filter_cells" name="Scanpy FilterCells" version="@TOOL_VERSION@+galaxy0"> 2 <tool id="scanpy_filter_cells" name="Scanpy FilterCells" version="@TOOL_VERSION@+galaxy0">
3 <description>based on counts and numbers of genes expressed</description> 3 <description>based on counts and numbers of genes expressed</description>
4 <macros> 4 <macros>
5 <import>scanpy_macros.xml</import> 5 <import>scanpy_macros2.xml</import>
6 </macros> 6 </macros>
7 <expand macro="requirements"/> 7 <expand macro="requirements"/>
8 <command detect_errors="exit_code"><![CDATA[ 8 <command detect_errors="exit_code"><![CDATA[
9 ln -s '${input_obj_file}' input.h5 && 9 ln -s '${input_obj_file}' input.h5 &&
10 PYTHONIOENCODING=utf-8 scanpy-filter-cells.py 10 PYTHONIOENCODING=utf-8 scanpy-filter-cells
11 -i input.h5 11 #if $gene_name
12 -f '${input_format}' 12 --gene-name '${gene_name}'
13 -o output.h5 13 #end if
14 -F '${output_format}' 14 #if $parameters
15 #if $parameters 15 #set pars = ' '.join(['--param {name} {min} {max}'.format(**$p) for $p in $parameters])
16 #set pars = ','.join([str($p['name']) for $p in $parameters]) 16 ${pars}
17 -p '${pars}' 17 #end if
18 #set mins = ','.join([str($p['min']) for $p in $parameters]) 18 #if $categories
19 -l '${mins}' 19 #set cats = ' '.join(['--category {name} {values}'.format(**$c) for $c in $categories])
20 #set maxs = ','.join([str($p['max']) for $p in $parameters]) 20 ${cats}
21 -j '${maxs}' 21 #end if
22 #end if 22 #if $subsets
23 #if $subset 23 #set subs = ' '.join(['--subsets {name} {subset}'.format(**$s) for $c in $subsets])
24 -s '${subset}' 24 ${subs}
25 #end if 25 #end if
26 @INPUT_OPTS@
27 @OUTPUT_OPTS@
26 ]]></command> 28 ]]></command>
27 29
28 <inputs> 30 <inputs>
29 <expand macro="input_object_params"/> 31 <expand macro="input_object_params"/>
30 <expand macro="output_object_params"/> 32 <expand macro="output_object_params"/>
33
34 <param name="gene_name" type="text" value="index" label="Name of the column in `anndata.var` that contains gene name"
35 help="This is used for flagging mitochondria genes (starting with 'MT-')"/>
36
31 <repeat name="parameters" title="Parameters used to filter cells" min="1"> 37 <repeat name="parameters" title="Parameters used to filter cells" min="1">
32 <param name="name" type="text" value="n_genes" label="Name of parameter to filter on" help="for example n_genes or n_counts"> 38 <param name="name" type="text" value="n_genes" label="Name of parameter to filter on" help="for example n_genes or n_counts">
33 <option value="n_genes">n_genes</option> 39 <option value="n_genes">n_genes</option>
34 <option value="n_counts">n_counts</option> 40 <option value="cell:n_counts">n_counts</option>
41 <option value="pct_counts_mito">pct_counts_mito</option>
35 </param> 42 </param>
36 <param name="min" type="float" value="0" min="0" label="Min value"/> 43 <param name="min" type="float" value="0" min="0" label="Min value"/>
37 <param name="max" type="float" value="1e9" label="Max value"/> 44 <param name="max" type="float" value="1e9" label="Max value"/>
38 </repeat> 45 </repeat>
39 <param name="subset" argument="--subset-list" type="data" format="tsv" optional="true" label="List of barcodes"/> 46
47 <repeat name="categories" title="Categories used to filter cells" min="0">
48 <param name="name" type="text" value="" label="Name of the categorical variable to filter on"/>
49 <param name="values" type="text" value="" label="Comma-separated values"/>
50 </repeat>
51
52 <repeat name="subsets" title="Subsets used to filter cells" min="0">
53 <param name="name" type="text" value="" label="Name of the categorical variable to filter on"/>
54 <param name="subset" type="data" format="tabular" label="List of values"/>
55 </repeat>
56 <expand macro="export_mtx_params"/>
40 </inputs> 57 </inputs>
41 58
42 <outputs> 59 <outputs>
43 <data name="output_h5" format="h5" from_work_dir="output.h5" label="${tool.name} on ${on_string}: Filtered cells"/> 60 <data name="output_h5" format="h5" from_work_dir="output.h5" label="${tool.name} on ${on_string}: Filtered cells"/>
61 <expand macro="export_mtx_outputs"/>
44 </outputs> 62 </outputs>
45 63
46 <tests> 64 <tests>
47 <test> 65 <test>
48 <param name="input_obj_file" value="read_10x.h5"/> 66 <param name="input_obj_file" value="read_10x.h5"/>
52 <param name="name" value="n_genes"/> 70 <param name="name" value="n_genes"/>
53 <param name="min" value="200"/> 71 <param name="min" value="200"/>
54 <param name="max" value="2500"/> 72 <param name="max" value="2500"/>
55 </repeat> 73 </repeat>
56 <repeat name="parameters"> 74 <repeat name="parameters">
57 <param name="name" value="n_counts"/> 75 <param name="name" value="cell:n_counts"/>
58 <param name="min" value="0"/> 76 <param name="min" value="0"/>
59 <param name="max" value="1e9"/> 77 <param name="max" value="1e9"/>
60 </repeat> 78 </repeat>
61 <output name="output_h5" file="filter_cells.h5" ftype="h5" compare="sim_size"/> 79 <output name="output_h5" file="output.h5" ftype="h5" compare="sim_size"/>
62 </test> 80 </test>
63 </tests> 81 </tests>
64 82
65 <help><![CDATA[ 83 <help><![CDATA[
66 ======================================================================================== 84 ===================================================================
67 Filter cells outliers based on counts and numbers of genes expressed (`pp.filter_cells`) 85 Filter cells based on various QC metrics (`scanpy.pp.filter_cells`)
68 ======================================================================================== 86 ===================================================================
69 87
70 For instance, only keep cells with at least `min_counts` counts or 88 For instance, only keep cells with at least `min_counts` and at most
71 `min_genes` genes expressed. This is to filter measurement outliers, i.e., 89 `max_counts` UMI and/or at least `min_genes` expressed genes and/or at most
72 "unreliable" observations. 90 `max_mito_percent` mitocondria expression. This is to filter measurement
91 outliers, i.e., "unreliable" observations.
73 92
74 @HELP@ 93 @HELP@
75 94
76 @VERSION_HISTORY@ 95 @VERSION_HISTORY@
77 ]]></help> 96 ]]></help>