comparison mz_images.xml @ 18:ae304a72db7b draft default tip

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 91e77c139cb3b7c6d67727dc39140dd79355fa0c
author galaxyp
date Thu, 04 Jul 2024 13:42:18 +0000
parents 5629069fca8f
children
comparison
equal deleted inserted replaced
17:80600735685d 18:ae304a72db7b
1 <tool id="cardinal_mz_images" name="MSI mz images" version="@VERSION@.0"> 1 <tool id="cardinal_mz_images" name="MSI mz images" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="22.05">
2 <description> 2 <description>
3 mass spectrometry imaging m/z heatmaps 3 mass spectrometry imaging m/z heatmaps
4 </description> 4 </description>
5 <macros> 5 <macros>
6 <import>macros.xml</import> 6 <import>macros.xml</import>
7 </macros> 7 </macros>
8 <expand macro="requirements"> 8 <expand macro="requirements"/>
9 <requirement type="package" version="2.3">r-gridextra</requirement>
10 </expand>
11 <command detect_errors="aggressive"> 9 <command detect_errors="aggressive">
12 <![CDATA[ 10 <![CDATA[
13 @INPUT_LINKING@ 11 @INPUT_LINKING@
14 cat '${MSI_heatmaps}' && 12 cat '${MSI_heatmaps}' &&
15 Rscript '${MSI_heatmaps}' 13 Rscript '${MSI_heatmaps}'
81 ## optional svg output with original coordinates 79 ## optional svg output with original coordinates
82 #if $svg_pixelimage: 80 #if $svg_pixelimage:
83 print("svg pixel image") 81 print("svg pixel image")
84 ## reverse y axis for svg output = correct order and nice svg image 82 ## reverse y axis for svg output = correct order and nice svg image
85 coord(msidata)\$y <- max(coord(msidata)\$y) - coord(msidata)\$y + 1 83 coord(msidata)\$y <- max(coord(msidata)\$y) - coord(msidata)\$y + 1
86 ## works only with MSImageSet as expected 84
87 msidata = as(msidata, "MSImageSet") 85 msidata = as(msidata,"MSImagingExperiment")
88 86
89 svg(file="svg_pixel_output.svg", width=maximumx, height=maximumy) 87 svg(file="svg_pixel_output.svg", width=maximumx, height=maximumy)
90 par(mar=c(0,0,0,0), oma=c(0,0,0,0))## no margin for svg 88 par(mar=c(0,0,0,0), oma=c(0,0,0,0))## no margin for svg
91 #if str($light_mode) == "white": 89 #if str($light_mode) == "white":
92 lightmode() 90 lightmode()
130 <inputs> 128 <inputs>
131 <expand macro="reading_msidata"/> 129 <expand macro="reading_msidata"/>
132 <expand macro="pdf_filename"/> 130 <expand macro="pdf_filename"/>
133 <expand macro="reading_2_column_mz_tabular"/> 131 <expand macro="reading_2_column_mz_tabular"/>
134 132
135 <param name="plusminus_dalton" value="0.25" type="float" label="plusminus m/" help="m/z range to add on either side of the given m/z to create a window in which the mean of all intensities will be computed"/> 133 <param name="plusminus_dalton" value="0.25" type="float" label="plusminus m/z" help="m/z range to add on either side of the given m/z to create a window in which the mean of all intensities will be computed"/>
136 <param name="image_contrast" type="select" label="Contrast enhancement" help="The 'histogram' equalization method flatterns the distribution of intensities. The hotspot 'suppression' method uses thresholding to reduce the intensities of hotspots"> 134 <param name="image_contrast" type="select" label="Contrast enhancement" help="The 'histogram' equalization method flatterns the distribution of intensities. The hotspot 'suppression' method uses thresholding to reduce the intensities of hotspots">
137 <option value="none" selected="True">none</option> 135 <option value="none" selected="True">none</option>
138 <option value="suppression">suppression</option> 136 <option value="suppression">suppression</option>
139 <option value="histogram">histogram</option> 137 <option value="histogram">histogram</option>
140 </param> 138 </param>
191 <data format="svg" name="svg_output" from_work_dir="svg_pixel_output.svg" label="${tool.name} on ${on_string}: image.svg"> 189 <data format="svg" name="svg_output" from_work_dir="svg_pixel_output.svg" label="${tool.name} on ${on_string}: image.svg">
192 <filter>svg_pixelimage</filter> 190 <filter>svg_pixelimage</filter>
193 </data> 191 </data>
194 </outputs> 192 </outputs>
195 <tests> 193 <tests>
196 <test> 194 <test expect_num_outputs="1">
197 <expand macro="infile_imzml"/> 195 <expand macro="infile_imzml"/>
198 <param name="calibrant_file" value="inputpeptides.tabular" ftype="tabular"/> 196 <param name="calibrant_file" value="inputpeptides.tabular" ftype="tabular"/>
199 <param name="mz_column" value="1"/> 197 <param name="mz_column" value="1"/>
200 <param name="name_column" value="2"/> 198 <param name="name_column" value="2"/>
201 <param name="plusminus_dalton" value="0.25"/> 199 <param name="plusminus_dalton" value="0.25"/>
202 <param name="filename" value="Testfile_imzml"/> 200 <param name="filename" value="Testfile_imzml"/>
203 <param name="image_contrast" value="histogram"/> 201 <param name="image_contrast" value="histogram"/>
204 <param name="colorkey" value="True"/> 202 <param name="colorkey" value="True"/>
205 <output name="plots" file="Heatmaps_imzml.pdf" ftype="pdf" compare="sim_size"/> 203 <output name="plots" file="Heatmaps_imzml.pdf" ftype="pdf" compare="sim_size"/>
206 </test> 204 </test>
207 <test> 205 <test expect_num_outputs="2">
208 <expand macro="infile_analyze75"/> 206 <expand macro="infile_analyze75"/>
209 <param name="calibrant_file" value="inputpeptides2.tabular" ftype="tabular"/> 207 <param name="calibrant_file" value="inputpeptides2.tabular" ftype="tabular"/>
210 <param name="mz_column" value="1"/> 208 <param name="mz_column" value="1"/>
211 <param name="name_column" value="1"/> 209 <param name="name_column" value="1"/>
212 <param name="plusminus_dalton" value="0.5"/> 210 <param name="plusminus_dalton" value="0.5"/>
216 <param name="colorkey" value="True"/> 214 <param name="colorkey" value="True"/>
217 <param name="svg_pixelimage" value="True"/> 215 <param name="svg_pixelimage" value="True"/>
218 <output name="plots" file="Heatmaps_analyze75.pdf" ftype="pdf" compare="sim_size"/> 216 <output name="plots" file="Heatmaps_analyze75.pdf" ftype="pdf" compare="sim_size"/>
219 <output name="svg_output" file="analyze75.svg" ftype="svg" compare="sim_size"/> 217 <output name="svg_output" file="analyze75.svg" ftype="svg" compare="sim_size"/>
220 </test> 218 </test>
221 <test> 219 <test expect_num_outputs="1">
222 <param name="infile" value="preprocessed.RData" ftype="rdata"/> 220 <param name="infile" value="preprocessed.RData" ftype="rdata"/>
223 <param name="calibrant_file" value="inputpeptides.tabular" ftype="tabular"/> 221 <param name="calibrant_file" value="inputpeptides.tabular" ftype="tabular"/>
224 <param name="mz_column" value="1"/> 222 <param name="mz_column" value="1"/>
225 <param name="name_column" value="2"/> 223 <param name="name_column" value="2"/>
226 <param name="plusminus_dalton" value="0.5"/> 224 <param name="plusminus_dalton" value="0.5"/>
227 <param name="colorkey" value="True"/> 225 <param name="colorkey" value="True"/>
228 <param name="filename" value="Testfile_rdata"/> 226 <param name="filename" value="Testfile_rdata"/>
229 <output name="plots" file="Heatmaps_rdata.pdf" ftype="pdf" compare="sim_size"/> 227 <output name="plots" file="Heatmaps_rdata.pdf" ftype="pdf" compare="sim_size"/>
230 </test> 228 </test>
231 <test> 229 <test expect_num_outputs="1">
232 <param name="infile" value="empty_spectra.rdata" ftype="rdata"/> 230 <param name="infile" value="empty_spectra.rdata" ftype="rdata"/>
233 <param name="calibrant_file" value="inputpeptides2.tabular" ftype="tabular"/> 231 <param name="calibrant_file" value="inputpeptides2.tabular" ftype="tabular"/>
234 <param name="mz_column" value="1"/> 232 <param name="mz_column" value="1"/>
235 <param name="name_column" value="1"/> 233 <param name="name_column" value="1"/>
236 <param name="plusminus_dalton" value="0.5"/> 234 <param name="plusminus_dalton" value="0.5"/>
237 <param name="colorscale" value="plasma"/> 235 <param name="colorscale" value="plasma"/>
238 <param name="colorkey" value="False"/> 236 <param name="colorkey" value="False"/>
239 <param name="filename" value="Testfile_rdata"/> 237 <param name="filename" value="Testfile_rdata"/>
240 <output name="plots" file="Heatmaps_LM8_file16.pdf" ftype="pdf" compare="sim_size"/> 238 <output name="plots" file="Heatmaps_LM8_file16.pdf" ftype="pdf" compare="sim_size"/>
241 </test> 239 </test>
242 <test> 240 <test expect_num_outputs="1">
243 <expand macro="processed_infile_imzml"/> 241 <expand macro="processed_infile_imzml"/>
244 <conditional name="processed_cond"> 242 <conditional name="processed_cond">
245 <param name="processed_file" value="processed"/> 243 <param name="processed_file" value="processed"/>
246 <param name="accuracy" value="200"/> 244 <param name="accuracy" value="200"/>
247 <param name="units" value="ppm"/> 245 <param name="units" value="ppm"/>