comparison macros.xml @ 0:9c03e7a617cd draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 0825a4ccd3ebf4ca8a298326d14f3e7b25ae8415
author galaxyp
date Mon, 01 Oct 2018 01:08:16 -0400
parents
children 1d9931768896
comparison
equal deleted inserted replaced
-1:000000000000 0:9c03e7a617cd
1 <macros>
2 <token name="@VERSION@">1.12.1</token>
3
4 <xml name="requirements">
5 <requirements>
6 <requirement type="package" version="@VERSION@">bioconductor-cardinal</requirement>
7 <yield/>
8 </requirements>
9 </xml>
10
11 <token name="@INPUT_LINKING@"><![CDATA[
12 #if $infile.ext == 'imzml'
13 ln -s '${infile.extra_files_path}/imzml' infile.imzML &&
14 ln -s '${infile.extra_files_path}/ibd' infile.ibd &&
15 #elif $infile.ext == 'analyze75'
16 ln -s '${infile.extra_files_path}/hdr' infile.hdr &&
17 ln -s '${infile.extra_files_path}/img' infile.img &&
18 ln -s '${infile.extra_files_path}/t2m' infile.t2m &&
19 #else
20 ln -s $infile infile.RData &&
21 #end if
22 ]]></token>
23
24
25 <token name="@READING_MSIDATA@"><![CDATA[
26 ## importing MSI data files
27
28 ## function to read RData files independent of filename
29 loadRData <- function(fileName){
30 load(fileName)
31 get(ls()[ls() != "fileName"])
32 }
33
34 #if $infile.ext == 'imzml'
35 #if str($processed_cond.processed_file) == "processed":
36 msidata <- readImzML('infile', mass.accuracy=$processed_cond.accuracy, units.accuracy = "$processed_cond.units")
37 centroided(msidata) = $centroids
38 #else
39 msidata <- readImzML('infile')
40 centroided(msidata) = $centroids
41 #end if
42 #elif $infile.ext == 'analyze75'
43 msidata = readAnalyze('infile')
44 centroided(msidata) = $centroids
45 #else
46 msidata = loadRData('infile.RData')
47 #end if
48
49 ]]></token>
50
51 <token name="@DATA_PROPERTIES@"><![CDATA[
52 ## Number of features (mz)
53 maxfeatures = length(features(msidata))
54 ## Range mz
55 minmz = round(min(mz(msidata)), digits=2)
56 maxmz = round(max(mz(msidata)), digits=2)
57 ## Number of spectra (pixels)
58 pixelcount = length(pixels(msidata))
59 ## Range x coordinates
60 minimumx = min(coord(msidata)[,1])
61 maximumx = max(coord(msidata)[,1])
62 ## Range y coordinates
63 minimumy = min(coord(msidata)[,2])
64 maximumy = max(coord(msidata)[,2])
65 ## Range of intensities
66 minint = round(min(spectra(msidata)[], na.rm=TRUE), digits=2)
67 maxint = round(max(spectra(msidata)[], na.rm=TRUE), digits=2)
68 ## Number of intensities > 0, for if conditions
69 npeaks= sum(spectra(msidata)[]>0, na.rm=TRUE)
70
71 properties = c("Number of m/z features",
72 "Range of m/z values",
73 "Number of pixels",
74 "Range of x coordinates",
75 "Range of y coordinates",
76 "Range of intensities")
77
78 values = c(paste0(maxfeatures),
79 paste0(minmz, " - ", maxmz),
80 paste0(pixelcount),
81 paste0(minimumx, " - ", maximumx),
82 paste0(minimumy, " - ", maximumy),
83 paste0(minint, " - ", maxint))
84
85 property_df = data.frame(properties, values)
86 ]]></token>
87
88 <token name="@CARDINAL_DESCRIPTION@"><![CDATA[
89 Cardinal is an R package that implements statistical & computational tools for analyzing mass spectrometry imaging datasets.
90 `More information on Cardinal <http://cardinalmsi.org/>`_
91 ]]></token>
92 <token name="@MSIDATA_INPUT_DESCRIPTION@"><![CDATA[
93 **Input data**
94
95 - MSI data: 3 types of input data can be used:
96
97 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <https://ms-imaging.org/wp/imzml/>`_
98 - Analyze7.5 (upload hdr, img and t2m file via the "composite" function)
99 - Cardinal "MSImageSet" data saved as .RData
100 ]]></token>
101 <token name="@MZ_TABULAR_INPUT_DESCRIPTION@"><![CDATA[
102 - Optional tabular file with m/z values:
103
104 - One column with numeric m/z values (without empty fields or letters)
105 - The file is allowed to have any column names as header (in this case set "Tabular file contains a header line" to yes)
106 - m/z features outside the m/z range of the input file are ignored
107
108
109 ::
110
111 m/z
112 100.0
113 100.01
114 100.02
115 ...
116 ...
117
118 ]]></token>
119 <token name="@MZ_2COLS_TABULAR_INPUT_DESCRIPTION@"><![CDATA[
120 - Tabular file with m/z values:
121
122 - One column with numeric m/z values (without empty fields or letters), another column with names for the m/z (m/z column can also be used as name)
123 - The file is allowed to have any column names as header (in this case set "Tabular file contains a header line" to yes)
124 - m/z features outside the m/z range of the input file are ignored
125
126
127 ::
128
129 m/z name
130 100.0 analyte1
131 100.01 analyte2
132 100.02 analyte3
133 ...
134 ...
135
136 ]]></token>
137 <token name="@SPECTRA_TABULAR_INPUT_DESCRIPTION@"><![CDATA[
138 - Optional file with pixel coordinates and annotation:
139
140 - Tabular file: One column with x values, one column wiht y values and one column with annotations
141 - The file is allowed to have any column names as header (in this case set "Tabular file contains a header line" to yes)
142 - Pixel with coordinates outside the coordinates of the input file are ignored
143
144 ::
145
146 x_coord y_coord annotation
147 1 1 healthy
148 2 1 healthy
149 3 1 disease
150 ...
151 ...
152
153 ]]></token>
154
155 <xml name="reading_msidata">
156 <param name="infile" type="data" format="imzml,rdata,analyze75"
157 label="Input file as imzML, Analyze7.5 or Cardinal MSImageSet saved as RData"
158 help="Upload composite datatype imzML (ibd+imzML) or analyze75 (hdr+img+t2m) or regular upload .RData (Cardinal MSImageSet)"/>
159 <param name="centroids" type="boolean" label="Is the input data centroided (picked)" help="Choose Yes if peak detection has already been done." truevalue="TRUE" falsevalue="FALSE"/>
160 <conditional name="processed_cond">
161 <param name="processed_file" type="select" label="Processed imzML file" help="Choose no if your input is an Analyze7.5 or continuous imzML file">
162 <option value="no_processed" selected="True">no</option>
163 <option value="processed">yes</option>
164 </param>
165 <when value="no_processed"/>
166 <when value="processed">
167 <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"/>
168 <param name="units" display="radio" type="select" label="Unit of the mass accuracy" help="either m/z or ppm">
169 <option value="mz" >mz</option>
170 <option value="ppm" selected="True" >ppm</option>
171 </param>
172 </when>
173 </conditional>
174 </xml>
175
176 <xml name="pdf_filename">
177 <param name="filename" type="text" value="" label="Title" help="Will appear in the pdf output, if nothing given it will take the dataset name">
178 <sanitizer invalid_char="">
179 <valid initial="string.ascii_letters,string.digits">
180 <add value="_" />
181 </valid>
182 </sanitizer>
183 </param>
184 </xml>
185
186 <xml name="sanitizer_multiple_digits">
187 <sanitizer invalid_char="">
188 <valid initial="string.digits">
189 <add value=":" />
190 <add value="," />
191 </valid>
192 </sanitizer>
193 </xml>
194
195 <xml name="reading_1_column_mz_tabular" token_label="Tabular file with m/z features">
196 <param name="mz_tabular" type="data" format="tabular" label="@LABEL@" help="Only numeric m/z values are allowed"/>
197 <param name="feature_column" data_ref="mz_tabular" label="Column with features" type="data_column"/>
198 <param name="feature_header" type="boolean" label="Tabular file contains a header line" truevalue="TRUE" falsevalue="FALSE"/>
199 </xml>
200
201 <xml name="reading_2_column_mz_tabular">
202 <param name="calibrant_file" type="data" optional="true" format="tabular"
203 label="m/z of interest (e.g. internal Calibrants)" help="one column with m/z values, optional second column with names (m/z values can also be selected as name)"/>
204 <param name="mz_column" data_ref="calibrant_file" label="Column with m/z values" type="data_column"/>
205 <param name="name_column" data_ref="calibrant_file" label="Column with name of m/z values" type="data_column"/>
206 <param name="calibrant_header" type="boolean" label="Tabular file contains a header line" truevalue="TRUE" falsevalue="FALSE"/>
207 </xml>
208
209 <xml name="reading_pixel_annotations">
210 <param name="annotation_file" type="data" format="tabular" label="Tabular file with pixel coordinates and annotation"
211 help="Tabular file with three columns: x values, y values and pixel annotations"/>
212 <param name="column_x" data_ref="annotation_file" label="Column with x values" type="data_column"/>
213 <param name="column_y" data_ref="annotation_file" label="Column with y values" type="data_column"/>
214 <param name="column_names" data_ref="annotation_file" label="Column with pixel annotations" type="data_column"/>
215 <param name="tabular_header" type="boolean" label="Tabular file contains a header line" truevalue="TRUE" falsevalue="FALSE"/>
216 </xml>
217
218 <xml name="citations">
219 <citations>
220 <citation type="doi">10.1093/bioinformatics/btv146</citation>
221 </citations>
222 </xml>
223 <xml name="infile_analyze75">
224 <param name="infile" value="" ftype="analyze75">
225 <composite_data value="Analyze75.hdr"/>
226 <composite_data value="Analyze75.img"/>
227 <composite_data value="Analyze75.t2m"/>
228 </param>
229 </xml>
230 <xml name="infile_imzml">
231 <param name="infile" value="" ftype="imzml">
232 <composite_data value="Example_Continuous.imzML"/>
233 <composite_data value="Example_Continuous.ibd"/>
234 </param>
235 </xml>
236 </macros>