Mercurial > repos > ebi-gxa > scanpy_run_tsne
comparison scanpy-run-tsne.xml @ 0:f6f189ce4ebc 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:51 -0400 |
parents | |
children | 2e74fd7b5f45 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f6f189ce4ebc |
---|---|
1 <?xml version="1.0" encoding="utf-8"?> | |
2 <tool id="scanpy_run_tsne" name="Scanpy RunTSNE" version="@TOOL_VERSION@+galaxy1"> | |
3 <description>visualise cell clusters using tSNE</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-tsne.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 #if $settings.perplexity_file | |
20 --perplexity \$( cat $settings.perplexity_file ) | |
21 #else | |
22 --perplexity '${settings.perplexity}' | |
23 #end if | |
24 --early-exaggeration '${settings.early_exaggeration}' | |
25 --learning-rate '${settings.learning_rate}' | |
26 #if $settings.use_rep != "auto" | |
27 -r '${settings.use_rep}' | |
28 #end if | |
29 #if $settings.n_pc | |
30 -n '${settings.n_pc}' | |
31 #end if | |
32 #if not $settings.fast_tsne | |
33 --no-fast-tsne | |
34 #end if | |
35 #if $settings.n_job | |
36 --n-jobs '${settings.n_job}' | |
37 #end if | |
38 #if $settings.random_seed is not None | |
39 -s '${settings.random_seed}' | |
40 #end if | |
41 #end if | |
42 | |
43 @PLOT_OPTS@ | |
44 ]]></command> | |
45 | |
46 <inputs> | |
47 <expand macro="input_object_params"/> | |
48 <expand macro="output_object_params"/> | |
49 <param name="embeddings" type="boolean" checked="true" label="Output embeddings in csv format"/> | |
50 | |
51 <conditional name="settings"> | |
52 <param name="default" type="boolean" checked="true" label="Use programme defaults"/> | |
53 <when value="true"/> | |
54 <when value="false"> | |
55 <param name="use_rep" argument="--use-rep" type="select" label="Use the indicated representation"> | |
56 <option value="X_pca">X_pca, use PCs</option> | |
57 <option value="X">X, use normalised expression values</option> | |
58 <option value="auto" selected="true">Automatically chosen based on problem size</option> | |
59 </param> | |
60 <param name="perplexity" argument="--perplexity" type="float" value="30" label="The perplexity is related to the number of nearest neighbours, select a value between 5 and 50"/> | |
61 <param name="perplexity_file" argument="--perplexity" type="data" format="txt,tsv" label="The perplexity is related to the number of nearest neighbours" help="For use with the parameter iterator. Overrides the persplexity option above" optional="true"/> | |
62 <param name="early_exaggeration" argument="--early-exaggeration" type="float" value="12" label="Controls the tightness within and between clusters"/> | |
63 <param name="learning_rate" argument="--learning-rate" type="float" value="1000" label="Learning rate, should be between 100 and 1000"/> | |
64 <param name="fast_tsne" type="boolean" checked="true" label="Use multicoreTSNE"/> | |
65 <param name="n_job" argument="--n-jobs" type="integer" optional="true" label="The number of jobs"/> | |
66 <param name="n_pc" argument="--n-pcs" type="integer" optional="true" label="The number of PCs to use"/> | |
67 <param name="random_seed" argument="--random-seed" type="integer" value="0" label="Seed for random number generator"/> | |
68 </when> | |
69 </conditional> | |
70 | |
71 <conditional name="do_plotting"> | |
72 <param name="plot" type="boolean" checked="false" label="Make tSNE plot"/> | |
73 <when value="true"> | |
74 <expand macro="output_plot_params"/> | |
75 <param name="color_by" argument="--color-by" type="text" value="louvain" label="Color by attributes, comma separated strings"/> | |
76 </when> | |
77 <when value="false"/> | |
78 </conditional> | |
79 </inputs> | |
80 | |
81 <outputs> | |
82 <data name="output_h5" format="h5" from_work_dir="output.h5" label="${tool.name} on ${on_string}: tSNE object"/> | |
83 <data name="output_png" format="png" from_work_dir="output.png" label="${tool.name} on ${on_string}: tSNE plot"> | |
84 <filter>do_plotting['plot']</filter> | |
85 </data> | |
86 <data name="output_embed" format="csv" from_work_dir="embeddings.csv" label="${tool.name} on ${on_string}: tSNE embeddings"> | |
87 <filter>embeddings</filter> | |
88 </data> | |
89 </outputs> | |
90 | |
91 <tests> | |
92 <test> | |
93 <param name="input_obj_file" value="find_cluster.h5"/> | |
94 <param name="input_format" value="anndata"/> | |
95 <param name="output_format" value="anndata"/> | |
96 <param name="default" value="false"/> | |
97 <param name="embeddings" value="true"/> | |
98 <param name="random_seed" value="0"/> | |
99 <param name="plot" value="true"/> | |
100 <param name="color_by" value="louvain"/> | |
101 <output name="output_h5" file="run_tsne.h5" ftype="h5" compare="sim_size"/> | |
102 <output name="output_png" file="run_tsne.png" ftype="png" compare="sim_size"/> | |
103 <output name="output_embed" file="run_tsne.embeddings.csv" ftype="csv" compare="sim_size"> | |
104 <assert_contents> | |
105 <has_n_columns n="2" sep=","/> | |
106 </assert_contents> | |
107 </output> | |
108 </test> | |
109 </tests> | |
110 | |
111 <help><![CDATA[ | |
112 ================================================================== | |
113 t-distributed stochastic neighborhood embedding (tSNE) (`tl.tsne`) | |
114 ================================================================== | |
115 | |
116 t-distributed stochastic neighborhood embedding (tSNE) (Maaten et al, 2008) has been | |
117 proposed for visualizating single-cell data by (Amir et al, 2013). Here, by default, | |
118 we use the implementation of *scikit-learn* (Pedregosa et al, 2011). | |
119 | |
120 It yields `X_tsne`, tSNE coordinates of data. | |
121 | |
122 @HELP@ | |
123 | |
124 @VERSION_HISTORY@ | |
125 ]]></help> | |
126 <expand macro="citations"/> | |
127 </tool> |