comparison msi_ion_images.xml @ 2:b2ad54eabcca draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_ion_images commit ed7d3e6f1a09c78c8f71cc1bdc1a20249767f646
author galaxyp
date Sun, 11 Mar 2018 10:38:24 -0400
parents 845fee459824
children 616b98c235fb
comparison
equal deleted inserted replaced
1:845fee459824 2:b2ad54eabcca
1 <tool id="mass_spectrometry_imaging_ion_images" name="MSI ion images" version="1.7.0.1"> 1 <tool id="mass_spectrometry_imaging_ion_images" name="MSI ion images" version="1.7.0.2">
2 <description> 2 <description>
3 mass spectrometry imaging heatmaps 3 mass spectrometry imaging heatmaps
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.7.0">bioconductor-cardinal</requirement>
102 peakpickinginfo='FALSE' 102 peakpickinginfo='FALSE'
103 } else { 103 } else {
104 peakpickinginfo=processinginfo@peakPicking 104 peakpickinginfo=processinginfo@peakPicking
105 } 105 }
106 106
107 #if $massfile: 107
108 ### Read tabular file with peptide masses for plots and heatmap images: 108 ### Read tabular file with peptide masses for heatmap images:
109 input_list = read.delim("$massfile", header = FALSE, stringsAsFactors = FALSE) 109
110 if (ncol(input_list) == 1) 110 input_list = read.delim("$massfile", header = FALSE, stringsAsFactors = FALSE)
111 { 111 if (ncol(input_list) == 1)
112 input_list = cbind(input_list, input_list) 112 {
113 } 113 input_list = cbind(input_list, input_list)
114 ### calculate how many input masses are valid: 114 }
115 inputmasses = input_list[input_list[,1]>minmz & input_list[,1]<maxmz,] 115
116 116 ### calculate how many input masses are valid:
117 inputmz = inputmasses[,1] 117 inputmasses = input_list[input_list[,1]>minmz & input_list[,1]<maxmz,]
118 inputnames = inputmasses[,2] 118
119 #else 119 inputmz = inputmasses[,1]
120 input_list = data.frame(0, 0) 120 inputnames = inputmasses[,2]
121 inputmz = 0 121
122 #end if 122 if (nrow(input_list) == 1)
123 123 {
124 124 countpixels = sum(spectra(msidata)[features(msidata, mz = inputmz), ] >0)
125 countpixels = rowSums(spectra(msidata)[features(msidata, mz=inputmz),]>0) 125 }else {
126 countpixels = rowSums(spectra(msidata)[features(msidata, mz=inputmz),] >0)
127 }
128
126 percentpixels = round(countpixels/pixelcount*100, digits=1) 129 percentpixels = round(countpixels/pixelcount*100, digits=1)
127 valuesdataframe = cbind(inputmz, cbind(countpixels, percentpixels)) 130 valuesdataframe = cbind(inputmz, cbind(countpixels, percentpixels))
128 131
129 132
130 write.table(valuesdataframe, file="$pixel_count", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t") 133 write.table(valuesdataframe, file="$pixel_count", quote = FALSE, row.names = TRUE, col.names=NA, sep = "\t")
143 "Normalization", 146 "Normalization",
144 "Smoothing", 147 "Smoothing",
145 "Baseline reduction", 148 "Baseline reduction",
146 "Peak picking", 149 "Peak picking",
147 "Centroided", 150 "Centroided",
148 paste0("# valid masses in ", "$massfile.display_name")) 151 paste0("# valid masses in \n", "$massfile.display_name"))
149 152
150 values = c(paste0(maxfeatures), 153 values = c(paste0(maxfeatures),
151 paste0(minmz, " - ", maxmz), 154 paste0(minmz, " - ", maxmz),
152 paste0(pixelcount), 155 paste0(pixelcount),
153 paste0(minimumx, " - ", maximumx), 156 paste0(minimumx, " - ", maximumx),
211 ]]></configfile> 214 ]]></configfile>
212 </configfiles> 215 </configfiles>
213 <inputs> 216 <inputs>
214 <param name="infile" type="data" format="imzml,rdata,analyze75" label="Inputfile as imzML, Analyze7.5 or Cardinal MSImageSet saved as RData" 217 <param name="infile" type="data" format="imzml,rdata,analyze75" label="Inputfile as imzML, Analyze7.5 or Cardinal MSImageSet saved as RData"
215 help="Upload composite datatype imzml (ibd+imzML) or analyze75 (hdr+img+t2m) or regular upload .RData (Cardinal MSImageSet)"/> 218 help="Upload composite datatype imzml (ibd+imzML) or analyze75 (hdr+img+t2m) or regular upload .RData (Cardinal MSImageSet)"/>
216 <param name="filename" type="text" value="" label="Title" help="will appear in the quality report. If nothing given it will take the dataset name."/> 219 <param name="filename" type="text" value="" label="Title" help="will appear in the quality report. If nothing given it will take the dataset name"/>
217 <param name="massfile" type="data" format="tabular" label="Text file with masses and names" 220 <param name="massfile" type="data" format="tabular" label="Text file with masses and names"
218 help="first column mass (m/z), second column mass name, tab separated file"/> 221 help="first column mass (m/z), second column mass name, tab separated file"/>
219 <param name="image_contrast" type="select" label="Select a contrast enhancement function for the heatmap images." help="The 'histogram' equalization method flatterns the distribution of intensities. The hotspot 'suppression' method uses thresholding to reduce the intensities of hotspots"> 222 <param name="image_contrast" type="select" label="Select a contrast enhancement function for the heatmap images" help="The 'histogram' equalization method flatterns the distribution of intensities. The hotspot 'suppression' method uses thresholding to reduce the intensities of hotspots">
220 <option value="none" selected="True">none</option> 223 <option value="none" selected="True">none</option>
221 <option value="suppression">suppression</option> 224 <option value="suppression">suppression</option>
222 <option value="histogram">histogram</option> 225 <option value="histogram">histogram</option>
223 </param> 226 </param>
224 <param name="image_smoothing" type="select" label="Select an image smoothing function for the heatmap images." help="The 'gaussian' smoothing method smooths images with a simple gaussian kernel. The 'adaptive' method uses bilateral filtering to preserve edges."> 227 <param name="image_smoothing" type="select" label="Select an image smoothing function for the heatmap images" help="The 'gaussian' smoothing method smooths images with a simple gaussian kernel. The 'adaptive' method uses bilateral filtering to preserve edges">
225 <option value="none" selected="True">none</option> 228 <option value="none" selected="True">none</option>
226 <option value="gaussian">gaussian</option> 229 <option value="gaussian">gaussian</option>
227 <option value="adaptive">adaptive</option> 230 <option value="adaptive">adaptive</option>
228 </param> 231 </param>
229 <param name="plusminus_dalton" value="0.25" type="float" label="Mass range" help="plusminus mass window in Dalton"/> 232 <param name="plusminus_dalton" value="0.25" type="float" label="Mass range" help="plusminus mass window in Dalton"/>
241 <param name="massfile" value="inputpeptides.tabular" ftype="tabular"/> 244 <param name="massfile" value="inputpeptides.tabular" ftype="tabular"/>
242 <param name="plusminus_dalton" value="0.25"/> 245 <param name="plusminus_dalton" value="0.25"/>
243 <param name="filename" value="Testfile_imzml"/> 246 <param name="filename" value="Testfile_imzml"/>
244 <param name="image_contrast" value="histogram"/> 247 <param name="image_contrast" value="histogram"/>
245 <output name="plots" file="Heatmaps_imzml.pdf" compare="sim_size" delta="20000"/> 248 <output name="plots" file="Heatmaps_imzml.pdf" compare="sim_size" delta="20000"/>
249 <output name="pixel_count" file="tabular_imzml.tabular"/>
246 </test> 250 </test>
247
248 <test> 251 <test>
249 <param name="infile" value="" ftype="analyze75"> 252 <param name="infile" value="" ftype="analyze75">
250 <composite_data value="Analyze75.hdr"/> 253 <composite_data value="Analyze75.hdr"/>
251 <composite_data value="Analyze75.img"/> 254 <composite_data value="Analyze75.img"/>
252 <composite_data value="Analyze75.t2m"/> 255 <composite_data value="Analyze75.t2m"/>
254 <param name="massfile" value="inputpeptides2.tabular" ftype="tabular"/> 257 <param name="massfile" value="inputpeptides2.tabular" ftype="tabular"/>
255 <param name="plusminus_dalton" value="0.5"/> 258 <param name="plusminus_dalton" value="0.5"/>
256 <param name="filename" value="Testfile_analyze75"/> 259 <param name="filename" value="Testfile_analyze75"/>
257 <param name="image_smoothing" value="gaussian"/> 260 <param name="image_smoothing" value="gaussian"/>
258 <output name="plots" file="Heatmaps_analyze75.pdf" compare="sim_size" delta="20000"/> 261 <output name="plots" file="Heatmaps_analyze75.pdf" compare="sim_size" delta="20000"/>
262 <output name="pixel_count" file="tabular_analyze75.tabular"/>
259 </test> 263 </test>
260 <test> 264 <test>
261 <param name="infile" value="preprocessing_results1.RData" ftype="rdata"/> 265 <param name="infile" value="preprocessing_results1.RData" ftype="rdata"/>
262 <param name="massfile" value="inputpeptides.tabular" ftype="tabular"/> 266 <param name="massfile" value="inputpeptides.tabular" ftype="tabular"/>
263 <param name="plusminus_dalton" value="0.1"/> 267 <param name="plusminus_dalton" value="0.1"/>
264 <param name="filename" value="Testfile_rdata"/> 268 <param name="filename" value="Testfile_rdata"/>
265 <output name="plots" file="Heatmaps_rdata.pdf" compare="sim_size" delta="20000"/> 269 <output name="plots" file="Heatmaps_rdata.pdf" compare="sim_size" delta="20000"/>
270 <output name="pixel_count" file="tabular_rdata.tabular"/>
266 </test> 271 </test>
267 <test> 272 <test>
268 <param name="infile" value="LM8_file16.rdata" ftype="rdata"/> 273 <param name="infile" value="LM8_file16.rdata" ftype="rdata"/>
269 <param name="massfile" value="inputpeptides2.tabular" ftype="tabular"/> 274 <param name="massfile" value="inputpeptides2.tabular" ftype="tabular"/>
270 <param name="plusminus_dalton" value="0.1"/> 275 <param name="plusminus_dalton" value="0.1"/>
271 <param name="filename" value="Testfile_rdata"/> 276 <param name="filename" value="Testfile_rdata"/>
272 <output name="plots" file="Heatmaps_LM8_file16.pdf" compare="sim_size" delta="20000"/> 277 <output name="plots" file="Heatmaps_LM8_file16.pdf" compare="sim_size" delta="20000"/>
278 <output name="pixel_count" file="tabular_LM8file16.tabular"/>
273 </test> 279 </test>
274 </tests> 280 </tests>
275 <help><![CDATA[ 281 <help><![CDATA[
276 282
277 Heatmaps for different masses in mass-spectrometry imaging data as pdf output. 283 Heatmaps for different masses in mass-spectrometry imaging data as pdf output.
284 - Analyze7.5 (upload hdr, img and t2m file via the "composite" function) 290 - Analyze7.5 (upload hdr, img and t2m file via the "composite" function)
285 - Cardinal "MSImageSet" data (with variable name "msidata", saved as .RData) 291 - Cardinal "MSImageSet" data (with variable name "msidata", saved as .RData)
286 292
287 tabular file with masses: 293 tabular file with masses:
288 - tab separated file (.tabular), datatype in Galaxy must be tabular (if Galaxy auto-detection was wrong, datatype can be changed by pressing the pen button) 294 - tab separated file (.tabular), datatype in Galaxy must be tabular (if Galaxy auto-detection was wrong, datatype can be changed by pressing the pen button)
295 - first column must contain masses (separate point numbers by point, not comma)
296 - optionally a second column with names for the masses can be provided
289 - no empty fields or letters are allowed (tool crashes with empty fields and a single letter prohibits generation of images) 297 - no empty fields or letters are allowed (tool crashes with empty fields and a single letter prohibits generation of images)
290 - separate point numbers by point (a single number with comma prohibits generation of images)
291 298
292 Trouble shooting: 299 Trouble shooting:
293 - no heatmaps are plotted when tabular file contains letters or point numbers with commas or when the input MSI file had no intensities > 0 300 - no heatmaps are plotted when tabular file contains letters or point numbers with commas or when the input MSI file had no intensities > 0
294 - contrast enhance functions need masses with intensities > 0 in about 1.5% of all pixels - tool crashes when contrast enhance is used on too few intensities 301 - contrast enhance functions need masses with intensities > 0 in about 1.5% of all pixels - tool crashes when contrast enhance is used on too few intensities
295 302