comparison scanpy-run-tsne.xml @ 15:b5e1939cc155 draft

"planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/tertiary-analysis/scanpy commit e572b5425460d57f1bd13ab6374674c1c6801ab3-dirty"
author ebi-gxa
date Thu, 17 Sep 2020 16:28:31 +0000
parents dccd544c21ca
children 9d2b6c6f9e07
comparison
equal deleted inserted replaced
14:c4a20a57d825 15:b5e1939cc155
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@+galaxy0" profile="@PROFILE@"> 2 <tool id="scanpy_run_tsne" name="Scanpy RunTSNE" version="@TOOL_VERSION@+galaxy1" profile="@PROFILE@">
3 <description>visualise cell clusters using tSNE</description> 3 <description>visualise cell clusters using tSNE</description>
4 <macros> 4 <macros>
5 <import>scanpy_macros2.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 #from pathlib import Path
10 #set embeddings_tsv='embeddings.tsv'
9 ln -s '${input_obj_file}' input.h5 && 11 ln -s '${input_obj_file}' input.h5 &&
10 PYTHONIOENCODING=utf-8 scanpy-run-tsne 12 PYTHONIOENCODING=utf-8 scanpy-run-tsne
11 #if $use_rep != "auto" 13 #if $use_rep != "auto"
12 --use-rep '${use_rep}' 14 --use-rep '${use_rep}'
13 #end if
14 #if $key_added
15 --key-added '${key_added}'
16 #end if 15 #end if
17 #if $embeddings 16 #if $embeddings
18 --export-embedding embeddings.tsv 17 --export-embedding embeddings.tsv
19 #end if 18 #end if
20 #if $settings.default == "false" 19 #if $settings.default == "false"
21 #if $settings.perplexity_file 20 #if $settings.perplexity_file
22 --perplexity \$( cat $settings.perplexity_file ) 21 #set perplexity = Path($settings.perplexity_file.__str__).read_text().strip()
23 #else 22 #elif $settings.perplexity
24 --perplexity '${settings.perplexity}' 23 #set perplexity = $settings.perplexity.__str__.strip()
24 #end if
25 #if $perplexity
26 --perplexity '$perplexity'
27 #end if
28 #if $settings.key_added
29 #set key_added = $settings.key_added
30 #if $perplexity
31 #set key_added = $key_added.replace('PERPLEXITY', $perplexity.__str__)
32 #end if
33 --key-added '${key_added}'
34 #set embeddings_tsv="embeddings_" + $key_added.__str__ + ".tsv"
25 #end if 35 #end if
26 --early-exaggeration '${settings.early_exaggeration}' 36 --early-exaggeration '${settings.early_exaggeration}'
27 --learning-rate '${settings.learning_rate}' 37 --learning-rate '${settings.learning_rate}'
28 #if $settings.n_pc 38 #if $settings.n_pc
29 --n-pcs ${settings.n_pc} 39 --n-pcs ${settings.n_pc}
38 --random-state ${settings.random_seed} 48 --random-state ${settings.random_seed}
39 #end if 49 #end if
40 #end if 50 #end if
41 @INPUT_OPTS@ 51 @INPUT_OPTS@
42 @OUTPUT_OPTS@ 52 @OUTPUT_OPTS@
53 #if $embeddings
54 #if $embeddings_tsv != 'embeddings.tsv'
55 && mv '${embeddings_tsv}' embeddings.tsv
56 #end if
57 #end if
43 58
44 ]]></command> 59 ]]></command>
45 60
46 <inputs> 61 <inputs>
47 <expand macro="input_object_params"/> 62 <expand macro="input_object_params"/>
51 <param name="use_rep" argument="--use-rep" type="select" label="Use the indicated representation"> 66 <param name="use_rep" argument="--use-rep" type="select" label="Use the indicated representation">
52 <option value="X_pca">X_pca, use PCs</option> 67 <option value="X_pca">X_pca, use PCs</option>
53 <option value="X">X, use normalised expression values</option> 68 <option value="X">X, use normalised expression values</option>
54 <option value="auto" selected="true">Automatically chosen based on problem size</option> 69 <option value="auto" selected="true">Automatically chosen based on problem size</option>
55 </param> 70 </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
59 <conditional name="settings"> 71 <conditional name="settings">
60 <param name="default" type="boolean" checked="true" label="Use programme defaults"/> 72 <param name="default" type="boolean" checked="true" label="Use programme defaults"/>
61 <when value="true"/> 73 <when value="true"/>
62 <when value="false"> 74 <when value="false">
75 <param name="key_added" argument="--key-added" type="text" optional="true"
76 label="Additional suffix to the name of the slot to save the embedding" help="If included, PERPLEXITY will be substituted with the value of the perplexity setting."/>
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"/> 77 <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"/>
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"/> 78 <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"/>
65 <param name="early_exaggeration" argument="--early-exaggeration" type="float" value="12" label="Controls the tightness within and between clusters"/> 79 <param name="early_exaggeration" argument="--early-exaggeration" type="float" value="12" label="Controls the tightness within and between clusters"/>
66 <param name="learning_rate" argument="--learning-rate" type="float" value="1000" label="Learning rate, should be between 100 and 1000"/> 80 <param name="learning_rate" argument="--learning-rate" type="float" value="1000" label="Learning rate, should be between 100 and 1000"/>
67 <param name="fast_tsne" type="boolean" checked="false" label="Use multicoreTSNE" help="Depending on the setup and version, the availability of the needed library might vary and hence fail."/> 81 <param name="fast_tsne" type="boolean" checked="false" label="Use multicoreTSNE" help="Depending on the setup and version, the availability of the needed library might vary and hence fail."/>