comparison seurat_macros.xml @ 0:699c0ca328f2 draft default tip

planemo upload commit 0264c359f1d638bbbbab515a3502231f679cdcf6
author ebi-gxa
date Sat, 02 Mar 2024 10:40:57 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:699c0ca328f2
1 <?xml version="1.0"?>
2 <macros>
3 <token name="@VERSION@">4.0.0</token>
4 <token name="@SEURAT_VERSION@">4.0.4</token>
5 <xml name="requirements">
6 <requirements>
7 <requirement type="package" version="@VERSION@">seurat-scripts</requirement>
8 </requirements>
9 </xml>
10 <xml name="version">
11 <version_command><![CDATA[
12 echo $(R --version | grep version | grep -v GNU)", seurat version" $(R --vanilla --slave -e "library(seurat); cat(sessionInfo()\$otherPkgs\$seurat\$Version)" 2> /dev/null | grep -v -i "WARNING: ")
13 ]]></version_command>
14 </xml>
15
16 <xml name="input_object_params" token_multiple="False" token_varname="input" token_optional="False">
17 <conditional name="@VARNAME@" label="Input format">
18 <param type="select" name="format" label="Choose the format of the @VARNAME@" help="Seurat RDS, Seurat H5, Single Cell Experiment RDS, Loom or AnnData">
19 <option value="rds_seurat" selected="true">RDS with a Seurat object</option>
20 <option value="loom">Loom</option>
21 <option value="h5seurat">Seurat HDF5</option>
22 <option value="anndata">AnnData</option>
23 <option value="rds_sce">RDS with a Single Cell Experiment object</option>
24 </param>
25 <when value="anndata">
26 <param type="data" name="anndata_file" multiple="@MULTIPLE@" optional="@OPTIONAL@" label="AnnData file" help="Select AnnData files for @VARNAME@" format="h5,h5ad"/>
27 </when>
28 <when value="loom">
29 <param type="data" name="loom_file" multiple="@MULTIPLE@" optional="@OPTIONAL@" label="Loom file" help="Select Loom file(s) for @VARNAME@" format="h5,h5loom"/>
30 </when>
31 <when value="rds_seurat">
32 <param type="data" name="rds_seurat_file" multiple="@MULTIPLE@" optional="@OPTIONAL@" label="RDS file" help="Select RDS file(s) with Seurat object for @VARNAME@" format="rdata"/>
33 </when>
34 <when value="rds_sce">
35 <param type="data" name="rds_sce_file" multiple="@MULTIPLE@" optional="@OPTIONAL@" label="RDS file" help="Select RDS file(s) with Single Cell Experiment object for @VARNAME@" format="rdata"/>
36 </when>
37 <when value="h5seurat">
38 <param type="data" name="h5seurat_file" multiple="@MULTIPLE@" optional="@OPTIONAL@" label="Seurat HDF5" help="Select Seurat HDF5 file(s) for @VARNAME" format="h5"/>
39 </when>
40 </conditional>
41 </xml>
42
43 <token name="@INPUT_OBJ_PREAMBLE@">
44 #if $input.format == 'loom'
45 ln -s '$input.loom_file' input.loom;
46 #else if $input.format == 'h5seurat'
47 ln -s '$input.h5seurat_file' input.h5seurat;
48 #else if $input.format == 'anndata'
49 ## it complains when using links for AnnData...
50 cp '$input.anndata_file' input.h5ad;
51 #end if
52 </token>
53
54 <token name="@INPUT_OBJECT@">
55 #if $input.format == "anndata"
56 --input-object-file input.h5ad --input-format anndata
57 #else if $input.format == "loom"
58 --input-object-file input.loom --input-format loom
59 #else if $input.format == "rds_seurat"
60 --input-object-file '$input.rds_seurat_file' --input-format seurat
61 #else if $input.format == "rds_sce"
62 --input-object-file '$input.rds_sce_file' --input-format singlecellexperiment
63 #else if $input.format == "h5seurat"
64 --input-object-file input.h5seurat --input-format h5seurat
65 #end if
66 </token>
67
68 <token name="@QUERY_OBJ_PREAMBLE@">
69 #if $query.format == 'loom'
70 ln -s '$query.loom_file' query.loom;
71 #else if $query.format == 'h5seurat'
72 ln -s '$query.h5seurat_file' query.h5seurat;
73 #else if $query.format == 'anndata'
74 ## it complains when using links for AnnData...
75 cp '$query.anndata_file' query.h5ad;
76 #end if
77 </token>
78
79 <token name="@QUERY_OBJECT@">
80 #if $query.format == "anndata"
81 --query-object-file query.h5ad --query-format anndata
82 #else if $query.format == "loom"
83 --query-object-file query.loom --query-format loom
84 #else if $query.format == "rds_seurat"
85 --query-object-file '$query.rds_seurat_file' --query-format seurat
86 #else if $query.format == "rds_sce"
87 --query-object-file '$query.rds_sce_file' --query-format singlecellexperiment
88 #else if $query.format == "h5seurat"
89 --query-object-file query.h5seurat --query-format h5seurat
90 #end if
91 </token>
92
93 <token name="@ANCHORS_OBJ_PREAMBLE@">
94 #if $anchors.format == 'loom'
95 ln -s '$anchors.loom_file' anchors.loom;
96 #else if $anchors.format == 'h5seurat'
97 ln -s '$anchors.h5seurat_file' anchors.h5seurat;
98 #else if $anchors.format == 'anndata'
99 ## it complains when using links for AnnData...
100 cp '$anchors.anndata_file' anchors.h5ad;
101 #end if
102 </token>
103
104 <token name="@ANCHORS_OBJECT@">
105 #if $anchors.format == "anndata"
106 --anchors-object-file anchors.h5ad --anchors-format anndata
107 #else if $anchors.format == "loom"
108 --anchors-object-file anchors.loom --anchors-format loom
109 #else if $anchors.format == "rds_seurat"
110 --anchors-object-file '$anchors.rds_seurat_file' --anchors-format seurat
111 #else if $anchors.format == "rds_sce"
112 --anchors-object-file '$anchors.rds_sce_file' --anchors-format singlecellexperiment
113 #else if $anchors.format == "h5seurat"
114 --anchors-object-file anchors.h5seurat --anchors-format h5seurat
115 #end if
116 </token>
117
118 <token name="@REFERENCE_OBJ_PREAMBLE@">
119 #if $reference.format == 'loom'
120 ln -s '$reference.loom_file' reference.loom;
121 #else if $reference.format == 'h5seurat'
122 ln -s '$reference.h5seurat_file' reference.h5seurat;
123 #else if $reference.format == 'anndata'
124 ## it complains when using links for AnnData...
125 cp '$reference.anndata_file' reference.h5ad;
126 #end if
127 </token>
128
129 <token name="@REFERENCE_OBJECT@">
130 #if $reference.format == "anndata"
131 --reference-object-file reference.h5ad --reference-format anndata
132 #else if $reference.format == "loom"
133 --reference-object-file reference.loom --reference-format loom
134 #else if $reference.format == "rds_seurat"
135 --reference-object-file '$reference.rds_seurat_file' --reference-format seurat
136 #else if $reference.format == "rds_sce"
137 --reference-object-file '$reference.rds_sce_file' --reference-format singlecellexperiment
138 #else if $reference.format == "h5seurat"
139 --reference-object-file reference.h5seurat --reference-format h5seurat
140 #end if
141 </token>
142
143 <token name="@INPUT_OBJS_PREAMBLE@">
144 #if $input.format == 'loom'
145 #for $i, $fh in enumerate($input.loom_file):
146 ln -s '$fh' input.${i}.loom;
147 #end for
148 #else if $input.format == 'h5seurat'
149 #for $i, $fh in enumerate($input.h5seurat_file):
150 ln -s '$fh' input.${i}.h5seurat;
151 #end for
152 #else if $input.format == 'anndata'
153 ## it complains when using links for AnnData...
154 #for $i, $fh in enumerate($input.anndata_file):
155 cp '$fh' input.${i}.h5ad;
156 #end for
157 #end if
158 </token>
159
160 <token name="@INPUT_OBJECTS@">
161 #if $input.format == "anndata"
162 --input-object-files
163 #set file_array = [ "input."+str($i)+".h5ad" for $i, $fh in enumerate($input.anndata_file)]
164 #set files = ",".join($file_array)
165 ${files}
166 --input-format anndata
167 #else if $input.format == "loom"
168 --input-object-files
169 #set file_array = [ "input."+str($i)+".loom" for $i, $fh in enumerate($input.loom_file)]
170 #set files = ",".join($file_array)
171 ${files}
172 --input-format loom
173 #else if $input.format == "rds_seurat"
174 --input-object-files
175 #set file_array = $input.rds_seurat_file
176 #set files = ",".join([ str($fh) for $fh in $file_array ])
177 ${files}
178 --input-format seurat
179 #else if $input.format == "rds_sce"
180 --input-object-files
181 #set file_array = $input.rds_sce_file
182 #set files = ",".join([ str($fh) for $fh in $file_array ])
183 ${files}
184 --input-format singlecellexperiment
185 #else if $input.format == "h5seurat"
186 --input-object-files
187 #set file_array = [ "input."+str($i)+".h5seurat" for $i, $fh in enumerate($input.h5seurat)]
188 #set files = ",".join($file_array)
189 ${files}
190 --input-format h5seurat
191 #end if
192 </token>
193
194 <token name="@REFERENCE_OBJS_PREAMBLE@">
195 #if $reference.format == 'loom'
196 #for $i, $fh in enumerate($reference.loom_file):
197 ln -s '$fh' reference.${i}.loom;
198 #end for
199 #else if $reference.format == 'h5seurat'
200 #for $i, $fh in enumerate($reference.h5seurat_file):
201 ln -s '$fh' reference.${i}.h5seurat;
202 #end for
203 #else if $reference.format == 'anndata'
204 ## it complains when using links for AnnData...
205 #for $i, $fh in enumerate($reference.anndata_file):
206 cp '$fh' reference.${i}.h5ad;
207 #end for
208 #end if
209 </token>
210
211 <token name="@REFERENCE_OBJECTS@">
212 #if $reference.format == "anndata" and $reference.anndata_file:
213 --reference-object-files
214 #set file_array = [ "reference."+str($i)+".h5ad" for $i, $fh in enumerate($reference.anndata_file)]
215 #set files = ",".join($file_array)
216 ${files}
217 --reference-format anndata
218 #else if $reference.format == "loom" and $reference.loom_file:
219 --reference-object-files
220 #set file_array = [ "reference."+str($i)+".loom" for $i, $fh in enumerate($reference.loom_file)]
221 #set files = ",".join($file_array)
222 ${files}
223 --reference-format loom
224 #else if $reference.format == "rds_seurat" and $reference.rds_seurat_file:
225 --reference-object-files
226 #set files = ",".join([ str($fh) for $fh in $reference.rds_seurat_file ])
227 ${files}
228 --reference-format seurat
229 #else if $reference.format == "rds_sce" and $reference.rds_sce_file:
230 --reference-object-files
231 #set files = ",".join([ str($fh) for $fh in $reference.rds_sce_file ])
232 ${files}
233 --reference-format singlecellexperiment
234 #else if $reference.format == "h5seurat" and $reference.h5seurat:
235 --reference-object-files
236 #set file_array = [ "reference."+str($i)+".h5seurat" for $i, $fh in enumerate($reference.h5seurat)]
237 #set files = ",".join($file_array)
238 ${files}
239 --reference-format h5seurat
240 #end if
241 </token>
242
243 <xml name="output_object_params">
244 <param type="select" name="format" label="Choose the format of the output" help="Seurat, Single Cell Experiment, AnnData or Loom">
245 <option value="rds_seurat" selected="true">RDS with a Seurat object</option>
246 <option value="anndata">AnnData written by Seurat</option>
247 <option value="loom">Loom</option>
248 <option value="rds_sce">RDS with a Single Cell Experiment object</option>
249 </param>
250 </xml>
251
252 <xml name="output_files">
253 <data name="loom_file" from_work_dir="seurat_obj.loom" format="h5" label="${tool.name} on ${on_string}: Seurat Loom">
254 <filter>format == 'loom'</filter>
255 </data>
256 <data name="rds_seurat_file" format="rdata" label="${tool.name} on ${on_string}: Seurat RDS">
257 <filter>format == 'rds_seurat'</filter>
258 </data>
259 <data name="anndata_file" format="h5ad" label="${tool.name} on ${on_string}: AnnData from Seurat">
260 <filter>format == 'anndata'</filter>
261 </data>
262 <data name="rds_sce_file" format="rdata" label="${tool.name} on ${on_string}: Seurat Single Cell Experiment RDS">
263 <filter>format == 'rds_sce'</filter>
264 </data>
265 </xml>
266
267 <token name="@OUTPUT_OBJECT@">
268 #if $format == "anndata"
269 --output-object-file '$anndata_file' --output-format anndata
270 #else if $format == "loom"
271 --output-object-file seurat_obj.loom --output-format loom
272 #else if $format == "rds_seurat"
273 --output-object-file '$rds_seurat_file' --output-format seurat
274 #else if $format == "rds_sce"
275 --output-object-file '$rds_sce_file' --output-format singlecellexperiment
276 #end if
277 </token>
278
279 <xml name="plot_output_files_format" token_format="png">
280 <data label="Seurat ${plot_type.plot_type_selector} on ${on_string}: @FORMAT@ plot" name="plot_out_@FORMAT@" format='@FORMAT@' >
281 <filter>plot_format == '@FORMAT@'</filter>
282 </data>
283 </xml>
284
285 <token name="@OUTPUT_PLOT@">
286 #if $plot_format == "png"
287 --plot-out '$plot_out_png'
288 #else if $plot_format == "pdf"
289 --plot-out '$plot_out_pdf'
290 #else if $plot_format == "eps"
291 --plot-out '$plot_out_eps'
292 #else if $plot_format == "ps"
293 --plot-out '$plot_out_ps'
294 #else if $plot_format == "jpg"
295 --plot-out '$plot_out_jpg'
296 #else if $plot_format == "tiff"
297 --plot-out '$plot_out_tiff'
298 #else if $plot_format == "svg"
299 --plot-out '$plot_out_svg'
300 #end if
301 </token>
302
303 <xml name="genes-use-input">
304 <param name="genes_use" argument="--genes-use" optional="true" type="data" format="tsv,txt,tabular" label="Genes to use" help="A file with gene names to use in construction of SNN graph if building directly based on expression data rather than a dimensionally reduced representation (i.e. PCs)."/>
305 </xml>
306 <xml name="dims-use-input">
307 <param name="dims_use" argument="--dims-use" min="1" optional="true" type="integer" label="PCA Dimensions to use" help="Number of PCs (dimensions) to use in construction of the SNN graph."/>
308 </xml>
309
310 <token name="@SEURAT_INTRO@"><![CDATA[
311 Seurat_ is a toolkit for quality control, analysis, and exploration of single cell RNA sequencing data.
312 It is developed and maintained by the `Satija Lab`_ at NYGC. Seurat aims to enable users to identify and
313 interpret sources of heterogeneity from single cell transcriptomic measurements, and to integrate diverse
314 types of single cell data.
315 ]]></token>
316
317 <token name="@VERSION_HISTORY@"><![CDATA[
318 **Version history**
319 4.0.0: Moves to Seurat 4.0.0, introducing a number of methods for merging datasets, plus the whole suite of Seurat plots. Pablo Moreno with funding from AstraZeneca.
320
321 3.2.3+galaxy0: Moves to Seurat 3.2.3 and introduce convert method, improving format interconversion support.
322
323 3.1.2_0.0.8: Update metadata parsing
324
325 3.1.1_0.0.7: Exposes perplexity and enables tab input.
326
327 3.1.1_0.0.6+galaxy0: Moved to Seurat 3.
328
329 Find clusters: removed dims-use, k-param, prune-snn.
330
331 2.3.1+galaxy0: Improved documentation and further exposition of all script's options. Pablo Moreno, Jonathan Manning and Ni Huang, Expression Atlas team https://www.ebi.ac.uk/gxa/home at
332 EMBL-EBI https://www.ebi.ac.uk/. Parts obtained from wrappers from Christophe Antoniewski (GitHub drosofff) and Lea Bellenger (GitHub bellenger-l).
333
334 0.0.1: Initial contribution. Maria Doyle (GitHub mblue9).
335 ]]></token>
336
337
338 <xml name="citations">
339 <citations>
340 <citation type="doi">10.1038/s41592-021-01102-w</citation>
341 <citation type="doi">10.1038/nbt.4096</citation>
342 <citation type="bibtex">
343 @misc{r-seurat-scripts.git,
344 author = {Jonathan Manning, Pablo Moreno, EBI Gene Expression Team},
345 year = {2018},
346 title = {Seurat-scripts: command line interface for Seurat},
347 publisher = {GitHub},
348 journal = {GitHub repository},
349 url = {https://github.com/ebi-gene-expression-group/r-seurat-scripts.git},
350 }
351 </citation>
352 </citations>
353 </xml>
354 </macros>