comparison scanpy-run-tsne.xml @ 1:2e74fd7b5f45 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:17:58 -0400
parents f6f189ce4ebc
children 4ed72fb8eaf8
comparison
equal deleted inserted replaced
0:f6f189ce4ebc 1:2e74fd7b5f45
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <tool id="scanpy_run_tsne" name="Scanpy RunTSNE" version="@TOOL_VERSION@+galaxy1"> 2 <tool id="scanpy_run_tsne" name="Scanpy RunTSNE" version="@TOOL_VERSION@+galaxy1">
3 <description>visualise cell clusters using tSNE</description> 3 <description>visualise cell clusters using tSNE</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-run-tsne.py 10 PYTHONIOENCODING=utf-8 scanpy-run-tsne
11 -i input.h5 11 #if $use_rep != "auto"
12 -f '${input_format}' 12 --use-rep '${use_rep}'
13 -o output.h5 13 #end if
14 -F '${output_format}' 14 #if $key_added
15 #if $embeddings 15 --key-added '${key_added}'
16 --output-embeddings-file embeddings.csv 16 #end if
17 #if $embeddings
18 --export-embedding embeddings.csv
19 #end if
20 #if $settings.default == "false"
21 #if $settings.perplexity_file
22 --perplexity \$( cat $settings.perplexity_file )
23 #else
24 --perplexity '${settings.perplexity}'
17 #end if 25 #end if
18 #if $settings.default == "false" 26 --early-exaggeration '${settings.early_exaggeration}'
19 #if $settings.perplexity_file 27 --learning-rate '${settings.learning_rate}'
20 --perplexity \$( cat $settings.perplexity_file ) 28 #if $settings.n_pc
21 #else 29 --n-pcs ${settings.n_pc}
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 30 #end if
31 #if not $settings.fast_tsne
32 --no-fast-tsne
33 #end if
34 #if $settings.n_job
35 --n-jobs ${settings.n_job}
36 #end if
37 #if $settings.random_seed is not None
38 --random-state ${settings.random_seed}
39 #end if
40 #end if
41 @INPUT_OPTS@
42 @OUTPUT_OPTS@
42 43
43 @PLOT_OPTS@
44 ]]></command> 44 ]]></command>
45 45
46 <inputs> 46 <inputs>
47 <expand macro="input_object_params"/> 47 <expand macro="input_object_params"/>
48 <expand macro="output_object_params"/> 48 <expand macro="output_object_params"/>
49 <param name="embeddings" type="boolean" checked="true" label="Output embeddings in csv format"/> 49 <param name="embeddings" type="boolean" checked="true" label="Output embeddings in csv format"/>
50 50
51 <param name="use_rep" argument="--use-rep" type="select" label="Use the indicated representation">
52 <option value="X_pca">X_pca, use PCs</option>
53 <option value="X">X, use normalised expression values</option>
54 <option value="auto" selected="true">Automatically chosen based on problem size</option>
55 </param>
56 <param name="key_added" argument="--key-added" type="text" optional="true"
57 label="Additional suffix to the name of the slot to save the embedding"/>
58
51 <conditional name="settings"> 59 <conditional name="settings">
52 <param name="default" type="boolean" checked="true" label="Use programme defaults"/> 60 <param name="default" type="boolean" checked="true" label="Use programme defaults"/>
53 <when value="true"/> 61 <when value="true"/>
54 <when value="false"> 62 <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"/> 63 <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"/> 64 <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"/> 65 <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"/> 66 <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"/> 67 <param name="fast_tsne" type="boolean" checked="true" label="Use multicoreTSNE"/>
66 <param name="n_pc" argument="--n-pcs" type="integer" optional="true" label="The number of PCs to use"/> 69 <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"/> 70 <param name="random_seed" argument="--random-seed" type="integer" value="0" label="Seed for random number generator"/>
68 </when> 71 </when>
69 </conditional> 72 </conditional>
70 73
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> 74 </inputs>
80 75
81 <outputs> 76 <outputs>
82 <data name="output_h5" format="h5" from_work_dir="output.h5" label="${tool.name} on ${on_string}: tSNE object"/> 77 <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"> 78 <data name="output_embed" format="csv" from_work_dir="embeddings.csv" label="${tool.name} on ${on_string}: tSNE embeddings">
87 <filter>embeddings</filter> 79 <filter>embeddings</filter>
88 </data> 80 </data>
89 </outputs> 81 </outputs>
90 82
94 <param name="input_format" value="anndata"/> 86 <param name="input_format" value="anndata"/>
95 <param name="output_format" value="anndata"/> 87 <param name="output_format" value="anndata"/>
96 <param name="default" value="false"/> 88 <param name="default" value="false"/>
97 <param name="embeddings" value="true"/> 89 <param name="embeddings" value="true"/>
98 <param name="random_seed" value="0"/> 90 <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"/> 91 <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"> 92 <output name="output_embed" file="run_tsne.embeddings.csv" ftype="csv" compare="sim_size">
104 <assert_contents> 93 <assert_contents>
105 <has_n_columns n="2" sep=","/> 94 <has_n_columns n="2" sep=","/>
106 </assert_contents> 95 </assert_contents>
107 </output> 96 </output>
108 </test> 97 </test>
109 </tests> 98 </tests>
110 99
111 <help><![CDATA[ 100 <help><![CDATA[
112 ================================================================== 101 =========================================================================
113 t-distributed stochastic neighborhood embedding (tSNE) (`tl.tsne`) 102 t-distributed stochastic neighborhood embedding (tSNE) (`scanpy.tl.tsne`)
114 ================================================================== 103 =========================================================================
104
105 For making TSNE plots, please use `Scanpy PlotEmbed` with the output of this tool and enter "tsne" as the
106 name of the embedding to plot.
115 107
116 t-distributed stochastic neighborhood embedding (tSNE) (Maaten et al, 2008) has been 108 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, 109 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). 110 we use the implementation of *scikit-learn* (Pedregosa et al, 2011).
119 111