comparison clustering.xml @ 0:555ca19d07e6 draft default tip

planemo upload for repository https://github.com/goeckslab/tools-st/tree/main/tools/spatialge commit 482b2e0e6ca7aaa789ba07b8cd689da9a01532ef
author goeckslab
date Wed, 13 Aug 2025 19:32:19 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:555ca19d07e6
1 <tool id="clustering_spatialGE" name="spatialGE Spatially-Informed Clustering" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="22.01">
2 <description>Unsupervised spatially-informed clustering on spatialGE spatial transcriptomics data</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6
7 <expand macro="spatialge_requirements"/>
8
9 <command detect_errors="aggressive"><![CDATA[
10
11 ##--------------------------
12 ## CLUSTERING
13 ##--------------------------
14
15 Rscript '$__tool_directory__/spatialGE_clust.R'
16
17 --file '$file'
18
19 #if $datatype == 'visium'
20 --visium
21 #end if
22
23 #if $datatype == 'raw'
24 --raw
25 #end if
26
27 #if $datatype == 'cosmx'
28 --cosmx
29 #end if
30
31 #if $samples
32 --samples '$samples'
33 #end if
34
35 #if $spatial_weight
36 --weight '$spatial_weight'
37 #end if
38
39 --dist '$dist_metric'
40
41 #if str($deepsplit.split_type) == 'logical_split':
42 --dslogical
43 --logical '$split_true'
44 #end if
45
46 #if str($deepsplit.split_type) == 'numeric_split':
47 --dsnumeric
48 --numeric '$split_numeric'
49 #end if
50
51 #if $ptsize
52 --ptsize '$ptsize'
53 #end if
54
55 ]]></command>
56 <inputs>
57 <param name="file" type="data" format="rds" label="STlist.rds output from spatialGE preprocessing tool" />
58 <param name="datatype" type="select" label="Original data type from spatialGE Preprocessing" >
59 <option value="visium">Visium</option>
60 <option value="raw">Raw Data</option>
61 <option value="cosmx">CosMX-SMI</option>
62 </param>
63 <param name="samples" type="text" optional="true" label="Sample(s) to perform clustering (comma separated list)" />
64 <param name="spatial_weight" type="float" min="0" max="1" value="0.025" optional="true" label="Weight to be applied to spatial distances" />
65 <param name="dist_metric" type="select" label="Distance metric options" >
66 <option value="euclidean" selected="true">Euclidean</option>
67 <option value="manhattan">Manhattan</option>
68 <option value="maximum">Maximum</option>
69 <option value="minkowski">Minkowski</option>
70 <option value="canberra">Canberra</option>
71 </param>
72 <conditional name="deepsplit">
73 <param name="split_type" type="select" label="Optional: specify deepSplit parameter for cluster splitting sensitivity" >
74 <option value="no_split" selected="true">Do not change cluster sensitivity</option>
75 <option value="logical_split">Logical split: generally perform more sensitive clustering</option>
76 <option value="numeric_split">Numeric split: specify clustering sensitivity between 0-4</option>
77 </param>
78 <when value="no_split">
79 </when>
80 <when value="logical_split">
81 <param name="split_true" type="boolean" label="Switch to Yes for logical deepSplit" />
82 </when>
83 <when value="numeric_split">
84 <param name="split_numeric" type="float" min="0" max="4" label="Specify number between 0-4 for deepSplit (higher value equals higher sensitivity)" />
85 </when>
86 </conditional>
87 <param name="ptsize" type="float" min="0" max="5" value="2.75" optional="true" label="Specify plot point size" />
88 </inputs>
89 <outputs>
90 <collection name="cluster_plots" type="list" label="Cluster Plots">
91 <discover_datasets pattern="__name_and_ext__" directory="./cluster_plots" ext="png" />
92 <filter>cluster_plots['plot'] == "cluster_plots"</filter>
93 </collection>
94 </outputs>
95 <tests>
96 <test expect_num_outputs="1">
97 <param name="file" value="STobj_lung6.rds" />
98 <param name="datatype" value="cosmx" />
99 <param name="samples" value="Lung6_fov_4" />
100 <output_collection name="cluster_plots" >
101 <element name="clustered_Lung6_fov_4" file="clustered_Lung6_fov_4.png" compare="sim_size" />
102 </output_collection>
103 </test>
104 <test expect_num_outputs="1">
105 <param name="file" value="STobj_lung5.rds" />
106 <param name="datatype" value="cosmx" />
107 <param name="samples" value="Lung5_fov_2" />
108 <conditional name="deepsplit">
109 <param name="split_type" value="logical_split" />
110 <param name="split_true" value="TRUE" />
111 </conditional>
112 <output_collection name="cluster_plots">
113 <element name="clustered_Lung5_fov_2" file="clustered_Lung5_fov_2.png" compare="sim_size" />
114 </output_collection>
115 </test>
116 </tests>
117 <help>
118 <![CDATA[
119 **What it does**
120
121 spatialGE is a tool designed for the analysis and visualization of spatially-resolved transcriptomics data.
122
123 spatialGE Spatially-Informed Clustering is built to perform unsupervised spatially-informed clustering on the spots/cells of spatial transcriptomics data and the expression of the top variable genes.
124 This tool will take the output of `spatialGE Preprocessing` and calculate a distance (defaults to euclidean) between spots/cells based on spatial coordinates.
125 The distances are weighted and hierarchical clustering is performed on the sum of the weighted distance matrices. This allows for a better understanding
126 of the tissue architecture by identifying tissue niches/domains that are spatially cohesive, according to spot/cell clustering.
127
128 **Input**
129
130 Currently, the only accepted input is an .rds file as output by `spatialGE Preprocessing`. The preprocessing step creates an `STlist`, spatialGE's required data type.
131 Please first perform preprocessing to transform spatial transcriptomics data, then use the output **STlist.rds** file as input for this tool.
132
133 It is also required to specify the original data type. Please select either Visium, Raw Data, or CosMX-SMI
134 as the data type corresponding to the `spatialGE Preprocessing` input.
135
136 **Optional Settings**
137
138 - Sample(s) to perform clustering (comma separated list):
139
140 - To perform clustering and plotting on only a subset of samples from the STlist.rds file, input a comma-separated list of unique sample names matching those in the input file
141 - Visium Example: sample_094c,sample_094d
142 - Raw Data Example: ST_mel3_rep1,ST_mel2_rep1
143 - CosMS-SMI Example: Lung5_fov_2,Lung5_fov_11
144
145 - Weight to be applied to spatial distances:
146
147 - Any number between 0-1 indicating the weight to be applied to spatial distances. A weight closer to 0 indicates that little spatial information is used, and clustering relies on gene expression profiles. A weight closer to 1 indicates that spatial information is heavily used, with little reliance on gene expression. The default value here is 0.025, using mostly gene expression with a spatial smoothing effect.
148
149 - Distance metric options:
150
151 List of distance metric options from `wordspace::dist.matrix`. Different metrics compare expression profiles and spatial coordinates differently.
152
153 - Euclidean (default)
154 - Manhattan
155 - Maximum
156 - Minkowski
157 - Canberra
158
159 - deepSplit for cluster sensitivity:
160
161 Choose between logical or numeric deepSplit to provide a rough control over sensitivity to cluster splitting. The higher the value (or if TRUE), the more and smaller clusters will be produced.
162
163 - Logical: set deepSplit to TRUE, cluster sensitivity will increase
164
165 - Numeric: control deepSplit between 0-4, closer to 4 indicate shigher cluster resolution
166
167 - Specify plot point size:
168
169 - Increase or decrease size of points when plotting, between 0-5. Defaults to 2.75.
170
171 ]]>
172 </help>
173 <expand macro="citations"/>
174 </tool>