Mercurial > repos > galaxyp > mass_spectrometry_imaging_segmentations
comparison segmentation_tool.xml @ 5:cee9cf693709 draft
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
author | galaxyp |
---|---|
date | Mon, 11 Jun 2018 17:34:31 -0400 |
parents | aec189b0c64d |
children | 80b6b96a175c |
comparison
equal
deleted
inserted
replaced
4:aec189b0c64d | 5:cee9cf693709 |
---|---|
1 <tool id="mass_spectrometry_imaging_segmentations" name="MSI segmentation" version="1.10.0.0"> | 1 <tool id="mass_spectrometry_imaging_segmentations" name="MSI segmentation" version="1.10.0.1"> |
2 <description>tool for spatial clustering</description> | 2 <description>mass spectrometry imaging spatial clustering</description> |
3 <requirements> | 3 <requirements> |
4 <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement> | 4 <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement> |
5 <requirement type="package" version="2.2.1">r-gridextra</requirement> | 5 <requirement type="package" version="2.2.1">r-gridextra</requirement> |
6 <requirement type="package" version="0.20-35">r-lattice</requirement> | 6 <requirement type="package" version="0.20-35">r-lattice</requirement> |
7 </requirements> | 7 </requirements> |
26 </command> | 26 </command> |
27 <configfiles> | 27 <configfiles> |
28 <configfile name="MSI_segmentation"><![CDATA[ | 28 <configfile name="MSI_segmentation"><![CDATA[ |
29 | 29 |
30 | 30 |
31 ################################# load libraries and read file ######################### | 31 ################################# load libraries and read file ################# |
32 | |
33 | 32 |
34 library(Cardinal) | 33 library(Cardinal) |
35 library(gridExtra) | 34 library(gridExtra) |
36 library(lattice) | 35 library(lattice) |
37 | 36 |
45 load('infile.RData') | 44 load('infile.RData') |
46 #end if | 45 #end if |
47 | 46 |
48 ###################################### file properties in numbers ############## | 47 ###################################### file properties in numbers ############## |
49 | 48 |
50 ## Number of features (mz) | 49 ## Number of features (m/z) |
51 maxfeatures = length(features(msidata)) | 50 maxfeatures = length(features(msidata)) |
52 ## Range mz | 51 ## Range m/z |
53 minmz = round(min(mz(msidata)), digits=2) | 52 minmz = round(min(mz(msidata)), digits=2) |
54 maxmz = round(max(mz(msidata)), digits=2) | 53 maxmz = round(max(mz(msidata)), digits=2) |
55 ## Number of spectra (pixels) | 54 ## Number of spectra (pixels) |
56 pixelcount = length(pixels(msidata)) | 55 pixelcount = length(pixels(msidata)) |
57 ## Range x coordinates | 56 ## Range x coordinates |
64 minint = round(min(spectra(msidata)[]), digits=2) | 63 minint = round(min(spectra(msidata)[]), digits=2) |
65 maxint = round(max(spectra(msidata)[]), digits=2) | 64 maxint = round(max(spectra(msidata)[]), digits=2) |
66 medint = round(median(spectra(msidata)[]), digits=2) | 65 medint = round(median(spectra(msidata)[]), digits=2) |
67 ## Number of intensities > 0 | 66 ## Number of intensities > 0 |
68 npeaks= sum(spectra(msidata)[]>0) | 67 npeaks= sum(spectra(msidata)[]>0) |
69 ## Spectra multiplied with mz (potential number of peaks) | 68 ## Spectra multiplied with m/z (potential number of peaks) |
70 numpeaks = ncol(spectra(msidata)[])*nrow(spectra(msidata)[]) | 69 numpeaks = ncol(spectra(msidata)[])*nrow(spectra(msidata)[]) |
71 ## Percentage of intensities > 0 | 70 ## Percentage of intensities > 0 |
72 percpeaks = round(npeaks/numpeaks*100, digits=2) | 71 percpeaks = round(npeaks/numpeaks*100, digits=2) |
73 ## Number of empty TICs | 72 ## Number of empty TICs |
74 TICs = colSums(spectra(msidata)[]) | 73 TICs = colSums(spectra(msidata)[]) |
75 NumemptyTIC = sum(TICs == 0) | 74 NumemptyTIC = sum(TICs == 0) |
76 | 75 |
77 | |
78 ## Processing informations | 76 ## Processing informations |
79 processinginfo = processingData(msidata) | 77 processinginfo = processingData(msidata) |
80 centroidedinfo = processinginfo@centroided # TRUE or FALSE | 78 centroidedinfo = processinginfo@centroided # TRUE or FALSE |
81 | 79 |
82 ## if TRUE write processinginfo if no write FALSE | 80 ## if TRUE write processinginfo if FALSE write FALSE |
83 | 81 |
84 ## normalization | 82 ## normalization |
85 if (length(processinginfo@normalization) == 0) { | 83 if (length(processinginfo@normalization) == 0) { |
86 normalizationinfo='FALSE' | 84 normalizationinfo='FALSE' |
87 } else { | 85 } else { |
104 peakpickinginfo='FALSE' | 102 peakpickinginfo='FALSE' |
105 } else { | 103 } else { |
106 peakpickinginfo=processinginfo@peakPicking | 104 peakpickinginfo=processinginfo@peakPicking |
107 } | 105 } |
108 | 106 |
109 ############################################################################# | 107 properties = c("Number of m/z features", |
110 | 108 "Range of m/z values [Da]", |
111 properties = c("Number of mz features", | |
112 "Range of mz values [Da]", | |
113 "Number of pixels", | 109 "Number of pixels", |
114 "Range of x coordinates", | 110 "Range of x coordinates", |
115 "Range of y coordinates", | 111 "Range of y coordinates", |
116 "Range of intensities", | 112 "Range of intensities", |
117 "Median of intensities", | 113 "Median of intensities", |
165 ######################## II) segmentation tools ############################# | 161 ######################## II) segmentation tools ############################# |
166 ############################################################################# | 162 ############################################################################# |
167 #set $color_string = ','.join(['"%s"' % $color.feature_color for $color in $colours]) | 163 #set $color_string = ','.join(['"%s"' % $color.feature_color for $color in $colours]) |
168 colourvector = c($color_string) | 164 colourvector = c($color_string) |
169 | 165 |
166 ### preparation for images and plots: | |
167 #if str($image_cond.image_type) == "standard_image": | |
168 print("standard image") | |
169 | |
170 strip_input = TRUE | |
171 lattice_input = FALSE | |
172 | |
173 #elif str($image_cond.image_type) == "lattice_image": | |
174 print("lattice image") | |
175 | |
176 strip_input = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)) | |
177 lattice_input = TRUE | |
178 | |
179 #end if | |
180 | |
170 | 181 |
171 #if str( $segm_cond.segmentationtool ) == 'pca': | 182 #if str( $segm_cond.segmentationtool ) == 'pca': |
172 print('pca') | 183 print('pca') |
173 ##pca | 184 ##pca |
174 | 185 |
176 for (numberofcomponents in 1:$segm_cond.pca_ncomp) | 187 for (numberofcomponents in 1:$segm_cond.pca_ncomp) |
177 {component_vector[numberofcomponents]= paste0("PC", numberofcomponents)} | 188 {component_vector[numberofcomponents]= paste0("PC", numberofcomponents)} |
178 pca = PCA(msidata, ncomp=$segm_cond.pca_ncomp, column = component_vector, superpose = FALSE, | 189 pca = PCA(msidata, ncomp=$segm_cond.pca_ncomp, column = component_vector, superpose = FALSE, |
179 method = "$segm_cond.pca_method", scale = $segm_cond.pca_scale, layout = c(ncomp, 1)) | 190 method = "$segm_cond.pca_method", scale = $segm_cond.pca_scale, layout = c(ncomp, 1)) |
180 | 191 |
181 print(image(pca, main="PCA image", lattice=TRUE, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)), col=colourvector)) | 192 print(image(pca, main="PCA image", lattice=lattice_input, strip = strip_input, col=colourvector)) |
182 print(plot(pca, main="PCA plot", lattice=TRUE, col= colourvector, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)))) | 193 print(plot(pca, main="PCA plot", lattice=lattice_input, col= colourvector, strip = strip_input)) |
183 | 194 |
184 | 195 pcaloadings = (pca@resultData\$ncomp\$loadings) ### loading for each m/z value |
185 pcaloadings = (pca@resultData\$ncomp\$loadings) ### loading for each mz value | |
186 pcascores = (pca@resultData\$ncomp\$scores) ### scores for each pixel | 196 pcascores = (pca@resultData\$ncomp\$scores) ### scores for each pixel |
187 | 197 |
188 write.table(pcaloadings, file="$mzfeatures", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t") | 198 write.table(pcaloadings, file="$mzfeatures", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t") |
189 write.table(pcascores, file="$pixeloutput", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t") | 199 write.table(pcascores, file="$pixeloutput", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t") |
200 | |
201 ## optional output as .RData | |
202 #if $output_rdata: | |
203 | |
204 ## save as (.RData) | |
205 save(pca, file="$segmentation_rdata") | |
206 | |
207 #end if | |
190 | 208 |
191 #elif str( $segm_cond.segmentationtool ) == 'kmeans': | 209 #elif str( $segm_cond.segmentationtool ) == 'kmeans': |
192 print('kmeans') | 210 print('kmeans') |
193 ##k-means | 211 ##k-means |
194 | 212 |
195 skm = spatialKMeans(msidata, r=c($segm_cond.kmeans_r), k=c($segm_cond.kmeans_k), method="$segm_cond.kmeans_method") | 213 skm = spatialKMeans(msidata, r=c($segm_cond.kmeans_r), k=c($segm_cond.kmeans_k), method="$segm_cond.kmeans_method") |
196 print(image(skm, key=TRUE, main="K-means clustering", lattice=TRUE, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)), col= colourvector, layout=c(1,1))) | 214 print(image(skm, key=TRUE, main="K-means clustering", lattice=lattice_input, strip=strip_input, col= colourvector, layout=c(1,1))) |
197 | 215 |
198 print(plot(skm, main="K-means plot", lattice=TRUE, col= colourvector, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)), layout=c($segm_cond.kmeans_layout))) | 216 print(plot(skm, main="K-means plot", lattice=lattice_input, col= colourvector, strip=strip_input, layout=c($segm_cond.kmeans_layout))) |
199 | |
200 | 217 |
201 skm_clusters = data.frame(matrix(NA, nrow = pixelcount, ncol = 0)) | 218 skm_clusters = data.frame(matrix(NA, nrow = pixelcount, ncol = 0)) |
202 for (iteration in 1:length(skm@resultData)){ | 219 for (iteration in 1:length(skm@resultData)){ |
203 skm_cluster = ((skm@resultData)[[iteration]]\$cluster) | 220 skm_cluster = ((skm@resultData)[[iteration]]\$cluster) |
204 skm_clusters = cbind(skm_clusters, skm_cluster) } | 221 skm_clusters = cbind(skm_clusters, skm_cluster) } |
207 skm_toplabels = topLabels(skm, n=$segm_cond.kmeans_toplabels) | 224 skm_toplabels = topLabels(skm, n=$segm_cond.kmeans_toplabels) |
208 | 225 |
209 write.table(skm_toplabels, file="$mzfeatures", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t") | 226 write.table(skm_toplabels, file="$mzfeatures", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t") |
210 write.table(skm_clusters, file="$pixeloutput", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t") | 227 write.table(skm_clusters, file="$pixeloutput", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t") |
211 | 228 |
229 ## optional output as .RData | |
230 #if $output_rdata: | |
231 | |
232 ## save as (.RData) | |
233 save(skm, file="$segmentation_rdata") | |
234 | |
235 #end if | |
212 | 236 |
213 #elif str( $segm_cond.segmentationtool ) == 'centroids': | 237 #elif str( $segm_cond.segmentationtool ) == 'centroids': |
214 print('centroids') | 238 print('centroids') |
215 ##centroids | 239 ##centroids |
216 | 240 |
217 ssc = spatialShrunkenCentroids(msidata, r=c($segm_cond.centroids_r), k=c($segm_cond.centroids_k), s=c($segm_cond.centroids_s), method="$segm_cond.centroids_method") | 241 ssc = spatialShrunkenCentroids(msidata, r=c($segm_cond.centroids_r), k=c($segm_cond.centroids_k), s=c($segm_cond.centroids_s), method="$segm_cond.centroids_method") |
218 print(image(ssc, key=TRUE, main="Spatial shrunken centroids", lattice=TRUE, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)), col= colourvector,layout=c(1,1))) | 242 print(image(ssc, key=TRUE, main="Spatial shrunken centroids", lattice=lattice_input, strip = strip_input, col= colourvector,layout=c(1,1))) |
219 print(plot(ssc, main="Spatial shrunken centroids plot", lattice=TRUE, col= colourvector, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)),layout=c($segm_cond.centroids_layout))) | 243 print(plot(ssc, main="Spatial shrunken centroids plot", lattice=lattice_input, col= colourvector, strip = strip_input,layout=c($segm_cond.centroids_layout))) |
220 | 244 |
221 ssc_classes = data.frame(matrix(NA, nrow = pixelcount, ncol = 0)) | 245 ssc_classes = data.frame(matrix(NA, nrow = pixelcount, ncol = 0)) |
222 for (iteration in 1:length(ssc@resultData)){ | 246 for (iteration in 1:length(ssc@resultData)){ |
223 ssc_class = ((ssc@resultData)[[iteration]]\$classes) | 247 ssc_class = ((ssc@resultData)[[iteration]]\$classes) |
224 ssc_classes = cbind(ssc_classes, ssc_class) } | 248 ssc_classes = cbind(ssc_classes, ssc_class) } |
227 ssc_toplabels = topLabels(ssc, n=$segm_cond.centroids_toplabels) | 251 ssc_toplabels = topLabels(ssc, n=$segm_cond.centroids_toplabels) |
228 | 252 |
229 write.table(ssc_toplabels, file="$mzfeatures", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t") | 253 write.table(ssc_toplabels, file="$mzfeatures", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t") |
230 write.table(ssc_classes, file="$pixeloutput", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t") | 254 write.table(ssc_classes, file="$pixeloutput", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t") |
231 | 255 |
256 ## optional output as .RData | |
257 #if $output_rdata: | |
258 | |
259 ## save as (.RData) | |
260 save(ssc, file="$segmentation_rdata") | |
261 | |
262 #end if | |
232 | 263 |
233 #end if | 264 #end if |
234 | 265 |
235 dev.off() | 266 dev.off() |
236 | 267 |
275 label="The method to use to calculate the spatial smoothing kernels for the embedding. The 'gaussian' method refers to spatially-aware (SA) clustering, and 'adaptive' refers to spatially-aware structurally-adaptive (SASA) clustering"> | 306 label="The method to use to calculate the spatial smoothing kernels for the embedding. The 'gaussian' method refers to spatially-aware (SA) clustering, and 'adaptive' refers to spatially-aware structurally-adaptive (SASA) clustering"> |
276 <option value="gaussian">gaussian</option> | 307 <option value="gaussian">gaussian</option> |
277 <option value="adaptive" selected="True">adaptive</option> | 308 <option value="adaptive" selected="True">adaptive</option> |
278 </param> | 309 </param> |
279 <param name="kmeans_toplabels" type="integer" value="500" | 310 <param name="kmeans_toplabels" type="integer" value="500" |
280 label="Number of toplabels (masses) which should be written in tabular output"/> | 311 label="Number of toplabels (m/z) which should be written in tabular output"/> |
281 <param name="kmeans_layout" type="text" value="1,1" | 312 <param name="kmeans_layout" type="text" value="1,1" |
282 label="Number of rows and columns to plot pictures in pdf output" help="e.g. 1,1 means 1 plot per page; 2,3 means 2 rows with 3 plots each = 6 plots per page"/> | 313 label="Number of rows and columns to plot pictures in pdf output" help="e.g. 1,1 means 1 plot per page; 2,3 means 2 rows with 3 plots each = 6 plots per page"/> |
283 </when> | 314 </when> |
284 | 315 |
285 <when value="centroids"> | 316 <when value="centroids"> |
287 label="The spatial neighborhood radius of nearby pixels to consider (r)" help="Multiple values are allowed (e.g. 1,2,3 or 2:5)"/> | 318 label="The spatial neighborhood radius of nearby pixels to consider (r)" help="Multiple values are allowed (e.g. 1,2,3 or 2:5)"/> |
288 <param name="centroids_k" type="text" value="5" | 319 <param name="centroids_k" type="text" value="5" |
289 label="The initial number of clusters (k)" help="Multiple values are allowed (e.g. 1,2,3 or 2:5)"/> | 320 label="The initial number of clusters (k)" help="Multiple values are allowed (e.g. 1,2,3 or 2:5)"/> |
290 <param name="centroids_s" type="text" value="2" | 321 <param name="centroids_s" type="text" value="2" |
291 label="The sparsity thresholding parameter by which to shrink the t-statistics (s)" | 322 label="The sparsity thresholding parameter by which to shrink the t-statistics (s)" |
292 help="As s increases, fewer mass features (m/z values) will be used in the spatial segmentation, and only the informative mass features will be retained. Multiple values are allowed (e.g. 1,2,3 or 2:5)"/> | 323 help="As s increases, fewer m/z features (m/z values) will be used in the spatial segmentation, and only the informative m/z features will be retained. Multiple values are allowed (e.g. 1,2,3 or 2:5)"/> |
293 <param name="centroids_method" type="select" display="radio" label = "The method to use to calculate the spatial smoothing kernels for the embedding. The 'gaussian' method refers to spatially-aware (SA) weights, and 'adaptive' refers to spatially-aware structurally-adaptive (SASA) weights"> | 324 <param name="centroids_method" type="select" display="radio" label = "The method to use to calculate the spatial smoothing kernels for the embedding. The 'gaussian' method refers to spatially-aware (SA) weights, and 'adaptive' refers to spatially-aware structurally-adaptive (SASA) weights"> |
294 <option value="gaussian" selected="True">gaussian</option> | 325 <option value="gaussian" selected="True">gaussian</option> |
295 <option value="adaptive">adaptive</option> | 326 <option value="adaptive">adaptive</option> |
296 </param> | 327 </param> |
297 <param name="centroids_toplabels" type="integer" value="500" | 328 <param name="centroids_toplabels" type="integer" value="500" |
298 label="Number of toplabels (masses) which should be written in tabular output"/> | 329 label="Number of toplabels (m/z) which should be written in tabular output"/> |
299 <param name="centroids_layout" type="text" value="1,1" | 330 <param name="centroids_layout" type="text" value="1,1" |
300 label="Number of rows and columns to plot pictures in pdf output" help="e.g. 1,1 means 1 plot per page; 2,3 means 2 rows with 3 plots each = 6 plots per page"/> | 331 label="Number of rows and columns to plot pictures in pdf output" help="e.g. 1,1 means 1 plot per page; 2,3 means 2 rows with 3 plots each = 6 plots per page"/> |
301 </when> | 332 </when> |
333 </conditional> | |
334 <conditional name="image_cond"> | |
335 <param name="image_type" type="select" label="Select the image type"> | |
336 <option value="standard_image" selected="True">standard</option> | |
337 <option value="lattice_image">lattice</option> | |
338 </param> | |
339 <when value="standard_image"/> | |
340 <when value="lattice_image"/> | |
302 </conditional> | 341 </conditional> |
303 <repeat name="colours" title="Colours for the plots" min="1" max="50"> | 342 <repeat name="colours" title="Colours for the plots" min="1" max="50"> |
304 <param name="feature_color" type="color" label="Colours" value="#ff00ff" help="Numbers of columns should be the same as number of components"> | 343 <param name="feature_color" type="color" label="Colours" value="#ff00ff" help="Numbers of columns should be the same as number of components"> |
305 <sanitizer> | 344 <sanitizer> |
306 <valid initial="string.letters,string.digits"> | 345 <valid initial="string.letters,string.digits"> |
307 <add value="#" /> | 346 <add value="#" /> |
308 </valid> | 347 </valid> |
309 </sanitizer> | 348 </sanitizer> |
310 </param> | 349 </param> |
311 </repeat> | 350 </repeat> |
351 <param name="output_rdata" type="boolean" display="radio" label="Results as .RData output"/> | |
312 </inputs> | 352 </inputs> |
313 <outputs> | 353 <outputs> |
314 <data format="pdf" name="segmentationimages" from_work_dir="segmentationpdf.pdf" label = "${tool.name} ${on_string}"/> | 354 <data format="pdf" name="segmentationimages" from_work_dir="segmentationpdf.pdf" label = "$infile.display_name segmentation"/> |
315 <data format="tabular" name="mzfeatures" label="Mz features ${on_string}"/> | 355 <data format="tabular" name="mzfeatures" label="$infile.display_name m/z features"/> |
316 <data format="tabular" name="pixeloutput" label="Pixels ${on_string}"/> | 356 <data format="tabular" name="pixeloutput" label="$infile.display_name pixels"/> |
357 <data format="rdata" name="segmentation_rdata" label="$infile.display_name segmentation"> | |
358 <filter>output_rdata</filter> | |
359 </data> | |
317 </outputs> | 360 </outputs> |
318 <tests> | 361 <tests> |
319 <test> | 362 <test> |
320 <param name="infile" value="" ftype="imzml"> | 363 <param name="infile" value="" ftype="imzml"> |
321 <composite_data value="Example_Continuous.imzML"/> | 364 <composite_data value="Example_Continuous.imzML"/> |
322 <composite_data value="Example_Continuous.ibd"/> | 365 <composite_data value="Example_Continuous.ibd"/> |
323 </param> | 366 </param> |
324 <param name="segmentationtool" value="pca"/> | 367 <param name="segmentationtool" value="pca"/> |
368 <param name="image_type" value="lattice_image"/> | |
325 <repeat name="colours"> | 369 <repeat name="colours"> |
326 <param name="feature_color" value="#ff00ff"/> | 370 <param name="feature_color" value="#ff00ff"/> |
327 </repeat> | 371 </repeat> |
328 <repeat name="colours"> | 372 <repeat name="colours"> |
329 <param name="feature_color" value="#0000FF"/> | 373 <param name="feature_color" value="#0000FF"/> |
349 <param name="feature_color" value="#0000FF"/> | 393 <param name="feature_color" value="#0000FF"/> |
350 </repeat> | 394 </repeat> |
351 <repeat name="colours"> | 395 <repeat name="colours"> |
352 <param name="feature_color" value="#00C957"/> | 396 <param name="feature_color" value="#00C957"/> |
353 </repeat> | 397 </repeat> |
398 <param name="output_rdata" value="True"/> | |
354 <output name="segmentationimages" file="kmeans_analyze.pdf" compare="sim_size" delta="20000"/> | 399 <output name="segmentationimages" file="kmeans_analyze.pdf" compare="sim_size" delta="20000"/> |
355 <output name="mzfeatures" file="toplabels_skm.tabular" compare="sim_size"/> | 400 <output name="mzfeatures" file="toplabels_skm.tabular" compare="sim_size"/> |
356 <output name="pixeloutput" file="cluster_skm.tabular" compare="sim_size"/> | 401 <output name="pixeloutput" file="cluster_skm.tabular" compare="sim_size"/> |
402 <output name="pixeloutput" file="cluster_skm.tabular" compare="sim_size"/> | |
403 <output name="segmentation_rdata" file="cluster_skm.RData" compare="sim_size"/> | |
357 </test> | 404 </test> |
358 <test> | 405 <test> |
359 <param name="infile" value="preprocessed.RData" ftype="rdata"/> | 406 <param name="infile" value="preprocessed.RData" ftype="rdata"/> |
360 <param name="segmentationtool" value="centroids"/> | 407 <param name="segmentationtool" value="centroids"/> |
361 <param name="centroids_r" value="1,2"/> | 408 <param name="centroids_r" value="1,2"/> |
384 <help> | 431 <help> |
385 <![CDATA[ | 432 <![CDATA[ |
386 | 433 |
387 Cardinal is an R package that implements statistical & computational tools for analyzing mass spectrometry imaging datasets. `More information on Cardinal <http://cardinalmsi.org//>`_ | 434 Cardinal is an R package that implements statistical & computational tools for analyzing mass spectrometry imaging datasets. `More information on Cardinal <http://cardinalmsi.org//>`_ |
388 | 435 |
389 This tool provides three different Cardinal functions for unsupervised clustering/spatial segmentation of mass-spectrometry imaging data. | 436 This tool provides three different Cardinal functions for unsupervised clustering/spatial segmentation of mass spectrometry imaging data. |
390 | 437 |
391 Input data: 3 types of input data can be used: | 438 Input data: 3 types of input data can be used: |
392 | 439 |
393 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <https://ms-imaging.org/wp/imzml/>`_ | 440 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <https://ms-imaging.org/wp/imzml/>`_ |
394 - Analyze7.5 (upload hdr, img and t2m file via the "composite" function) | 441 - Analyze7.5 (upload hdr, img and t2m file via the "composite" function) |
401 - spatial shrunken centroids: Allows the number of segments to decrease according to the data. This allows automatic selection of the number of clusters | 448 - spatial shrunken centroids: Allows the number of segments to decrease according to the data. This allows automatic selection of the number of clusters |
402 | 449 |
403 Output: | 450 Output: |
404 | 451 |
405 - Pdf with the heatmaps and plots for the segmentation | 452 - Pdf with the heatmaps and plots for the segmentation |
406 - Tabular file with information on masses and pixels: loadings/scores (PCA), toplabels/clusters (k-means), toplabels/classes (spatial shrunken centroids) | 453 - Tabular file with information on m/z and pixels: loadings/scores (PCA), toplabels/clusters (k-means), toplabels/classes (spatial shrunken centroids) |
454 - Optional .RData file which contains the segmentation results and can be used for further exploration in R | |
407 | 455 |
408 ]]> | 456 ]]> |
409 </help> | 457 </help> |
410 <citations> | 458 <citations> |
411 <citation type="doi">10.1093/bioinformatics/btv146</citation> | 459 <citation type="doi">10.1093/bioinformatics/btv146</citation> |