Mercurial > repos > ebi-gxa > scanpy_run_umap
comparison scanpy-run-umap.xml @ 0:88c1516e25e0 draft
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit 9bf9a6e46a330890be932f60d1d996dd166426c4
author | ebi-gxa |
---|---|
date | Wed, 03 Apr 2019 11:10:27 -0400 |
parents | |
children | 0ac2f9f2313b |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:88c1516e25e0 |
---|---|
1 <?xml version="1.0" encoding="utf-8"?> | |
2 <tool id="scanpy_run_umap" name="Scanpy RunUMAP" version="@TOOL_VERSION@+galaxy1"> | |
3 <description>visualise cell clusters using UMAP</description> | |
4 <macros> | |
5 <import>scanpy_macros.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-run-umap.py | |
11 -i input.h5 | |
12 -f '${input_format}' | |
13 -o output.h5 | |
14 -F '${output_format}' | |
15 #if $embeddings | |
16 --output-embeddings-file embeddings.csv | |
17 #end if | |
18 #if $settings.default == "false" | |
19 -n '${settings.n_components}' | |
20 --min-dist '${settings.min_dist}' | |
21 --spread '${settings.spread}' | |
22 --alpha '${settings.alpha}' | |
23 --gamma '${settings.gamma}' | |
24 --negative-sample-rate '${settings.negative_sample_rate}' | |
25 #if $settings.init_pos | |
26 --init-pos '${settings.init_pos}' | |
27 #end if | |
28 #if $settings.maxiter | |
29 --maxiter '${settings.maxiter}' | |
30 #end if | |
31 #if $settings.a | |
32 -a '${settings.a}' | |
33 #end if | |
34 #if $settings.b | |
35 -b '${settings.b}' | |
36 #end if | |
37 #if $settings.random_seed is not None | |
38 -s '${settings.random_seed}' | |
39 #end if | |
40 #end if | |
41 | |
42 @PLOT_OPTS@ | |
43 ]]></command> | |
44 | |
45 <inputs> | |
46 <expand macro="input_object_params"/> | |
47 <expand macro="output_object_params"/> | |
48 <param name="embeddings" type="boolean" checked="true" label="Output embeddings in csv format"/> | |
49 <conditional name="settings"> | |
50 <param name="default" type="boolean" checked="true" label="Use programme defaults"/> | |
51 <when value="true"/> | |
52 <when value="false"> | |
53 <param name="n_components" argument="--n-components" type="integer" value="2" label="The number of dimensions of the embedding"/> | |
54 <param name="min_dist" argument="--min-dist" type="float" value="0.5" label="The effective minimum distance between embedded points"/> | |
55 <param name="spread" argument="--spread" type="float" value="1.0" label="The effective spread of embedded points"/> | |
56 <param name="alpha" argument="--alpha" type="float" value="1.0" label="Initial learning rate"/> | |
57 <param name="gamma" argument="--gamma" type="float" value="1.0" label="Weighting applied to negative samples"/> | |
58 <param name="negative_sample_rate" argument="--negative-sample-rate" type="integer" value="5" label="The ratio of negative to positive edge in optimisation"/> | |
59 <param name="init_pos" argument="--init-pos" type="text" label="Method to initialise embedding, any key for adata.obsm or choose from the preset methods"> | |
60 <option value="spectral" selected="true">spectral</option> | |
61 <option value="paga">paga</option> | |
62 <option value="random">random</option> | |
63 </param> | |
64 <param name="maxiter" argument="--maxiter" type="integer" optional="true" label="Number of iterations of optimisation"/> | |
65 <param name="a" argument="-a" type="float" optional="true" label="More specific parameter controlling embedding, automatically determined from --min-dist and --spread if unset"/> | |
66 <param name="b" argument="-b" type="float" optional="true" label="More specific parameter controlling embedding, automatically determined from --min-dist and --spread if unset"/> | |
67 <param name="random_seed" argument="--random-seed" type="integer" value="0" label="Seed for numpy random number generator"/> | |
68 </when> | |
69 </conditional> | |
70 <conditional name="do_plotting"> | |
71 <param name="plot" type="boolean" checked="false" label="Make UMAP plot"/> | |
72 <when value="true"> | |
73 <expand macro="output_plot_params"/> | |
74 <param name="color_by" argument="--color-by" type="text" value="louvain" label="Color by attributes, comma separated strings"/> | |
75 </when> | |
76 <when value="false"/> | |
77 </conditional> | |
78 </inputs> | |
79 | |
80 <outputs> | |
81 <data name="output_h5" format="h5" from_work_dir="output.h5" label="${tool.name} on ${on_string}: UMAP object"/> | |
82 <data name="output_png" format="png" from_work_dir="output.png" label="${tool.name} on ${on_string}: UMAP plot"> | |
83 <filter>do_plotting['plot']</filter> | |
84 </data> | |
85 <data name="output_embed" format="csv" from_work_dir="embeddings.csv" label="${tool.name} on ${on_string}: UMAP embeddings"> | |
86 <filter>embeddings</filter> | |
87 </data> | |
88 </outputs> | |
89 | |
90 <tests> | |
91 <test> | |
92 <param name="input_obj_file" value="find_cluster.h5"/> | |
93 <param name="input_format" value="anndata"/> | |
94 <param name="output_format" value="anndata"/> | |
95 <param name="default" value="false"/> | |
96 <param name="embeddings" value="true"/> | |
97 <param name="random_seed" value="0"/> | |
98 <param name="plot" value="true"/> | |
99 <param name="color_by" value="louvain"/> | |
100 <output name="output_h5" file="run_umap.h5" ftype="h5" compare="sim_size"/> | |
101 <output name="output_png" file="run_umap.png" ftype="png" compare="sim_size"/> | |
102 <output name="output_embed" file="run_umap.embeddings.csv" ftype="csv" compare="sim_size"> | |
103 <assert_contents> | |
104 <has_n_columns n="2" sep=","/> | |
105 </assert_contents> | |
106 </output> | |
107 </test> | |
108 </tests> | |
109 | |
110 <help><![CDATA[ | |
111 ======================================================== | |
112 Embed the neighborhood graph using UMAP (`tl.umap`) | |
113 ======================================================== | |
114 | |
115 UMAP (Uniform Manifold Approximation and Projection) is a manifold learning | |
116 technique suitable for visualizing high-dimensional data. Besides tending to | |
117 be faster than tSNE, it optimizes the embedding such that it best reflects | |
118 the topology of the data, which we represent throughout Scanpy using a | |
119 neighborhood graph. tSNE, by contrast, optimizes the distribution of | |
120 nearest-neighbor distances in the embedding such that these best match the | |
121 distribution of distances in the high-dimensional space. We use the | |
122 implementation of `umap-learn <https://github.com/lmcinnes/umap>`__ | |
123 (McInnes et al, 2018). For a few comparisons of UMAP with tSNE, see this `preprint | |
124 <https://doi.org/10.1101/298430>`__. | |
125 | |
126 It yields `X_umap`, UMAP coordinates of data. | |
127 | |
128 @HELP@ | |
129 | |
130 @VERSION_HISTORY@ | |
131 ]]></help> | |
132 <expand macro="citations"/> | |
133 </tool> |