comparison scimap_spatial.xml @ 0:42e6c251bfd0 draft

planemo upload for repository https://github.com/goeckslab/tools-mti/tree/main/tools/scimap commit b19cb55dfb751cccc857b95a432890299bfeebb5
author goeckslab
date Tue, 19 Jul 2022 20:30:34 +0000
parents
children d19c068c2490
comparison
equal deleted inserted replaced
-1:000000000000 0:42e6c251bfd0
1 <tool id="scimap_spatial" name="Spatial Analysis Tools" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
2 <description>from Scimap</description>
3 <macros>
4 <import>main_macros.xml</import>
5 </macros>
6
7 <expand macro="scimap_requirements"/>
8 <expand macro="macro_stdio" />
9 <version_command>echo "@VERSION@"</version_command>
10 <command>
11 <![CDATA[
12 python '$__tool_directory__/scimap_spatial.py'
13 --inputs '$inputs'
14 --anndata '$anndata'
15 --output '$output'
16
17 ]]>
18 </command>
19 <configfiles>
20 <inputs name="inputs" />
21 </configfiles>
22 <inputs>
23 <param name="anndata" type="data" format="h5ad" label="Select the input anndata" />
24 <conditional name="analyses">
25 <param name="selected_tool" type="select" label="Select an analysis">
26 <option value="cluster">Cluster</option>
27 <option value="spatial_aggregate">Spatial Aggregate -- find regions of aggregration of similar cells</option>
28 <option value="spatial_count" selected="true">Spatial Count -- compute a neighbourhood matrix using any categorical variables (e.g. cell-types)</option>
29 <option value="spatial_distance">Spatial Distance -- calculate the average shortest between phenotypes or clusters of interest</option>
30 <option value="spatial_expression">Spatial Expression -- o compute a neighbourhood weighted matrix based on the expression values</option>
31 <option value="spatial_interaction">Spatial Interaction -- computes how likely celltypes are found next to each another compared to random background</option>
32 <option value="spatial_lda">Spatial LDA -- compute a neighbourhood matrix using any categorical variable and then perform Latent Dirichlet Allocation (LDA) modelling</option>
33 <option value="spatial_pscore">Spatial pscore -- a scoring system to evaluate user defined proximity between cell types</option>
34 </param>
35 <when value="cluster">
36 <param name="method" type="select" label="Select the clustering method">
37 <option value="kmeans" selected="true">kmeans</option>
38 <option value="phenograph">phenograph</option>
39 <option value="leiden">leiden</option>
40 <option value="parc">parc</option>
41 </param>
42 <section name="options" title="Advanced Options" expanded="false">
43 <param argument="subset_genes" type="text" value="" optional="true" label="Type in a list of genes that should be included for the purpose of clustering" help="Optional. Comma delimited. By default the algorithm uses all genes in the dataset." />
44 <param argument="sub_cluster" type="boolean" checked="false" optional="true" label="Whether to do sub-clustering on existing clustering or phenotyping " />
45 <param argument="sub_cluster_column" type="text" value="phenotype" optional="true" label="Type in the name of a column to be sub-clustered" help="This is only required when sub_cluster is set to True." />
46 <param argument="sub_cluster_group" type="text" value="" optional="true" label="Type in a list of group names within the sub-cluster column" help="Optional. Comma delimited. By default the program will sub-cluster all groups within column passed through the argument sub_cluster_column." />
47 <param argument="parc_small_pop" type="integer" value="50" optional="true" label="Smallest cluster population to be considered a community in PARC clustering" />
48 <param argument="parc_too_big_factor" type="float" value="0.4" optional="true" label="If a cluster exceeds this share of the entire cell population, then the PARC will be run on the large cluster" />
49 <param argument="k" type="integer" value="10" optional="true" label="Number of clusters to return when using K-Means clustering" />
50 <param argument="n_pcs" type="integer" value="" optional="true" label="Number of PC's to be used in leiden clustering" help="By default it uses all PC's" />
51 <param argument="resolution" type="float" value="1" optional="true" label="A parameter value controlling the coarseness of the clustering" help="Higher values lead to more clusters." />
52 <param argument="phenograph_clustering_metric" type="select" label="Distance metric to define nearest neighbors">
53 <option value="euclidean" selected="true">euclidean</option>
54 <option value="cityblock">cityblock</option>
55 <option value="cosine">cosine</option>
56 <option value="manhattan">manhattan</option>
57 <option value="braycurtis">braycurtis</option>
58 <option value="canberra">canberra</option>
59 <option value="chebyshev">chebyshev</option>
60 <option value="correlation">correlation</option>
61 <option value="dice">dice</option>
62 <option value="hamming">hamming</option>
63 <option value="jaccard">jaccard</option>
64 <option value="mahalanobis">mahalanobis</option>
65 <option value="minkowski">minkowski</option>
66 <option value="rogerstanimoto">rogerstanimoto</option>
67 <option value="russellrao">russellrao</option>
68 <option value="seuclidean">seuclidean</option>
69 <option value="sokalmichener">sokalmichener</option>
70 <option value="sokalsneath">sokalsneath</option>
71 <option value="sqeuclidean">sqeuclidean</option>
72 <option value="yule">yule</option>
73 </param>
74 <param argument="nearest_neighbors" type="integer" value="30" optional="true" label="Number of nearest neighbors to use in first step of graph construction" help="This parameter is used both in leiden and phenograph clustering." />
75 <param argument="use_raw" type="boolean" checked="true" optional="true" label="Whether to use raw data for clustering" help=" If False, normalized/scaled data within adata.X will be used." />
76 <!-- <param argument="log" type="boolean" checked="true" optional="true" label="Whether to log the raw data" help="Set use_raw = True for this to take effect." /> -->
77 <param argument="random_state" type="integer" value="0" optional="true" help="Used to change the initialization of the optimization." />
78 <param argument="collapse_labels" type="boolean" checked="false" optional="true" help="While sub clustering only a few phenotypes/clusters, this argument helps to group all the other phenotypes/clusters into a single category- Helps in visualisation." />
79 <param argument="label" type="text" value="" optional="true" label="Column name for the returned data" help="Stored in adata.obs. The default is adata.obs [method used]." />
80 <!-- <param argument="output_dir"> -->
81 </section>
82 </when>
83 <when value="spatial_aggregate">
84 <expand macro="scimap_spatial_options" label="spatial_aggregate">
85 <param argument="phenotype" type="text" value="phenotype" optional="flase" label="Column name of the column containing the phenotype information" />
86 <param argument="purity" type="integer" value="60" min="1" max="100" label="Percent purity of neighbouring cells" help="e.g. if 60 is chosen, every neighbourhood is tested such that if a particular phenotype makes up greater than 60% of the total population it is annotated to be an aggregate of that particular phenotype." />
87 <param argument="method" type="select" label="Select the method">
88 <option value="radius" selected="true">radius</option>
89 <option value="knn">knn</option>
90 </param>
91 <param argument="radius" type="integer" value="30" optional="true" label="The radius used to define a local neighbhourhood" />
92 <param argument="knn" type="integer" value="10" optional="true" label="Number of cells considered for defining the local neighbhourhood" />
93 </expand>
94 </when>
95 <when value="spatial_count">
96 <expand macro="scimap_spatial_options" label="spatial_count">
97 <param argument="phenotype" type="text" value="phenotype" optional="flase" label="Column name of the column containing the phenotype information" />
98 <param argument="method" type="select" label="Select the method">
99 <option value="radius" selected="true">radius</option>
100 <option value="knn">knn</option>
101 </param>
102 <param argument="radius" type="integer" value="30" optional="true" label="The radius used to define a local neighbhourhood" />
103 <param argument="knn" type="integer" value="10" optional="true" label="Number of cells considered for defining the local neighbhourhood" />
104 </expand>
105 </when>
106 <when value="spatial_distance">
107 <expand macro="scimap_spatial_options">
108 <param argument="phenotype" type="text" value="phenotype" optional="flase" label="Column name of the column containing the phenotype information" />
109 </expand>
110 </when>
111 <when value="spatial_expression">
112 <expand macro="scimap_spatial_options" label="spatial_expression">
113 <param argument="method" type="select" label="Select the method">
114 <option value="radius" selected="true">radius</option>
115 <option value="knn">knn</option>
116 </param>
117 <param argument="radius" type="integer" value="30" optional="true" label="The radius used to define a local neighbhourhood" />
118 <param argument="knn" type="integer" value="10" optional="true" label="Number of cells considered for defining the local neighbhourhood" />
119 <param argument="use_raw" type="boolean" checked="true" optional="true" label="Whether to use raw data for clustering" help=" If False, normalized/scaled data within adata.X will be used." />
120 <!-- <param argument="log" type="boolean" checked="true" optional="true" label="Whether to log the raw data" help="Set use_raw = True for this to take effect." /> -->
121 </expand>
122 </when>
123 <when value="spatial_interaction">
124 <expand macro="scimap_spatial_options" label="spatial_interaction">
125 <param argument="phenotype" type="text" value="phenotype" optional="flase" label="Column name of the column containing the phenotype information" />
126 <param argument="method" type="select" label="Select the method">
127 <option value="radius" selected="true">radius</option>
128 <option value="knn">knn</option>
129 </param>
130 <param argument="radius" type="integer" value="30" optional="true" label="The radius used to define a local neighbhourhood" />
131 <param argument="knn" type="integer" value="10" optional="true" label="Number of cells considered for defining the local neighbhourhood" />
132 <param argument="permutation" type="integer" value="1000" optional="true" label="The number of permutations to be performed for calculating the P-Value" />
133 <param argument="pval_method" type="select" label="Select a method to calculate the P-values">
134 <option value="zscore" selected="true">zscore</option>
135 <option value="histocat">histocat</option>
136 </param>
137 </expand>
138 </when>
139 <when value="spatial_lda">
140 <expand macro="scimap_spatial_options" label="spatial_lda">
141 <param argument="phenotype" type="text" value="phenotype" optional="flase" label="Column name of the column containing the phenotype information" />
142 <param argument="method" type="select" label="Select the method">
143 <option value="radius" selected="true">radius</option>
144 <option value="knn">knn</option>
145 </param>
146 <param argument="radius" type="integer" value="30" optional="true" label="The radius used to define a local neighbhourhood" />
147 <param argument="knn" type="integer" value="10" optional="true" label="Number of cells considered for defining the local neighbhourhood" />
148 <param argument="num_motifs" type="integer" value="10" optional="true" label="The number of requested latent motifs to be extracted from the training corpus" />
149 <param argument="random_state" type="integer" value="0" optional="true" label="The seed number for random state" />
150 </expand>
151 </when>
152 <when value="spatial_pscore">
153 <expand macro="scimap_spatial_options" label="spatial_pscore">
154 <param argument="proximity" type="text" value="" optional="false" label="Type in the list of cell-types for which the proximity score needs to calculated" help="Comma delimited. e.g.: CellType-A,CellType-B." />
155 <param argument="score_by" type="text" value="imageid" optional="true" label="Column name containing region's of interest for score comparison" help="Optional. By default the score is calculated across the entire image." />
156 <param argument="phenotype" type="text" value="phenotype" optional="flase" label="Column name of the column containing the phenotype information" />
157 <param argument="method" type="select" label="Select the method">
158 <option value="radius" selected="true">radius</option>
159 <option value="knn">knn</option>
160 </param>
161 <param argument="radius" type="integer" value="20" optional="true" label="The radius used to define a local neighbhourhood" />
162 <param argument="knn" type="integer" value="3" optional="true" label="Number of cells considered for defining the local neighbhourhood" />
163 </expand>
164 </when>
165 </conditional>
166 </inputs>
167 <outputs>
168 <data format="h5ad" name="output" label="Scimap.tools.${analyses.selected_tool} on ${on_string}" />
169 </outputs>
170 <tests>
171 <test>
172 <param name="anndata" value="imc.h5ad" />
173 <conditional name="analyses">
174 <param name="selected_tool" value="cluster" />
175 <param name="method" value="kmeans" />
176 </conditional>
177 <output name="output">
178 <assert_contents>
179 <has_h5_keys keys="obs/kmeans" />
180 </assert_contents>
181 </output>
182 </test>
183 <test>
184 <param name="anndata" value="tutorial_data_pheno.h5ad" />
185 <conditional name="analyses">
186 <param name="selected_tool" value="spatial_aggregate" />
187 </conditional>
188 <output name="output">
189 <assert_contents>
190 <has_h5_keys keys="obs/spatial_aggregate" />
191 </assert_contents>
192 </output>
193 </test>
194 </tests>
195 <help>
196 <![CDATA[
197 **What it does**
198
199 This tool does various single cell spatial analyses with Scimap.
200
201 **Input**
202
203 AnnData.
204
205 **Output**
206
207 Anndata with a corresponding key added.
208
209
210 ]]>
211 </help>
212 <citations>
213 </citations>
214 </tool>