comparison scanpy-find-cluster.xml @ 0:ce27ae8a36cd 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:09:12 -0400
parents
children ee181563bae7
comparison
equal deleted inserted replaced
-1:000000000000 0:ce27ae8a36cd
1 <?xml version="1.0" encoding="utf-8"?>
2 <tool id="scanpy_find_cluster" name="Scanpy FindCluster" version="@TOOL_VERSION@+galaxy1">
3 <description>based on community detection on KNN graph</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-find-cluster.py
11 -i input.h5
12 -f '${input_format}'
13 -o output.h5
14 -F '${output_format}'
15 #if $output_cluster
16 --output-text-file output.tsv
17 #end if
18 #if $settings.default == "false"
19 --flavor '${settings.flavor}'
20 --key-added '${settings.key_added}'
21 -s '${settings.random_seed}'
22 #if $settings.flavor == "vtraag" and $settings.resolution_file
23 --resolution \$( cat $settings.resolution_file )
24 #elif $settings.flavor == "vtraag"
25 --resolution '${settings.resolution}'
26 #end if
27 #if $settings.restrict_to
28 --restrict-to '${settings.restrict_to}'
29 #end if
30 #if $settings.use_weights
31 --use-weights
32 #end if
33 #end if
34 ]]></command>
35
36 <inputs>
37 <expand macro="input_object_params"/>
38 <expand macro="output_object_params"/>
39 <param name="output_cluster" type="boolean" checked="true" label="Output cluster in two column text format"/>
40 <conditional name="settings">
41 <param name="default" type="boolean" checked="true" label="Use programme defaults"/>
42 <when value="true"/>
43 <when value="false">
44 <param name="flavor" argument="--flavor" type="select" label="Use the indicated representation">
45 <option value="vtraag" selected="true">vtraag</option>
46 <option value="igraph">igraph</option>
47 </param>
48 <param name="resolution" argument="--resolution" type="float" value="1.0" label="Resolution, high value for more and smaller clusters"/>
49 <param name="resolution_file" argument="--resolution" type="data" format="txt,tsv" optional="true" label="File with resolution, use with parameter iterator. Overrides the resolution setting"/>
50 <param name="restrict_to" argument="--restrict-to" type="text" optional="true" label="Restrict clustering to certain sample categories"/>
51 <param name="key_added" argument="--key-added" type="text" value="louvain" label="Key under which to add the cluster labels (do not change unless you know what you are doing)"/>
52 <param name="use_weights" argument="--use-weights" type="boolean" checked="false" label="Use weights from knn graph"/>
53 <param name="random_seed" argument="--random-seed" type="integer" value="0" label="Seed for random number generator"/>
54 </when>
55 </conditional>
56 </inputs>
57
58 <outputs>
59 <data name="output_h5" format="h5" from_work_dir="output.h5" label="${tool.name} on ${on_string}: Cluster object"/>
60 <data name="output_txt" format="tsv" from_work_dir="output.tsv" label="${tool.name} on ${on_string}: Cluster table">
61 <filter>output_cluster</filter>
62 </data>
63 </outputs>
64
65 <tests>
66 <test>
67 <param name="input_obj_file" value="compute_graph.h5"/>
68 <param name="input_format" value="anndata"/>
69 <param name="output_format" value="anndata"/>
70 <param name="output_txt" value="true"/>
71 <param name="default" value="false"/>
72 <param name="flavor" value="vtraag"/>
73 <param name="resolution" value="1.0"/>
74 <param name="random_seed" value="0"/>
75 <output name="output_h5" file="find_cluster.h5" ftype="h5" compare="sim_size"/>
76 <output name="output_txt" file="find_cluster.tsv" ftype="tsv"/>
77 </test>
78 </tests>
79
80 <help><![CDATA[
81 ===========================================
82 Cluster cells into subgroups (`tl.louvain`)
83 ===========================================
84
85 Cluster cells using the Louvain algorithm (Blondel et al, 2008) in the implementation
86 of Traag et al,2017. The Louvain algorithm has been proposed for single-cell
87 analysis by Levine et al, 2015.
88
89 This requires to run `Scanpy ComputeGraph`, first.
90
91 It yields `louvain`, generated cluster label.
92
93 @HELP@
94
95 @VERSION_HISTORY@
96 ]]></help>
97 <expand macro="citations">
98 <citation type="doi">10.1088/1742-5468/2008/10/P10008</citation>
99 <citation type="doi">10.1016/j.cell.2015.05.047</citation>
100 <citation type="doi">10.5281/zenodo.35117</citation>
101 </expand>
102 </tool>