Mercurial > repos > galaxyp > msi_spectra_plot
comparison msi_spectra_plots.xml @ 2:ea4f1c516368 draft
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_spectra_plots commit 1c808d60243bb1eeda0cd26cb4b0a17ab05de2c0
author | galaxyp |
---|---|
date | Mon, 28 May 2018 12:39:59 -0400 |
parents | 7caaf84a8a51 |
children | fe28ca73548a |
comparison
equal
deleted
inserted
replaced
1:7caaf84a8a51 | 2:ea4f1c516368 |
---|---|
1 <tool id="mass_spectrometry_imaging_mzplots" name="MSI plot spectra" version="1.7.0.1"> | 1 <tool id="mass_spectrometry_imaging_mzplots" name="MSI plot spectra" version="1.10.0.0"> |
2 <description> | 2 <description> |
3 mass spectrometry imaging mass spectra plots | 3 mass spectrometry imaging mass spectra plots |
4 </description> | 4 </description> |
5 <requirements> | 5 <requirements> |
6 <requirement type="package" version="1.7.0">bioconductor-cardinal</requirement> | 6 <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement> |
7 <requirement type="package" version="2.2.1">r-gridextra</requirement> | 7 <requirement type="package" version="2.2.1">r-gridextra</requirement> |
8 <requirement type="package" version="2.23-15">r-kernsmooth</requirement> | |
9 </requirements> | 8 </requirements> |
10 <command detect_errors="exit_code"> | 9 <command detect_errors="exit_code"> |
11 <![CDATA[ | 10 <![CDATA[ |
12 #if $infile.ext == 'imzml' | 11 #if $infile.ext == 'imzml' |
13 cp '${infile.extra_files_path}/imzml' infile.imzML && | 12 ln -s '${infile.extra_files_path}/imzml' infile.imzML && |
14 cp '${infile.extra_files_path}/ibd' infile.ibd && | 13 ln -s '${infile.extra_files_path}/ibd' infile.ibd && |
15 #elif $infile.ext == 'analyze75' | 14 #elif $infile.ext == 'analyze75' |
16 cp '${infile.extra_files_path}/hdr' infile.hdr && | 15 ln -s '${infile.extra_files_path}/hdr' infile.hdr && |
17 cp '${infile.extra_files_path}/img' infile.img && | 16 ln -s '${infile.extra_files_path}/img' infile.img && |
18 cp '${infile.extra_files_path}/t2m' infile.t2m && | 17 ln -s '${infile.extra_files_path}/t2m' infile.t2m && |
19 #else | 18 #else |
20 ln -s $infile infile.RData && | 19 ln -s $infile infile.RData && |
21 #end if | 20 #end if |
22 cat '${MSI_mzplots}' && | 21 cat '${MSI_mzplots}' && |
23 Rscript '${MSI_mzplots}' | 22 Rscript '${MSI_mzplots}' |
24 ]]> | 23 ]]> |
25 </command> | 24 </command> |
26 <configfiles> | 25 <configfiles> |
27 <configfile name="MSI_mzplots"><![CDATA[ | 26 <configfile name="MSI_mzplots"><![CDATA[ |
28 ################################# load libraries and read file ######################### | 27 ################################# load libraries and read file ################# |
29 | 28 |
30 library(Cardinal) | 29 library(Cardinal) |
31 library(gridExtra) | 30 library(gridExtra) |
32 library(KernSmooth) | |
33 | 31 |
34 ## Read MALDI Imaging dataset | 32 ## Read MALDI Imaging dataset |
35 | 33 |
36 #if $infile.ext == 'imzml' | 34 #if $infile.ext == 'imzml' |
37 msidata <- readMSIData('infile.imzML') | 35 msidata = readImzML('infile') |
38 #elif $infile.ext == 'analyze75' | 36 #elif $infile.ext == 'analyze75' |
39 msidata <- readMSIData('infile.hdr') | 37 msidata = readAnalyze('infile') |
40 #else | 38 #else |
41 load('infile.RData') | 39 load('infile.RData') |
42 #end if | 40 #end if |
43 | 41 |
44 ###################################### file properties in numbers ###################### | 42 ###################################### file properties in numbers ############## |
45 | 43 |
46 ## Number of features (mz) | 44 ## Number of features (mz) |
47 maxfeatures = length(features(msidata)) | 45 maxfeatures = length(features(msidata)) |
48 ## Range mz | 46 ## Range mz |
49 minmz = round(min(mz(msidata)), digits=2) | 47 minmz = round(min(mz(msidata)), digits=2) |
133 paste0(peakpickinginfo), | 131 paste0(peakpickinginfo), |
134 paste0(centroidedinfo)) | 132 paste0(centroidedinfo)) |
135 | 133 |
136 property_df = data.frame(properties, values) | 134 property_df = data.frame(properties, values) |
137 | 135 |
138 | 136 print("before pdf") |
139 ######################################## PDF ############################################# | 137 |
140 ########################################################################################## | 138 ######################################## PDF ################################### |
141 ########################################################################################## | 139 ################################################################################ |
140 ################################################################################ | |
142 | 141 |
143 | 142 |
144 pdf("mzplots.pdf", fonts = "Times", pointsize = 12) | 143 pdf("mzplots.pdf", fonts = "Times", pointsize = 12) |
145 plot(0,type='n',axes=FALSE,ann=FALSE) | 144 plot(0,type='n',axes=FALSE,ann=FALSE) |
146 | 145 |
147 title(main=paste0("Plotted mass spectra for file: \n\n", "$infile.display_name")) | 146 title(main=paste0("Plotted mass spectra for file: \n\n", "$infile.display_name")) |
148 | 147 |
149 | 148 |
150 ############################# I) numbers #################################### | 149 ############################# I) numbers ###################################### |
151 ############################################################################# | 150 ############################################################################### |
151 | |
152 print("in pdf") | |
152 grid.table(property_df, rows= NULL) | 153 grid.table(property_df, rows= NULL) |
153 | 154 |
154 counting = 2 | 155 |
155 | |
156 outputmatrix = matrix(mz(msidata), ncol=1, byrow=TRUE) | |
157 colnames(outputmatrix) = "m/z" | |
158 | 156 |
159 if (npeaks > 0) | 157 if (npeaks > 0) |
160 { | 158 { |
161 pixeldf = data.frame(matrix(ncol = 2, nrow=0)) | 159 pixeldf = data.frame(matrix(ncol = 2, nrow=0)) |
162 | 160 |
163 #for $chosenpixel in $repeatpixel: | 161 |
164 | 162 #if str( $pixel_conditional.pixel_type) == 'single_pixel': |
165 | 163 print("single_pixel") |
166 ### is x and y which was put in to define pixel valid coordinates? | 164 |
167 pixelisvalid = as.character($chosenpixel.inputx %in% coord(msidata)\$x & $chosenpixel.inputy %in% coord(msidata)\$y) | 165 #for $chosenpixel in $pixel_conditional.repeatpixel: |
168 pixelname = paste0("x=", $chosenpixel.inputx,", ", "y=", $chosenpixel.inputy) | 166 |
169 pixeldf = rbind(pixeldf, cbind(pixelname, pixelisvalid)) | 167 |
170 | 168 pixelisvalid = as.character($chosenpixel.inputx %in% coord(msidata)\$x & $chosenpixel.inputy %in% coord(msidata)\$y) |
171 | 169 pixelname = paste0("x=", $chosenpixel.inputx,", ", "y=", $chosenpixel.inputy) |
172 ############################# II) control image ############################# | 170 print(pixelname) |
173 ############################################################################# | 171 print(colnames(pixeldf)) |
174 | 172 print(colnames(cbind(pixelname, pixelisvalid))) |
175 | 173 pixeldf = rbind(pixeldf, cbind(pixelname, pixelisvalid)) |
176 if (pixelisvalid == "TRUE") | 174 print(colnames(pixeldf)) |
177 { | 175 |
178 | 176 ############################# II) control image #################### |
179 | 177 #################################################################### |
180 image(msidata, mz=$chosenpixel.inputmz, | 178 |
181 ylim = c(maximumy+(0.2*maximumy),minimumy-1),colorkey=FALSE, plusminus = $chosenpixel.plusminusinDalton, contrast.enhance = "histogram", | 179 |
182 main= paste0("x= ",$chosenpixel.inputx, ", y= ", $chosenpixel.inputy)) | 180 if (pixelisvalid == "TRUE") |
183 | 181 { |
184 abline(v=$chosenpixel.inputx, col ="$chosenpixel.inputcolour", lty="$chosenpixel.inputtype", lwd=$chosenpixel.inputwidth) | 182 |
185 abline(h=$chosenpixel.inputy, col ="$chosenpixel.inputcolour", lty="$chosenpixel.inputtype", lwd=$chosenpixel.inputwidth) | 183 print(pixelisvalid) |
186 | 184 |
187 | 185 |
188 ##################### III) plot full mass spectrum ########################## | 186 image(msidata, mz=$chosenpixel.inputmz, |
189 ############################################################################# | 187 ylim = c(maximumy+(0.2*maximumy),minimumy-1),colorkey=FALSE, plusminus = $chosenpixel.plusminusinDalton, contrast.enhance = "histogram", |
190 | 188 main= paste0("x= ",$chosenpixel.inputx, ", y= ", $chosenpixel.inputy)) |
191 plot(msidata, coord=list(x=$chosenpixel.inputx, y=$chosenpixel.inputy)) | 189 |
192 | 190 abline(v=$chosenpixel.inputx, col ="$chosenpixel.inputcolour", lty="$chosenpixel.inputtype", lwd=$chosenpixel.inputwidth) |
193 | 191 abline(h=$chosenpixel.inputy, col ="$chosenpixel.inputcolour", lty="$chosenpixel.inputtype", lwd=$chosenpixel.inputwidth) |
194 | 192 |
195 ##################### IV) plot zoom-in mass spectrum ########################## | 193 |
196 ############################################################################# | 194 ##################### III) plot full mass spectrum ################# |
197 | 195 #################################################################### |
198 #if $chosenpixel.zoomedplot: | 196 |
199 #for $token in $chosenpixel.zoomedplot: | 197 plot(msidata, coord=list(x=$chosenpixel.inputx, y=$chosenpixel.inputy)) |
198 | |
199 ##################### IV) plot zoom-in mass spectrum ############### | |
200 #################################################################### | |
201 | |
202 #if $chosenpixel.zoomedplot: | |
203 #for $token in $chosenpixel.zoomedplot: | |
204 | |
205 minmasspixel = features(msidata, mz=$token.xlimmin) | |
206 maxmasspixel = features(msidata, mz=$token.xlimmax) | |
207 | |
208 plot(msidata[minmasspixel:maxmasspixel,], coord=list(x=$chosenpixel.inputx, y=$chosenpixel.inputy), | |
209 xlim= c($token.xlimmin,$token.xlimmax)) | |
210 | |
211 #end for | |
212 #end if | |
213 | |
214 }else{ | |
215 print("The pixel coordinates did not correspond to a real pixel")} | |
216 | |
217 #end for | |
218 | |
219 colnames(pixeldf) = c("pixel coordinates", "coordinates were found in this file") | |
220 | |
221 #elif str( $pixel_conditional.pixel_type) == 'sample_pixel': | |
222 print("sample_pixel") | |
223 | |
224 ##################### I) Sample: plot full mass spectrum ########### | |
225 plot(msidata, pixel=1:ncol(msidata), pixel.groups=pData(msidata)\$sample, key=TRUE, col=c("blue", "orange", "green", "red", "yellow", "grey"), superpose=TRUE) | |
226 | |
227 ##################### II) Sample: plot zoom-in mass spectrum ####### | |
228 | |
229 #if $pixel_conditional.zoomed_sample: | |
230 #for $token in $pixel_conditional.zoomed_sample: | |
200 | 231 |
201 minmasspixel = features(msidata, mz=$token.xlimmin) | 232 minmasspixel = features(msidata, mz=$token.xlimmin) |
202 maxmasspixel = features(msidata, mz=$token.xlimmax) | 233 maxmasspixel = features(msidata, mz=$token.xlimmax) |
203 | 234 plot(msidata[minmasspixel:maxmasspixel,], pixel=1:ncol(msidata), xlim= c($token.xlimmin,$token.xlimmax),pixel.groups=pData(msidata)\$sample, key=TRUE,col=c("blue", "orange", "green", "red", "yellow", "grey"), superpose=TRUE) |
204 plot(msidata[minmasspixel:maxmasspixel,], coord=list(x=$chosenpixel.inputx, y=$chosenpixel.inputy), | |
205 xlim= c($token.xlimmin,$token.xlimmax)) | |
206 | 235 |
207 #end for | 236 #end for |
208 #end if | 237 #end if |
209 | 238 |
210 ##################### V) Output with mz and intensities ##################### | 239 pixeldf = data.frame(table(pData(msidata)\$sample)) |
211 ############################################################################# | 240 colnames(pixeldf) = c("sample name", "number of pixels") |
212 | 241 |
213 | 242 #end if |
214 ### for each repeat a new intensity column for the new pixel is added | 243 |
215 outputmatrix = cbind(outputmatrix, spectra(msidata)[,pixels(msidata, coord=list(x=$chosenpixel.inputx, y=$chosenpixel.inputy))]) | |
216 colnames(outputmatrix)[counting] = paste0("x= ",$chosenpixel.inputx, ", y= ", $chosenpixel.inputy, " intensity") | |
217 counting = counting+1 | |
218 | |
219 }else{ | |
220 print("These pixel coordinates did not correspond to a real pixel")} | |
221 | |
222 #end for | |
223 | |
224 colnames(pixeldf) = c("pixel coordinates", "coordinates were found in this file") | |
225 plot(0,type='n',axes=FALSE,ann=FALSE) | 244 plot(0,type='n',axes=FALSE,ann=FALSE) |
226 title(main=paste0("Overview of chosen pixel for file:\n", "$infile.display_name")) | 245 title(main="Overview of chosen pixel:") |
227 grid.table(pixeldf, rows= NULL) | 246 grid.table(pixeldf, rows= NULL) |
228 | 247 |
229 dev.off() | 248 dev.off() |
230 | 249 |
231 write.table(outputmatrix, file="$tabularmatrix", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t") | 250 |
232 }else{ | 251 }else{ |
233 print("Inputfile has no intensities > 0") | 252 print("Inputfile has no intensities > 0") |
234 dev.off() | 253 dev.off() |
235 } | 254 } |
236 ]]></configfile> | 255 ]]></configfile> |
237 </configfiles> | 256 </configfiles> |
238 <inputs> | 257 <inputs> |
239 <param name="infile" type="data" format="imzml,rdata,analyze75" label="Inputfile as imzML, Analyze7.5 or Cardinal MSImageSet saved as RData" | 258 <param name="infile" type="data" format="imzml,rdata,analyze75" label="Inputfile as imzML, Analyze7.5 or Cardinal MSImageSet saved as RData" |
240 help="Upload composite datatype imzml (ibd+imzML) or analyze75 (hdr+img+t2m) or regular upload .RData (Cardinal MSImageSet)"/> | 259 help="Upload composite datatype imzml (ibd+imzML) or analyze75 (hdr+img+t2m) or regular upload .RData (Cardinal MSImageSet)"/> |
241 <repeat name="repeatpixel" title="Plot mass spectra for pixel of interest" min="1" max="20"> | 260 <conditional name="pixel_conditional"> |
242 <param name="inputx" type="integer" value="" label="x-coordinate of pixel of interest" help="x-value of the pixel of interest"/> | 261 <param name="pixel_type" type="select" label="Select if you want to plot the mass spectrum of a single pixel or of all pixels of a sample"> |
243 <param name="inputy" type="integer" value="" label="y-coordinate of pixel of interest" help="y-value of the pixel of interest"/> | 262 <option value="single_pixel" selected="True">Single pixel</option> |
244 <param name="inputmz" type="float" value="1296.7" label="Next parameters are to control heatmap image which will be plotted, here mz in Dalton" help="mz will be displayed as heatmap and the pixel of interest will be visualized by the intersection of two lines"/> | 263 <option value="sample_pixel">All pixels of a sample</option> |
245 <param name="plusminusinDalton" value="0.25" type="float" label="mass range for this mz value" help="plusminus mass window in Dalton"/> | |
246 <param name="inputcolour" type="select" label="select the colour for the lines at x and y position"> | |
247 <option value="white" selected="True">white</option> | |
248 <option value="black">black</option> | |
249 <option value="grey">grey</option> | |
250 <option value="blue">blue</option> | |
251 <option value="red">red</option> | |
252 <option value="green">green</option> | |
253 </param> | 264 </param> |
254 <param name="inputtype" type="select" label="select the line type for the lines at x and y position"> | 265 <when value="single_pixel"> |
255 <option value="solid" selected="True">solid</option> | 266 <repeat name="repeatpixel" title="Plot mass spectra for pixel of interest" min="1" max="20"> |
256 <option value="dashed">dashed</option> | 267 <param name="inputx" type="integer" value="" label="x-coordinate of pixel of interest" help="x-value of the pixel of interest"/> |
257 <option value="dotted">dotted</option> | 268 <param name="inputy" type="integer" value="" label="y-coordinate of pixel of interest" help="y-value of the pixel of interest"/> |
258 <option value="longdash">longdash</option> | 269 <param name="inputmz" type="float" value="1296.7" label="Next parameters are to control heatmap image which will be plotted, here mz in Dalton" help="mz will be displayed as heatmap and the pixel of interest will be visualized by the intersection of two lines"/> |
259 </param> | 270 <param name="plusminusinDalton" value="0.25" type="float" label="mass range for this mz value" help="plusminus mass window in Dalton"/> |
260 <param name="inputwidth" type="integer" value="2" label="select the width of the lines at x and y position"/> | 271 <param name="inputcolour" type="select" label="select the colour for the lines at x and y position"> |
261 <repeat name="zoomedplot" title="Zoomed in plots with mz min and mz max to define the plot window" min="0" max="50"> | 272 <option value="white" selected="True">white</option> |
262 <param name="xlimmin" type="integer" value="" label="lower boundary in Dalton for plotting window" help="minimum mz for zoomed in window"/> | 273 <option value="black">black</option> |
263 <param name="xlimmax" type="integer" value="" label="upper boundary in Dalton for plotting window" help="maximum mz for zoomed in window"/> | 274 <option value="grey">grey</option> |
264 </repeat> | 275 <option value="blue">blue</option> |
265 </repeat> | 276 <option value="red">red</option> |
277 <option value="green">green</option> | |
278 </param> | |
279 <param name="inputtype" type="select" label="select the line type for the lines at x and y position"> | |
280 <option value="solid" selected="True">solid</option> | |
281 <option value="dashed">dashed</option> | |
282 <option value="dotted">dotted</option> | |
283 <option value="longdash">longdash</option> | |
284 </param> | |
285 <param name="inputwidth" type="integer" value="2" label="select the width of the lines at x and y position"/> | |
286 <repeat name="zoomedplot" title="Zoomed in plots with mz min and mz max to define the plot window" min="0" max="50"> | |
287 <param name="xlimmin" type="integer" value="" label="lower boundary in Dalton for plotting window" help="minimum mz for zoomed in window"/> | |
288 <param name="xlimmax" type="integer" value="" label="upper boundary in Dalton for plotting window" help="maximum mz for zoomed in window"/> | |
289 </repeat> | |
290 </repeat> | |
291 </when> | |
292 <when value="sample_pixel"> | |
293 <repeat name="zoomed_sample" title="Zoomed in plots with mz min and mz max to define the plot window" min="0" max="50"> | |
294 <param name="xlimmin" type="integer" value="" label="lower boundary in Dalton for plotting window" help="minimum mz for zoomed in window"/> | |
295 <param name="xlimmax" type="integer" value="" label="upper boundary in Dalton for plotting window" help="maximum mz for zoomed in window"/> | |
296 </repeat> | |
297 </when> | |
298 </conditional> | |
266 </inputs> | 299 </inputs> |
267 <outputs> | 300 <outputs> |
268 <data format="pdf" name="plots" from_work_dir="mzplots.pdf" label = "${tool.name} ${on_string}"/> | 301 <data format="pdf" name="plots" from_work_dir="mzplots.pdf" label = "${tool.name} ${on_string}"/> |
269 <data format="tabular" name="tabularmatrix" label="Mass spectrum ${on_string}" /> | |
270 </outputs> | 302 </outputs> |
271 <tests> | 303 <tests> |
272 <test> | 304 <test> |
273 <param name="infile" value="" ftype="imzml"> | 305 <param name="infile" value="" ftype="imzml"> |
274 <composite_data value="Example_Continuous.imzML"/> | 306 <composite_data value="Example_Continuous.imzML"/> |
275 <composite_data value="Example_Continuous.ibd"/> | 307 <composite_data value="Example_Continuous.ibd"/> |
276 </param> | 308 </param> |
277 <repeat name="repeatpixel"> | 309 <conditional name="pixel_conditional"> |
278 <param name="plusminusinDalton" value="0.25"/> | 310 <param name="pixel_type" value="single_pixel"/> |
279 <param name="inputx" value="3"/> | 311 <repeat name="repeatpixel"> |
280 <param name="inputy" value="3"/> | 312 <param name="plusminusinDalton" value="0.25"/> |
281 <repeat name="zoomedplot"> | 313 <param name="inputx" value="3"/> |
282 <param name="xlimmin" value="550"/> | 314 <param name="inputy" value="3"/> |
283 <param name="xlimmax" value="555"/> | 315 <repeat name="zoomedplot"> |
284 </repeat> | 316 <param name="xlimmin" value="550"/> |
285 <repeat name="zoomedplot"> | 317 <param name="xlimmax" value="555"/> |
286 <param name="xlimmin" value="750"/> | 318 </repeat> |
287 <param name="xlimmax" value="800"/> | 319 <repeat name="zoomedplot"> |
288 </repeat> | 320 <param name="xlimmin" value="750"/> |
289 <repeat name="zoomedplot"> | 321 <param name="xlimmax" value="800"/> |
290 <param name="xlimmin" value="400"/> | 322 </repeat> |
291 <param name="xlimmax" value="420"/> | 323 <repeat name="zoomedplot"> |
292 </repeat> | 324 <param name="xlimmin" value="400"/> |
293 </repeat> | 325 <param name="xlimmax" value="420"/> |
294 <repeat name="repeatpixel"> | 326 </repeat> |
295 <param name="plusminusinDalton" value="0.25"/> | 327 </repeat> |
296 <param name="inputx" value="2"/> | 328 <repeat name="repeatpixel"> |
297 <param name="inputy" value="2"/> | 329 <param name="plusminusinDalton" value="0.25"/> |
298 </repeat> | 330 <param name="inputx" value="2"/> |
299 <repeat name="repeatpixel"> | 331 <param name="inputy" value="2"/> |
300 <param name="plusminusinDalton" value="0.25"/> | 332 </repeat> |
301 <param name="inputx" value="1"/> | 333 <repeat name="repeatpixel"> |
302 <param name="inputy" value="1"/> | 334 <param name="plusminusinDalton" value="0.25"/> |
303 </repeat> | 335 <param name="inputx" value="1"/> |
336 <param name="inputy" value="1"/> | |
337 </repeat> | |
338 </conditional> | |
304 <output name="plots" file="Plot_imzml.pdf" compare="sim_size" delta="20000"/> | 339 <output name="plots" file="Plot_imzml.pdf" compare="sim_size" delta="20000"/> |
305 <output name="tabularmatrix" file="Matrix_imzml.txt"/> | |
306 </test> | 340 </test> |
307 | |
308 <test> | 341 <test> |
309 <param name="infile" value="" ftype="analyze75"> | 342 <param name="infile" value="" ftype="analyze75"> |
310 <composite_data value="Analyze75.hdr"/> | 343 <composite_data value="Analyze75.hdr"/> |
311 <composite_data value="Analyze75.img"/> | 344 <composite_data value="Analyze75.img"/> |
312 <composite_data value="Analyze75.t2m"/> | 345 <composite_data value="Analyze75.t2m"/> |
313 </param> | 346 </param> |
314 <repeat name="repeatpixel"> | 347 <conditional name="pixel_conditional"> |
315 <param name="plusminusinDalton" value="0.25"/> | 348 <param name="pixel_type" value="single_pixel"/> |
316 <param name="inputx" value="5"/> | 349 <repeat name="repeatpixel"> |
317 <param name="inputy" value="2"/> | 350 <param name="plusminusinDalton" value="0.25"/> |
318 <repeat name="zoomedplot"> | 351 <param name="inputx" value="5"/> |
319 <param name="xlimmin" value="840"/> | 352 <param name="inputy" value="2"/> |
320 <param name="xlimmax" value="850"/> | 353 <repeat name="zoomedplot"> |
321 </repeat> | 354 <param name="xlimmin" value="840"/> |
322 </repeat> | 355 <param name="xlimmax" value="850"/> |
323 <repeat name="repeatpixel"> | 356 </repeat> |
324 <param name="plusminusinDalton" value="0.25"/> | 357 </repeat> |
325 <param name="inputx" value="2"/> | 358 <repeat name="repeatpixel"> |
326 <param name="inputy" value="2"/> | 359 <param name="plusminusinDalton" value="0.25"/> |
327 </repeat> | 360 <param name="inputx" value="2"/> |
361 <param name="inputy" value="2"/> | |
362 </repeat> | |
363 </conditional> | |
328 <output name="plots" file="Plot_analyze75.pdf" compare="sim_size" delta="20000"/> | 364 <output name="plots" file="Plot_analyze75.pdf" compare="sim_size" delta="20000"/> |
329 <output name="tabularmatrix" file="Matrix_analyze75.txt"/> | |
330 </test> | |
331 | |
332 <test> | |
333 <param name="infile" value="preprocessing_results1.RData" ftype="rdata"/> | |
334 <repeat name="repeatpixel"> | |
335 <param name="plusminusinDalton" value="0.25"/> | |
336 <param name="inputx" value="2"/> | |
337 <param name="inputy" value="2"/> | |
338 <repeat name="zoomedplot"> | |
339 <param name="xlimmin" value="222"/> | |
340 <param name="xlimmax" value="244"/> | |
341 </repeat> | |
342 </repeat> | |
343 <output name="plots" file="Plot_rdata.pdf" compare="sim_size" delta="20000"/> | |
344 <output name="tabularmatrix" file="Matrix_rdata.txt"/> | |
345 </test> | 365 </test> |
346 <test> | 366 <test> |
347 <param name="infile" value="LM8_file16.rdata" ftype="rdata"/> | 367 <param name="infile" value="123_combined.rdata" ftype="rdata"/> |
368 <conditional name="pixel_conditional"> | |
369 <param name="pixel_type" value="sample_pixel"/> | |
370 <repeat name="zoomed_sample"> | |
371 <param name="xlimmin" value="350"/> | |
372 <param name="xlimmax" value="360"/> | |
373 </repeat> | |
374 </conditional> | |
375 <output name="plots" file="Plot_rdata.pdf" compare="sim_size" delta="20000"/> | |
376 </test> | |
377 <test> | |
378 <param name="infile" value="empty_spectra.rdata" ftype="rdata"/> | |
348 <param name="plusminusinDalton" value="0.1"/> | 379 <param name="plusminusinDalton" value="0.1"/> |
349 <param name="inputx" value="1"/> | 380 <param name="inputx" value="1"/> |
350 <param name="inputy" value="1"/> | 381 <param name="inputy" value="1"/> |
351 <repeat name="repeatpixel"> | 382 <repeat name="repeatpixel"> |
352 <param name="plusminusinDalton" value="0.25"/> | 383 <param name="plusminusinDalton" value="0.25"/> |
355 <repeat name="zoomedplot"> | 386 <repeat name="zoomedplot"> |
356 <param name="xlimmin" value="1000"/> | 387 <param name="xlimmin" value="1000"/> |
357 <param name="xlimmax" value="1050"/> | 388 <param name="xlimmax" value="1050"/> |
358 </repeat> | 389 </repeat> |
359 </repeat> | 390 </repeat> |
360 <output name="plots" file="Plot_LM8_file16.pdf" compare="sim_size" delta="20000"/> | 391 <output name="plots" file="Plot_empty_spectra.pdf" compare="sim_size" delta="20000"/> |
361 <output name="tabularmatrix" file="Matrix_LM8.txt"/> | |
362 </test> | 392 </test> |
363 </tests> | 393 </tests> |
364 <help><![CDATA[ | 394 <help><![CDATA[ |
365 | 395 |
366 Returns a full mass-spectrum plot and peaklist output with masses and intensities for the chosen pixel. Input needs the x and the y coordinates of the pixel of interest. | 396 Cardinal is an R package that implements statistical & computational tools for analyzing mass spectrometry imaging datasets. `More information on Cardinal <http://cardinalmsi.org//>`_ |
367 Additionally zoom into mass-spectra plots is possible by providing the minimum and maximum mz value to define the limits of the plot. | 397 |
368 To have a visual control that the right pixel was chosen, a heatmap of a mass in Dalton which can be specified will be plotted and two intersecting lines will show where the chosen pixel is located in the ion image. | 398 This tool uses the Cardinal plot function to generate (zoomed in) mass spectra plots of mass-spectrometry imaging data. |
369 | 399 |
370 Input data: 3 types of input data can be used: | 400 Input data: 3 types of input data can be used: |
371 | 401 |
372 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <http://ms-imaging.org/wp/introduction/>`_ | 402 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <https://ms-imaging.org/wp/imzml/>`_ |
373 - Analyze7.5 (upload hdr, img and t2m file via the "composite" function) | 403 - Analyze7.5 (upload hdr, img and t2m file via the "composite" function) |
374 - Cardinal "MSImageSet" data (with variable name "msidata", saved as .RData) | 404 - Cardinal "MSImageSet" data (with variable name "msidata", saved as .RData) |
375 | 405 |
376 The output of this tool contains a heatmap of the mass of interest with two lines intersecting at the pixel of interest. Then the full mass-spectrum plot is obtained and if chosen also several zoomed in mass spectra. A peaklist with masses and intensities for this pixel is exported as tabular file. | 406 Options: |
407 | |
408 - "single pixel": Returns a full mass-spectrum plot for one pixel, which is defined by its x- and y-coordinates | |
409 | |
410 - Enter the x and y coordinates of your pixel of interest | |
411 - To have a visual control for the selected pixel, a heatmap of a mass of interest will be drawn. Two intersecting lines will show the pixel location. This procedure requires an mass of interest together with a mass range and for the lines the colour and type. | |
412 - Additionally zoom into mass-spectra plots is possible by providing the minimum and maximum mass value to define the limits of the plot | |
413 - "All pixels of a sample": Returns a full average mass-spectrum plot with different colours for each subfile | |
414 | |
415 - This option only works on files that have previosly been combined in the combine tool | |
416 - Additionally zoom into mass-spectra plots is possible by providing the minimum and maximum mass value to define the limits of the plot | |
417 | |
418 Output: | |
419 | |
420 - Pdf with the selected mass-spectra plots and additional control plots | |
421 | |
422 Tip: | |
423 | |
424 - Corresponding peaklists with masses and their intensities can be obtained with the filtering tool option "ranges for x and y" | |
425 | |
377 | 426 |
378 ]]> | 427 ]]> |
379 </help> | 428 </help> |
380 <citations> | 429 <citations> |
381 <citation type="doi">10.1093/bioinformatics/btv146</citation> | 430 <citation type="doi">10.1093/bioinformatics/btv146</citation> |