Mercurial > repos > iuc > spapros_selection
comparison selection.xml @ 0:c7527212b66b draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/spapros/ commit aed7fe13fa0ed09d77a31eeecaf3ec3fba7eed3b
author | iuc |
---|---|
date | Mon, 16 Sep 2024 11:37:46 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c7527212b66b |
---|---|
1 <tool id="spapros_selection" name="Selection" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@profile@"> | |
2 <description>of marker genes with spapros</description> | |
3 <macros> | |
4 <import>macros.xml</import> | |
5 </macros> | |
6 <expand macro="requirements"> | |
7 </expand> | |
8 <expand macro="version_command"/> | |
9 <command detect_errors="exit_code"><![CDATA[ | |
10 @CMD@ | |
11 ]]></command> | |
12 <configfiles> | |
13 <configfile name="script_file"><![CDATA[ | |
14 @CMD_imports@ | |
15 @CMD_read_inputs@ | |
16 | |
17 random.seed($seed) | |
18 | |
19 mpl.rcParams['figure.dpi'] = $general_figure_options.dpi | |
20 plt.rcParams["font.size"] = $general_figure_options.fontsize | |
21 | |
22 header_markerset='infer' | |
23 #if $cond_markerset.select_markerset == 'True' and $cond_markerset.header_markerset == 'not_included': | |
24 header_markerset=None | |
25 #end if | |
26 | |
27 selector = sp.se.ProbesetSelector( | |
28 adata, | |
29 celltype_key='$celltype_key', | |
30 #if $genes_key != '': | |
31 genes_key='$genes_key', | |
32 #else: | |
33 genes_key=None, | |
34 #end if | |
35 #if $cond_n.select_n == 'True': | |
36 n=$cond_n.n, | |
37 #else: | |
38 n=None, | |
39 #end if | |
40 #if $preselected_genes != '' | |
41 preselected_genes = '$preselected_genes'.split(','), | |
42 #end if | |
43 #if $prior_genes != '' | |
44 prior_genes = '$prior_genes'.split(','), | |
45 #end if | |
46 #if $cond_n_pca_genes.select_n_pca_genes == 'True': | |
47 n_pca_genes=$cond_n_pca_genes.n_pca_genes, | |
48 #end if | |
49 #if $min_mean_difference != 0.0: | |
50 min_mean_difference=$min_mean_difference, | |
51 #end if | |
52 n_min_markers=$n_min_markers, | |
53 #if $celltypes != 'all': | |
54 celltypes='$celltypes'.split(','), | |
55 #else | |
56 celltypes='$celltypes', | |
57 #end if | |
58 #if $cond_markerset.select_markerset == 'True': | |
59 marker_list = {key: [v for v in list(value.values()) if pd.notna(v)] for key, value in pd.read_csv('$cond_markerset.markerset', sep='\t', index_col=0, header=header_markerset).to_dict(orient='index').items()}, | |
60 #end if | |
61 n_list_markers=$n_list_markers, | |
62 marker_corr_th=$marker_corr_th, | |
63 #if $pca_penalties != '' | |
64 pca_penalties = '$pca_penalties'.split(','), | |
65 #end if | |
66 #if $DE_penalties != '' | |
67 DE_penalties = '$DE_penalties'.split(','), | |
68 #end if | |
69 #if $m_penalties_adata_celltypes != '' | |
70 m_penalties_adata_celltypes = '$m_penalties_adata_celltypes'.split(','), | |
71 #end if | |
72 #if $m_penalties_list_celltypes != '' | |
73 m_penalties_list_celltypes = '$m_penalties_list_celltypes'.split(','), | |
74 #end if | |
75 #if $advanced_options.cond_DE_selection_hparams.select_DE_selection_hparams == 'True': | |
76 DE_selection_hparams={"n": $advanced_options.cond_DE_selection_hparams.n_DE_selection_hparams, "per_group": $advanced_options.cond_DE_selection_hparams.per_group} | |
77 #end if | |
78 #if $advanced_options.cond_forest_hparams.select_forest_hparams == 'True': | |
79 forest_hparams={"n_trees": $advanced_options.cond_forest_hparams.n_trees, "subsample": $advanced_options.cond_forest_hparams.subsample, "test_subsample": $advanced_options.cond_forest_hparams.test_subsample}, | |
80 #end if | |
81 #if $advanced_options.cond_forest_DE_baseline_hparams.select_forest_DE_baseline_hparams == 'True': | |
82 forest_DE_baseline_hparams={ | |
83 "n_DE": $advanced_options.cond_forest_DE_baseline_hparams.n_DE, | |
84 "min_score": $advanced_options.cond_forest_DE_baseline_hparams.min_score, | |
85 "n_stds": $advanced_options.cond_forest_DE_baseline_hparams.n_stds, | |
86 "max_step": $advanced_options.cond_forest_DE_baseline_hparams.max_step, | |
87 "min_outlier_dif": $advanced_options.cond_forest_DE_baseline_hparams.min_outlier_dif, | |
88 "n_terminal_repeats": $advanced_options.cond_forest_DE_baseline_hparams.n_terminal_repeats, | |
89 }, | |
90 #end if | |
91 #if $advanced_options.cond_add_forest_genes_hparams.select_add_forest_genes_hparams == 'True': | |
92 add_forest_genes_hparams={"n_max_per_it": $advanced_options.cond_add_forest_genes_hparams.n_max_per_it, "performance_th": $advanced_options.cond_add_forest_genes_hparams.performance_th, "importance_th": $advanced_options.cond_add_forest_genes_hparams.importance_th}, | |
93 #end if | |
94 #if $advanced_options.cond_marker_selection_hparams.select_marker_selection_hparams == 'True': | |
95 marker_selection_hparams={"penalty_threshold": $advanced_options.cond_marker_selection_hparams.penalty_threshold}, | |
96 #end if | |
97 verbosity=0, | |
98 seed=$seed, | |
99 n_jobs=int(os.environ.get('GALAXY_SLOTS', '4')) | |
100 ) | |
101 | |
102 selector.select_probeset() | |
103 | |
104 sp.pl.masked_dotplot( | |
105 adata, | |
106 selector, | |
107 ct_key='$figure_options_masked_dotplot.ct_key', | |
108 imp_threshold=$figure_options_masked_dotplot.imp_threshold, | |
109 #if $figure_options_masked_dotplot.celltypes != '': | |
110 celltypes='$figure_options_masked_dotplot.celltypes', | |
111 #end if | |
112 #if $figure_options_masked_dotplot.n_genes != 0: | |
113 n_genes=$figure_options_masked_dotplot.n_genes, | |
114 #end if | |
115 #if $figure_options_masked_dotplot.comb_markers_only: | |
116 comb_markers_only=True, | |
117 #end if | |
118 #if $figure_options_masked_dotplot.markers_only: | |
119 markers_only=True, | |
120 #end if | |
121 cmap='$figure_options_masked_dotplot.cmap', | |
122 comb_marker_color='$figure_options_masked_dotplot.comb_marker_color', | |
123 marker_color='$figure_options_masked_dotplot.marker_color', | |
124 non_adata_celltypes_color='$figure_options_masked_dotplot.non_adata_celltypes_color', | |
125 use_raw=$figure_options_masked_dotplot.use_raw, | |
126 save='masked_dotplot.$format', | |
127 ) | |
128 | |
129 selector.plot_gene_overlap( | |
130 style='$figure_options_plot_gene_overlap.style', | |
131 save='gene_overlap.$format', | |
132 show=False | |
133 ) | |
134 | |
135 probe_genes = selector.probeset.index[selector.probeset.selection] | |
136 celltypes_DE_1vsall = list(selector.probeset[selector.probeset.selection]['celltypes_DE_1vsall']) | |
137 celltypes_DE_specific = list(selector.probeset[selector.probeset.selection]['celltypes_DE_specific']) | |
138 celltypes_DE = list(selector.probeset[selector.probeset.selection]['celltypes_DE']) | |
139 celltypes_marker = list(selector.probeset[selector.probeset.selection]['celltypes_marker']) | |
140 | |
141 marker_dict = dict() | |
142 | |
143 for i,g in enumerate(probe_genes): | |
144 recognized_celltypes = list(set(celltypes_DE_1vsall[i].split(',') + celltypes_DE_specific[i].split(',') + \ | |
145 celltypes_DE[i].split(',') + celltypes_marker[i].split(','))) | |
146 | |
147 if (len(recognized_celltypes) > 1 and '' in recognized_celltypes): | |
148 recognized_celltypes.remove('') | |
149 | |
150 for c in recognized_celltypes: | |
151 if c == '': | |
152 c = 'Unkown' | |
153 if c not in marker_dict: | |
154 marker_dict[c] = [g] | |
155 else: | |
156 marker_dict[c] = marker_dict[c] + [g] | |
157 | |
158 # Find the maximum length of lists | |
159 max_len = max(len(lst) for lst in marker_dict.values()) | |
160 sorted_marker_dict_by_keys = {key: marker_dict[key] for key in sorted(marker_dict.keys())} | |
161 # Fill smaller lists with empty values | |
162 for key, value in sorted_marker_dict_by_keys.items(): | |
163 sorted_marker_dict_by_keys[key] = value + [''] * (max_len - len(value)) | |
164 df = pd.DataFrame(sorted_marker_dict_by_keys).T | |
165 df.to_csv('marker.tsv', sep='\t', index=True) | |
166 | |
167 ]]></configfile> | |
168 </configfiles> | |
169 <inputs> | |
170 <expand macro="inputs_anndata"/> | |
171 <expand macro="param_plot_format"/> | |
172 <param name="celltype_key" type="text" value="celltype" optional="false" label="Key in adata.obs with celltype annotations"/> | |
173 <param name="genes_key" type="text" optional="true" label="Key in adata.var for preselected genes" help="This is typically highly_variable_genes. Leave empty to not subset genes."/> | |
174 <conditional name="cond_n"> | |
175 <param name="select_n" type="select" label="Do you want to set the number of finally selected genes?" help="Note that when `No` we automatically infer n as the minimal number of recommended genes."> | |
176 <option value="False">No</option> | |
177 <option value="True">Yes</option> | |
178 </param> | |
179 <when value="True"> | |
180 <param argument="n" type="integer" value="20" min="1" optional="false" label="Number of finally selected genes" help="Setting n might change the gene ranking since the final added list_markers are added based on the theoretically added genes without list_markers."/> | |
181 </when> | |
182 <when value="False"/> | |
183 </conditional> | |
184 <param name="preselected_genes" type="text" optional="true" label="Pre selected genes (comma separated)" help="These will also have the highest ranking in the final list."/> | |
185 <param name="prior_genes" type="text" optional="true" label="Prioritized genes (comma separated)"/> | |
186 <conditional name="cond_n_pca_genes"> | |
187 <param name="select_n_pca_genes" type="select" label="Do you want to set the number of preselected pca genes?" help="If not, then this step will be skipped."> | |
188 <option value="True">Yes</option> | |
189 <option value="False">No</option> | |
190 </param> | |
191 <when value="True"> | |
192 <param argument="n_pca_genes" type="integer" value="100" min="1" optional="false" label="Number of preselected pca genes"/> | |
193 </when> | |
194 <when value="False"/> | |
195 </conditional> | |
196 <param argument="min_mean_difference" type="float" value="0.0" optional="false" label="Minimal difference of mean expression between at least one celltype and the background" help="This minimal difference is applied as an additional binary penalty in pca_penalties, DE_penalties and m_penalties_adata_celltypes."/> | |
197 <param argument="n_min_markers" type="integer" value="2" min="1" optional="false" label="The minimal number of identified and added markers"/> | |
198 <param name="celltypes" type="text" value="all" optional="false" label="Cell types for which trees are trained" help="If not `all` then seperate the cell type with a comma (e.g., Glia,Neuron)"/> | |
199 <conditional name="cond_markerset"> | |
200 <param name="select_markerset" type="select" label="Do you want to provide a set of marker genes?"> | |
201 <option value="False">No</option> | |
202 <option value="True">Yes</option> | |
203 </param> | |
204 <when value="True"> | |
205 <param name="markerset" type="data" format="tabular" label="Markerset tabular file with rows=conditions (e.g., celltypes) and column=features (e.g., genes)"/> | |
206 <param name="header_markerset" type="select" optional="false" label="Header in the list of markers?"> | |
207 <option value="included">Header included</option> | |
208 <option value="not_included">Header not included</option> | |
209 </param> | |
210 </when> | |
211 <when value="False"/> | |
212 </conditional> | |
213 <param argument="n_list_markers" type="integer" value="2" min="1" optional="false" label="Minimal number of markers per celltype that are at least selected" help="Selected means either selecting genes from the marker list or having correlated genes in the already selected panel."/> | |
214 <param argument="marker_corr_th" type="float" value="0.5" optional="false" label="Minimal correlation to consider a gene as captured"/> | |
215 <param name="pca_penalties" type="text" optional="true" label="List of keys for columns in adata.var containing penalty factors that are multiplied with the scores for PCA based gene selection" help="(comma separted)"/> | |
216 <param name="DE_penalties" type="text" optional="true" label="List of keys for columns in adata.var containing penalty factors that are multiplied with the scores for DE based gene selection (comma separted)" help="(comma separted)"/> | |
217 <param name="m_penalties_adata_celltypes" type="text" optional="true" label="List of keys for columns in adata.var containing penalty factors to filter out marker genes if a gene's penalty < threshold for celltypes in adata" help="(comma separted)"/> | |
218 <param name="m_penalties_list_celltypes" type="text" optional="true" label="List of keys for columns in adata.var containing penalty factors to filter out marker genes if a gene's penalty < threshold for celltypes **not** in adata" help="(comma separted)"/> | |
219 <param argument="seed" type="integer" value="123" min="0" optional="false" label="Random number seed"/> | |
220 | |
221 <section name="advanced_options" title="Advanced Options" expanded="false"> | |
222 <conditional name="cond_DE_selection_hparams"> | |
223 <param name="select_DE_selection_hparams" type="select" label="Do you want to tune hyperparameters for the DE based gene selection?"> | |
224 <option value="False">No</option> | |
225 <option value="True">Yes</option> | |
226 </param> | |
227 <when value="True"> | |
228 <param argument="n_DE_selection_hparams" type="integer" value="3" optional="false" label="n"/> | |
229 <param name="per_group" type="select" label="per_group"> | |
230 <option value="False">No</option> | |
231 <option value="True">Yes</option> | |
232 </param> | |
233 </when> | |
234 <when value="False"/> | |
235 </conditional> | |
236 <conditional name="cond_forest_hparams"> | |
237 <param name="select_forest_hparams" type="select" label="Do you want to tune hyperparameters for the forest based gene selection?"> | |
238 <option value="False">No</option> | |
239 <option value="True">Yes</option> | |
240 </param> | |
241 <when value="True"> | |
242 <param argument="n_trees" type="integer" value="50" optional="false" label="n_trees"/> | |
243 <param argument="subsample" type="integer" value="1000" optional="false" label="subsample"/> | |
244 <param argument="test_subsample" type="integer" value="3000" optional="false" label="test_subsample"/> | |
245 </when> | |
246 <when value="False"/> | |
247 </conditional> | |
248 <conditional name="cond_forest_DE_baseline_hparams"> | |
249 <param name="select_forest_DE_baseline_hparams" type="select" label="Do you want to tune hyperparameters for the DE based gene selection?"> | |
250 <option value="False">No</option> | |
251 <option value="True">Yes</option> | |
252 </param> | |
253 <when value="True"> | |
254 <param argument="n_DE" type="integer" value="1" optional="false" label="n_DE"/> | |
255 <param argument="min_score" type="float" value="0.9" optional="false" label="min_score"/> | |
256 <param argument="n_stds" type="float" value="1.0" optional="false" label="n_stds"/> | |
257 <param argument="max_step" type="integer" value="3" optional="false" label="max_step"/> | |
258 <param argument="min_outlier_dif" type="float" value="0.02" optional="false" label="min_outlier_dif"/> | |
259 <param argument="n_terminal_repeats" type="integer" value="3" optional="false" label="n_terminal_repeats"/> | |
260 </when> | |
261 <when value="False"/> | |
262 </conditional> | |
263 <conditional name="cond_add_forest_genes_hparams"> | |
264 <param name="select_add_forest_genes_hparams" type="select" label="Do you want to tune hyperparameters for adding marker genes to decision trees?"> | |
265 <option value="False">No</option> | |
266 <option value="True">Yes</option> | |
267 </param> | |
268 <when value="True"> | |
269 <param argument="n_max_per_it" type="integer" value="5" optional="false" label="n_max_per_it"/> | |
270 <param argument="performance_th" type="float" value="0.02" optional="false" label="performance_th"/> | |
271 <param argument="importance_th" type="integer" value="0" optional="false" label="importance_th"/> | |
272 </when> | |
273 <when value="False"/> | |
274 </conditional> | |
275 <conditional name="cond_marker_selection_hparams"> | |
276 <param name="select_marker_selection_hparams" type="select" label="Do you want to tune marker selection hyperparameters?"> | |
277 <option value="False">No</option> | |
278 <option value="True">Yes</option> | |
279 </param> | |
280 <when value="True"> | |
281 <param argument="penalty_threshold" type="integer" value="1" optional="false" label="penalty_threshold"/> | |
282 </when> | |
283 <when value="False"/> | |
284 </conditional> | |
285 </section> | |
286 | |
287 <section name="general_figure_options" title="General Figure Output Options" expanded="false"> | |
288 <param argument="dpi" type="integer" value="300" min="1" label="Dpi of figures"/> | |
289 <param argument="fontsize" type="integer" value="100" min="1" label="Font size of figures"/> | |
290 </section> | |
291 | |
292 <section name="figure_options_masked_dotplot" title="Figure Output Options for masked_dotplot" expanded="false"> | |
293 <param name="ct_key" type="text" value="celltype" optional="false" label="Key in adata.var for preselected genes" help="Column of adata.obs with cell type annotation"/> | |
294 <param argument="imp_threshold" type="float" value="0.05" min="0.0" optional="false" label="Annotate genes as Spapros marker only for those genes with importance > imp_threshold"/> | |
295 <param name="celltypes" type="text" optional="true" label="Subset of celltypes (rows of dotplot)"/> | |
296 <param argument="n_genes" type="integer" value="0" min="0" label="Plot top n_genes genes." help="If 0 then all."/> | |
297 <param name="comb_markers_only" type="boolean" value="false" label="Do you want to plot only genes that are Spapros markers for the plotted cell types?"/> | |
298 <param name="markers_only" type="boolean" value="false" label="Do you want to plot only genes that are markers for the plotted cell types?"/> | |
299 <param name="cmap" type="text" value="Reds" optional="false" label="Colormap of mean expressions"/> | |
300 <param name="comb_marker_color" type="text" value="darkblue" optional="false" label="Color for Spapros markers"/> | |
301 <param name="marker_color" type="text" value="blue" optional="false" label="Color for marker genes"/> | |
302 <param name="non_adata_celltypes_color" type="text" value="grey" optional="false" label="Color for celltypes that don't occur in the data set."/> | |
303 <param name="use_raw" type="select" label="Do you want to use adata.raw for plotting?"> | |
304 <option value="False">No</option> | |
305 <option value="True">Yes</option> | |
306 </param> | |
307 </section> | |
308 | |
309 <section name="figure_options_plot_gene_overlap" title="Figure Output Options for plot_gene_overlap" expanded="false"> | |
310 <param name="style" type="select" label="Plot type"> | |
311 <option value="upset">Upset plot</option> | |
312 <option value="venn">Venn diagram</option> | |
313 </param> | |
314 </section> | |
315 | |
316 <expand macro="inputs_common_advanced"/> | |
317 </inputs> | |
318 <outputs> | |
319 <data name="out_masked_dotplot_png" format="png" from_work_dir="*masked_dotplot.png" label="PNG masked_dotplot from ${tool.name} on ${on_string}"> | |
320 <filter>format == 'png'</filter> | |
321 </data> | |
322 <data name="out_masked_dotplot_pdf" format="pdf" from_work_dir="*masked_dotplot.pdf" label="PDF masked_dotplot from ${tool.name} on ${on_string}"> | |
323 <filter>format == 'pdf'</filter> | |
324 </data> | |
325 <data name="out_masked_dotplot_svg" format="svg" from_work_dir="*masked_dotplot.svg" label="SVG masked_dotplot from ${tool.name} on ${on_string}"> | |
326 <filter>format == 'svg'</filter> | |
327 </data> | |
328 <data name="out_gene_overlap_png" format="png" from_work_dir="*gene_overlap.png" label="PNG gene_overlap from ${tool.name} on ${on_string}"> | |
329 <filter>format == 'png'</filter> | |
330 </data> | |
331 <data name="out_gene_overlap_pdf" format="pdf" from_work_dir="*gene_overlap.pdf" label="PDF gene_overlap from ${tool.name} on ${on_string}"> | |
332 <filter>format == 'pdf'</filter> | |
333 </data> | |
334 <data name="out_gene_overlap_svg" format="svg" from_work_dir="*gene_overlap.svg" label="SVG gene_overlap from ${tool.name} on ${on_string}"> | |
335 <filter>format == 'svg'</filter> | |
336 </data> | |
337 <data name="marker_out" format="tabular" from_work_dir="marker.tsv" label="${tool.name} on ${on_string}: Markers"/> | |
338 <expand macro="hidden_outputs"/> | |
339 </outputs> | |
340 <tests> | |
341 <test expect_num_outputs="4"> | |
342 <param name="adata" value="tl.rank_genes_groups.newton-cg.pbmc68k_reduced_240cells.h5ad"/> | |
343 <param name="format" value="png"/> | |
344 <param name="genes_key" value="highly_variable"/> | |
345 <param name="show_log" value="true" /> | |
346 <section name="general_figure_options"> | |
347 <param name="dpi" value="100"/> | |
348 </section> | |
349 <output name="hidden_output"> | |
350 <assert_contents> | |
351 <has_text_matching expression="celltype_key='celltype',"/> | |
352 <has_text_matching expression="genes_key='highly_variable',"/> | |
353 <has_text_matching expression="n_pca_genes=100,"/> | |
354 <has_text_matching expression="seed=123,"/> | |
355 <has_text_matching expression="cmap='Reds',"/> | |
356 <has_text_matching expression="save='masked_dotplot.png',"/> | |
357 <has_text_matching expression="style='upset',"/> | |
358 <has_text_matching expression="save='gene_overlap.png',"/> | |
359 </assert_contents> | |
360 </output> | |
361 <output name="out_masked_dotplot_png"> | |
362 <assert_contents> | |
363 <has_image_width width="4055" delta="2"/> | |
364 <has_image_height height="1108" delta="2"/> | |
365 </assert_contents> | |
366 </output> | |
367 <output name="out_gene_overlap_png"> | |
368 <assert_contents> | |
369 <has_image_width width="1189" delta="2"/> | |
370 <has_image_height height="600" delta="2"/> | |
371 </assert_contents> | |
372 </output> | |
373 <output name="marker_out" file="marker_out_test1.tsv" ftype="tabular"/> | |
374 </test> | |
375 <test expect_num_outputs="4"> | |
376 <param name="adata" value="tl.rank_genes_groups.newton-cg.pbmc68k_reduced_240cells.h5ad"/> | |
377 <param name="format" value="png"/> | |
378 <param name="genes_key" value="highly_variable"/> | |
379 <param name="select_n" value="True"/> | |
380 <param name="n" value="10"/> | |
381 <section name="general_figure_options"> | |
382 <param name="dpi" value="100"/> | |
383 </section> | |
384 <param name="show_log" value="true" /> | |
385 <output name="hidden_output"> | |
386 <assert_contents> | |
387 <has_text_matching expression="celltype_key='celltype',"/> | |
388 <has_text_matching expression="genes_key='highly_variable',"/> | |
389 <has_text_matching expression="n_pca_genes=100,"/> | |
390 <has_text_matching expression="n=10,"/> | |
391 <has_text_matching expression="seed=123,"/> | |
392 <has_text_matching expression="cmap='Reds',"/> | |
393 <has_text_matching expression="save='masked_dotplot.png',"/> | |
394 <has_text_matching expression="style='upset',"/> | |
395 <has_text_matching expression="save='gene_overlap.png',"/> | |
396 </assert_contents> | |
397 </output> | |
398 <output name="out_masked_dotplot_png"> | |
399 <assert_contents> | |
400 <has_image_width width="2914" delta="2"/> | |
401 <has_image_height height="882" delta="2"/> | |
402 </assert_contents> | |
403 </output> | |
404 <output name="out_gene_overlap_png"> | |
405 <assert_contents> | |
406 <has_image_width width="1032" delta="2"/> | |
407 <has_image_height height="600" delta="2"/> | |
408 </assert_contents> | |
409 </output> | |
410 <output name="marker_out" file="marker_out_test2.tsv" ftype="tabular"/> | |
411 </test> | |
412 <test expect_num_outputs="4"> | |
413 <param name="adata" value="tl.rank_genes_groups.newton-cg.pbmc68k_reduced_240cells.h5ad"/> | |
414 <param name="format" value="png"/> | |
415 <param name="genes_key" value="highly_variable"/> | |
416 <param name="celltypes" value="CD34+,CD56+ NK"/> | |
417 <section name="general_figure_options"> | |
418 <param name="dpi" value="100"/> | |
419 </section> | |
420 <param name="show_log" value="true" /> | |
421 <output name="hidden_output"> | |
422 <assert_contents> | |
423 <has_text_matching expression="celltype_key='celltype',"/> | |
424 <has_text_matching expression="genes_key='highly_variable',"/> | |
425 <has_text_matching expression="n_pca_genes=100,"/> | |
426 <has_text_matching expression="seed=123,"/> | |
427 <has_text_matching expression="cmap='Reds',"/> | |
428 <has_text_matching expression="save='masked_dotplot.png',"/> | |
429 <has_text_matching expression="style='upset',"/> | |
430 <has_text_matching expression="save='gene_overlap.png',"/> | |
431 </assert_contents> | |
432 </output> | |
433 <output name="out_masked_dotplot_png"> | |
434 <assert_contents> | |
435 <has_image_width width="2776" delta="2"/> | |
436 <has_image_height height="882" delta="2"/> | |
437 </assert_contents> | |
438 </output> | |
439 <output name="out_gene_overlap_png"> | |
440 <assert_contents> | |
441 <has_image_width width="929" delta="2"/> | |
442 <has_image_height height="565" delta="2"/> | |
443 </assert_contents> | |
444 </output> | |
445 <output name="marker_out" file="marker_out_test3.tsv" ftype="tabular"/> | |
446 </test> | |
447 <test expect_num_outputs="4"> | |
448 <param name="adata" value="tl.rank_genes_groups.newton-cg.pbmc68k_reduced_240cells.h5ad"/> | |
449 <param name="format" value="png"/> | |
450 <param name="genes_key" value="highly_variable"/> | |
451 <param name="select_markerset" value="True"/> | |
452 <param name="markerset" value="marker.tsv"/> | |
453 <param name="header_markerset" value="not_included"/> | |
454 <section name="general_figure_options"> | |
455 <param name="dpi" value="100"/> | |
456 </section> | |
457 <param name="show_log" value="true"/> | |
458 <output name="hidden_output"> | |
459 <assert_contents> | |
460 <has_text_matching expression="celltype_key='celltype',"/> | |
461 <has_text_matching expression="genes_key='highly_variable',"/> | |
462 <has_text_matching expression="n_pca_genes=100,"/> | |
463 <has_text_matching expression="seed=123,"/> | |
464 <has_text_matching expression="cmap='Reds',"/> | |
465 <has_text_matching expression="save='masked_dotplot.png',"/> | |
466 <has_text_matching expression="style='upset',"/> | |
467 <has_text_matching expression="save='gene_overlap.png',"/> | |
468 </assert_contents> | |
469 </output> | |
470 <output name="out_masked_dotplot_png"> | |
471 <assert_contents> | |
472 <has_image_width width="4055" delta="2"/> | |
473 <has_image_height height="1108" delta="2"/> | |
474 </assert_contents> | |
475 </output> | |
476 <output name="out_gene_overlap_png"> | |
477 <assert_contents> | |
478 <has_image_width width="1154" delta="2"/> | |
479 <has_image_height height="600" delta="2"/> | |
480 </assert_contents> | |
481 </output> | |
482 <output name="marker_out" file="marker_out_test4.tsv" ftype="tabular"/> | |
483 </test> | |
484 <test expect_num_outputs="4"> | |
485 <param name="adata" value="tl.rank_genes_groups.newton-cg.pbmc68k_reduced_240cells.h5ad"/> | |
486 <param name="format" value="png"/> | |
487 <param name="genes_key" value="highly_variable"/> | |
488 <section name="advanced_options"> | |
489 <param name="select_DE_selection_hparams" value="True"/> | |
490 <param name="select_forest_hparams" value="True"/> | |
491 <param name="select_forest_DE_baseline_hparams" value="True"/> | |
492 <param name="select_add_forest_genes_hparams" value="True"/> | |
493 <param name="select_marker_selection_hparams" value="True"/> | |
494 </section> | |
495 <section name="general_figure_options"> | |
496 <param name="dpi" value="100"/> | |
497 </section> | |
498 <param name="show_log" value="true"/> | |
499 <output name="hidden_output"> | |
500 <assert_contents> | |
501 <has_text_matching expression="celltype_key='celltype',"/> | |
502 <has_text_matching expression="genes_key='highly_variable',"/> | |
503 <has_text_matching expression="n_pca_genes=100,"/> | |
504 <has_text_matching expression="seed=123,"/> | |
505 <has_text_matching expression="cmap='Reds',"/> | |
506 <has_text_matching expression="save='masked_dotplot.png',"/> | |
507 <has_text_matching expression="style='upset',"/> | |
508 <has_text_matching expression="save='gene_overlap.png',"/> | |
509 </assert_contents> | |
510 </output> | |
511 <output name="out_masked_dotplot_png"> | |
512 <assert_contents> | |
513 <has_image_width width="4055" delta="2"/> | |
514 <has_image_height height="1108" delta="2"/> | |
515 </assert_contents> | |
516 </output> | |
517 <output name="out_gene_overlap_png"> | |
518 <assert_contents> | |
519 <has_image_width width="1189" delta="2"/> | |
520 <has_image_height height="600" delta="2"/> | |
521 </assert_contents> | |
522 </output> | |
523 <output name="marker_out" file="marker_out_test5.tsv" ftype="tabular"/> | |
524 </test> | |
525 </tests> | |
526 <help><![CDATA[ | |
527 Probe set selection for single-cell sequencing data using spapros. | |
528 ============================================================================================================ | |
529 | |
530 Spapros is a python package that provides a pipeline for probe set selection and evaluation for targeted spatial transcriptomics data. | |
531 | |
532 Key Features: | |
533 Select probe sets for spatial transcriptomics which identify cell types of interest, capture general transcriptomic variation, and incorporate prior knowledge | |
534 | |
535 Evaluate probe sets with an extensive pipeline | |
536 | |
537 Further documentation can be found here: https://spapros.readthedocs.io/en/latest/index.html. | |
538 | |
539 ]]></help> | |
540 <expand macro="citations"/> | |
541 </tool> |