comparison msi_ion_images.xml @ 7:db0cf8eb4395 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 8087490eb4dcaf4ead0f03eae4126780d21e5503
author galaxyp
date Fri, 06 Jul 2018 14:13:35 -0400
parents 5a5b5a8fa8a0
children 6cd561bbb7ee
comparison
equal deleted inserted replaced
6:5a5b5a8fa8a0 7:db0cf8eb4395
1 <tool id="mass_spectrometry_imaging_ion_images" name="MSI ion images" version="1.10.0.2"> 1 <tool id="mass_spectrometry_imaging_ion_images" name="MSI ion images" version="1.10.0.3">
2 <description> 2 <description>
3 mass spectrometry imaging m/z heatmaps 3 mass spectrometry imaging m/z heatmaps
4 </description> 4 </description>
5 <requirements> 5 <requirements>
6 <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement> 6 <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement>
32 library(gridExtra) 32 library(gridExtra)
33 library(lattice) 33 library(lattice)
34 34
35 ## Read MALDI Imaging dataset 35 ## Read MALDI Imaging dataset
36 36
37
37 #if $infile.ext == 'imzml' 38 #if $infile.ext == 'imzml'
38 msidata <- readImzML('infile', mass.accuracy=$accuracy, units.accuracy = "$units") 39 #if str($processed_cond.processed_file) == "processed":
40 msidata <- readImzML('infile', mass.accuracy=$processed_cond.accuracy, units.accuracy = "$processed_cond.units")
41 #else
42 msidata <- readImzML('infile', attach.only=TRUE)
43 #end if
39 #elif $infile.ext == 'analyze75' 44 #elif $infile.ext == 'analyze75'
40 msidata = readAnalyze('infile') 45 msidata = readAnalyze('infile', attach.only=TRUE)
41 #else 46 #else
42 load('infile.RData') 47 load('infile.RData')
43 #end if 48 #end if
44 49
45 50
57 maximumx = max(coord(msidata)[,1]) 62 maximumx = max(coord(msidata)[,1])
58 ## Range y coordinates 63 ## Range y coordinates
59 minimumy = min(coord(msidata)[,2]) 64 minimumy = min(coord(msidata)[,2])
60 maximumy = max(coord(msidata)[,2]) 65 maximumy = max(coord(msidata)[,2])
61 ## Range of intensities 66 ## Range of intensities
62 minint = round(min(spectra(msidata)[]), digits=2) 67 minint = round(min(spectra(msidata)[], na.rm=TRUE), digits=2)
63 maxint = round(max(spectra(msidata)[]), digits=2) 68 maxint = round(max(spectra(msidata)[], na.rm=TRUE), digits=2)
64 medint = round(median(spectra(msidata)[]), digits=2) 69 medint = round(median(spectra(msidata)[], na.rm=TRUE), digits=2)
65 ## Number of intensities > 0 70 ## Number of intensities > 0
66 npeaks= sum(spectra(msidata)[]>0) 71 npeaks= sum(spectra(msidata)[]>0, na.rm=TRUE)
67 ## Spectra multiplied with m/z (potential number of peaks) 72 ## Spectra multiplied with m/z (potential number of peaks)
68 numpeaks = ncol(spectra(msidata)[])*nrow(spectra(msidata)[]) 73 numpeaks = ncol(spectra(msidata)[])*nrow(spectra(msidata)[])
69 ## Percentage of intensities > 0 74 ## Percentage of intensities > 0
70 percpeaks = round(npeaks/numpeaks*100, digits=2) 75 percpeaks = round(npeaks/numpeaks*100, digits=2)
71 ## Number of empty TICs 76 ## Number of empty TICs
72 TICs = colSums(spectra(msidata)[]) 77 TICs = colSums(spectra(msidata)[], na.rm=TRUE)
73 NumemptyTIC = sum(TICs == 0) 78 NumemptyTIC = sum(TICs == 0)
74 79
75 ## Processing informations 80 ## Processing informations
76 processinginfo = processingData(msidata) 81 processinginfo = processingData(msidata)
77 centroidedinfo = processinginfo@centroided # TRUE or FALSE 82 centroidedinfo = processinginfo@centroided # TRUE or FALSE
217 ]]></configfile> 222 ]]></configfile>
218 </configfiles> 223 </configfiles>
219 <inputs> 224 <inputs>
220 <param name="infile" type="data" format="imzml,rdata,analyze75" label="Inputfile as imzML, Analyze7.5 or Cardinal MSImageSet saved as RData" 225 <param name="infile" type="data" format="imzml,rdata,analyze75" label="Inputfile as imzML, Analyze7.5 or Cardinal MSImageSet saved as RData"
221 help="Upload composite datatype imzml (ibd+imzML) or analyze75 (hdr+img+t2m) or regular upload .RData (Cardinal MSImageSet)"/> 226 help="Upload composite datatype imzml (ibd+imzML) or analyze75 (hdr+img+t2m) or regular upload .RData (Cardinal MSImageSet)"/>
222 <param name="accuracy" type="float" value="50" label="Only for processed imzML files: enter mass accuracy to which the m/z values will be binned" help="This should be set to the native accuracy of the mass spectrometer, if known"/> 227 <conditional name="processed_cond">
223 <param name="units" display="radio" type="select" label="Only for processed imzML files: unit of the mass accuracy" help="either m/z or ppm"> 228 <param name="processed_file" type="select" label="Is the input file a processed imzML file ">
224 <option value="mz" >mz</option> 229 <option value="no_processed" selected="True">not a processed imzML</option>
225 <option value="ppm" selected="True" >ppm</option> 230 <option value="processed">processed imzML</option>
226 </param> 231 </param>
232 <when value="no_processed"/>
233 <when value="processed">
234 <param name="accuracy" type="float" value="50" label="Mass accuracy to which the m/z values will be binned" help="This should be set to the native accuracy of the mass spectrometer, if known"/>
235 <param name="units" display="radio" type="select" label="Unit of the mass accuracy" help="either m/z or ppm">
236 <option value="mz" >mz</option>
237 <option value="ppm" selected="True" >ppm</option>
238 </param>
239 </when>
240 </conditional>
227 <param name="filename" type="text" value="" label="Title" help="will appear in the pdf output. If nothing given it will take the dataset name"/> 241 <param name="filename" type="text" value="" label="Title" help="will appear in the pdf output. If nothing given it will take the dataset name"/>
228 <param name="massfile" type="data" format="tabular" label="Tabular file with m/z and names" 242 <param name="massfile" type="data" format="tabular" label="Tabular file with m/z and names"
229 help="first column m/z, second column m/z name, tab separated file"/> 243 help="first column m/z, second column m/z name, tab separated file"/>
230 <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"> 244 <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">
231 <option value="none" selected="True">none</option> 245 <option value="none" selected="True">none</option>
237 <option value="gaussian">gaussian</option> 251 <option value="gaussian">gaussian</option>
238 <option value="adaptive">adaptive</option> 252 <option value="adaptive">adaptive</option>
239 </param> 253 </param>
240 <param name="plusminus_dalton" value="0.25" type="float" label="M/z range" help="plusminus m/z window in Dalton"/> 254 <param name="plusminus_dalton" value="0.25" type="float" label="M/z range" help="plusminus m/z window in Dalton"/>
241 <param name="strip" type="boolean" checked="True" display="radio" truevalue="TRUE" falsevalue="FALSE" label="Display m/z value in plot"/> 255 <param name="strip" type="boolean" checked="True" display="radio" truevalue="TRUE" falsevalue="FALSE" label="Display m/z value in plot"/>
242 <param name="colorkey" type="boolean" checked="True" display="radio" truevalue="TRUE" falsevalue="FALSE" label="Display colorkey in plot"/> 256 <param name="colorkey" type="boolean" checked="True" display="radio" truevalue="TRUE" falsevalue="FALSE" label="Display colorkey in plot"/>
243 <conditional name="image_cond"> 257 <conditional name="image_cond">
244 <param name="image_type" type="select" label="Select the image type"> 258 <param name="image_type" type="select" label="Select the image type">
245 <option value="standard_image" selected="True">standard</option> 259 <option value="standard_image" selected="True">standard</option>
246 <option value="lattice_image">lattice</option> 260 <option value="lattice_image">lattice</option>
247 </param> 261 </param>