comparison macros.xml @ 4:48c07268f341 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ecdc3a64aa245d80dbc5487b2bf10a85a43adc6d
author galaxyp
date Fri, 22 Mar 2019 08:18:29 -0400
parents 129cddd02600
children bb1ac6b47a6c
comparison
equal deleted inserted replaced
3:fe5a1d487f32 4:48c07268f341
97 97
98 #if $infile.ext == 'imzml' 98 #if $infile.ext == 'imzml'
99 #if str($processed_cond.processed_file) == "processed": 99 #if str($processed_cond.processed_file) == "processed":
100 msidata <- readImzML('infile', mass.accuracy=$processed_cond.accuracy, units.accuracy = "$processed_cond.units") 100 msidata <- readImzML('infile', mass.accuracy=$processed_cond.accuracy, units.accuracy = "$processed_cond.units")
101 centroided(msidata) = $centroids 101 centroided(msidata) = $centroids
102 iData(msidata) = iData(msidata)[]
102 #else 103 #else
103 msidata <- readImzML('infile') 104 msidata <- readImzML('infile')
104 centroided(msidata) = $centroids 105 centroided(msidata) = $centroids
105 #end if 106 #end if
106 #elif $infile.ext == 'analyze75' 107 #elif $infile.ext == 'analyze75'
127 maximumx = max(coord(msidata)[,1]) 128 maximumx = max(coord(msidata)[,1])
128 ## Range y coordinates 129 ## Range y coordinates
129 minimumy = min(coord(msidata)[,2]) 130 minimumy = min(coord(msidata)[,2])
130 maximumy = max(coord(msidata)[,2]) 131 maximumy = max(coord(msidata)[,2])
131 ## Range of intensities 132 ## Range of intensities
132 minint = round(min(spectra(msidata)[], na.rm=TRUE), digits=2) 133 minint = round(min(spectra(msidata), na.rm=TRUE), digits=2)
133 maxint = round(max(spectra(msidata)[], na.rm=TRUE), digits=2) 134 maxint = round(max(spectra(msidata), na.rm=TRUE), digits=2)
134 ## Number of intensities > 0, for if conditions 135 ## Number of intensities > 0, for if conditions
135 npeaks= sum(spectra(msidata)[]>0, na.rm=TRUE) 136 npeaks= sum(spectra(msidata)>0, na.rm=TRUE)
136 ## Number of NA in spectra matrix 137 ## Number of NA in spectra matrix
137 NAcount = sum(is.na(spectra(msidata)[])) 138 NAcount = sum(is.na(spectra(msidata)))
138 ## Number of NA in spectra matrix 139 ## Number of NA in spectra matrix
139 infcount = sum(is.infinite(spectra(msidata)[])) 140 infcount = sum(is.infinite(spectra(msidata)))
141 ## Number of duplicated coordinates
142 dupl_coord = sum(duplicated(coord(msidata)))
140 143
141 properties = c("Number of m/z features", 144 properties = c("Number of m/z features",
142 "Range of m/z values", 145 "Range of m/z values",
143 "Number of pixels", 146 "Number of pixels",
144 "Range of x coordinates", 147 "Range of x coordinates",
145 "Range of y coordinates", 148 "Range of y coordinates",
146 "Range of intensities", 149 "Range of intensities",
147 "Number of NA intensities", 150 "Number of NA intensities",
148 "Number of Inf intensities") 151 "Number of Inf intensities",
152 "Number of duplicated coordinates")
149 153
150 values = c(paste0(maxfeatures), 154 values = c(paste0(maxfeatures),
151 paste0(minmz, " - ", maxmz), 155 paste0(minmz, " - ", maxmz),
152 paste0(pixelcount), 156 paste0(pixelcount),
153 paste0(minimumx, " - ", maximumx), 157 paste0(minimumx, " - ", maximumx),
154 paste0(minimumy, " - ", maximumy), 158 paste0(minimumy, " - ", maximumy),
155 paste0(minint, " - ", maxint), 159 paste0(minint, " - ", maxint),
156 paste0(NAcount), 160 paste0(NAcount),
157 paste0(infcount)) 161 paste0(infcount),
162 paste0(dupl_coord))
158 163
159 property_df = data.frame(properties, values) 164 property_df = data.frame(properties, values)
160 ]]></token> 165 ]]></token>
161 166
162 <token name="@CARDINAL_DESCRIPTION@"><![CDATA[ 167 <token name="@CARDINAL_DESCRIPTION@"><![CDATA[
227 ]]></token> 232 ]]></token>
228 233
229 <xml name="reading_msidata"> 234 <xml name="reading_msidata">
230 <param name="infile" type="data" format="imzml,rdata,analyze75" 235 <param name="infile" type="data" format="imzml,rdata,analyze75"
231 label="MSI data" 236 label="MSI data"
232 help="Input file as imzML (composite upload), or Cardinal MSImageSet saved as RData (regular upload)"/> 237 help="Input file as imzML (composite upload), Analyze7.5 (composite upload) or Cardinal MSImageSet saved as RData (regular upload)"/>
233 <param name="centroids" type="boolean" label="Centroided input" help="Choose Yes if peak detection has already been done." truevalue="TRUE" falsevalue="FALSE"/> 238 <param name="centroids" type="boolean" label="Centroided input" help="Choose Yes if peak detection has already been done." truevalue="TRUE" falsevalue="FALSE"/>
234 <conditional name="processed_cond"> 239 <conditional name="processed_cond">
235 <param name="processed_file" type="select" label="Processed imzML file" help="Choose no if your input is an Analyze7.5 or continuous imzML file"> 240 <param name="processed_file" type="select" label="Processed imzML file" help="Choose no if your input is an Analyze7.5 or continuous imzML file">
236 <option value="no_processed" selected="True">no</option> 241 <option value="no_processed" selected="True">no</option>
237 <option value="processed">yes</option> 242 <option value="processed">yes</option>