comparison macros.xml @ 7:4a2ac25d1063 draft

"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f986c51abe33c7f622d429a3c4a79ee24b33c1f3"
author galaxyp
date Thu, 23 Apr 2020 08:09:32 -0400
parents 82f6c2f4332d
children b591450b3d1c
comparison
equal deleted inserted replaced
6:82f6c2f4332d 7:4a2ac25d1063
1 <macros> 1 <macros>
2 <token name="@VERSION@">1.12.1</token> 2 <token name="@VERSION@">2.4.0</token>
3 3
4 <xml name="requirements"> 4 <xml name="requirements">
5 <requirements> 5 <requirements>
6 <requirement type="package" version="@VERSION@">bioconductor-cardinal</requirement> 6 <requirement type="package" version="@VERSION@">bioconductor-cardinal</requirement>
7 <requirement type="package" version="3.5.1">r-base</requirement> 7 <requirement type="package" version="3.6.1">r-base</requirement>
8 <yield/> 8 <yield/>
9 </requirements> 9 </requirements>
10 </xml> 10 </xml>
11 11
12 <xml name="print_version"> 12 <xml name="print_version">
30 30
31 31
32 <token name="@READING_MSIDATA@"><![CDATA[ 32 <token name="@READING_MSIDATA@"><![CDATA[
33 ## importing MSI data files 33 ## importing MSI data files
34 34
35 ## function to read RData files independent of filename
36 loadRData <- function(fileName){
37 load(fileName)
38 get(ls()[ls() != "fileName"])
39 }
40
41 #if $infile.ext == 'imzml' 35 #if $infile.ext == 'imzml'
42 #if str($processed_cond.processed_file) == "processed": 36 #if str($processed_cond.processed_file) == "processed":
43 msidata <- readImzML('infile', mass.accuracy=$processed_cond.accuracy, units.accuracy = "$processed_cond.units", attach.only=TRUE) 37 msidata <- readImzML('infile', resolution=$processed_cond.accuracy, attach.only=TRUE, units = "$processed_cond.units")
38 msidata = collect(msidata, as.matrix=TRUE) ##coercion to continuous
44 centroided(msidata) = $centroids 39 centroided(msidata) = $centroids
45 #else 40 #else
46 msidata <- readImzML('infile', attach.only=TRUE) 41 msidata <- readImzML('infile', attach.only=TRUE)
47 centroided(msidata) = $centroids 42 centroided(msidata) = $centroids
48 #end if 43 #end if
49 #elif $infile.ext == 'analyze75' 44 #elif $infile.ext == 'analyze75'
50 msidata = readAnalyze('infile', attach.only=TRUE) 45 msidata = readAnalyze('infile', attach.only=TRUE)
51 centroided(msidata) = $centroids 46 centroided(msidata) = $centroids
52 #else 47 #else
48 ## function to read RData files independent of filename
49 loadRData <- function(fileName){
50 load(fileName)
51 get(ls()[ls() != "fileName"])
52 }
53 msidata = loadRData('infile.RData') 53 msidata = loadRData('infile.RData')
54 #end if 54 #end if
55 55
56 ]]></token> 56 ]]></token>
57 57
84 paste0(minimumy, " - ", maximumy)) 84 paste0(minimumy, " - ", maximumy))
85 85
86 property_df = data.frame(properties, values) 86 property_df = data.frame(properties, values)
87 ]]></token> 87 ]]></token>
88 88
89 <token name="@READING_MSIDATA_INRAM@"><![CDATA[ 89 <token name="@READING_MSIDATA_FULLY_COMPATIBLE@"><![CDATA[
90 ## importing MSI data files 90 ## importing MSI data files
91
92 ## function to read RData files independent of filename
93 loadRData <- function(fileName){
94 load(fileName)
95 get(ls()[ls() != "fileName"])
96 }
97 91
98 #if $infile.ext == 'imzml' 92 #if $infile.ext == 'imzml'
99 #if str($processed_cond.processed_file) == "processed": 93 #if str($processed_cond.processed_file) == "processed":
100 msidata <- readImzML('infile', mass.accuracy=$processed_cond.accuracy, units.accuracy = "$processed_cond.units") 94 msidata <- readImzML('infile', resolution=$processed_cond.accuracy, units = "$processed_cond.units", attach.only=TRUE)
101 centroided(msidata) = $centroids 95 centroided(msidata) = $centroids
102 iData(msidata) = iData(msidata)[]
103 #else 96 #else
104 msidata <- readImzML('infile') 97 msidata <- readImzML('infile', attach.only=TRUE)
105 centroided(msidata) = $centroids 98 centroided(msidata) = $centroids
106 #end if 99 #end if
107 #elif $infile.ext == 'analyze75' 100 #elif $infile.ext == 'analyze75'
108 msidata = readAnalyze('infile') 101 msidata = readAnalyze('infile', attach.only=TRUE)
109 centroided(msidata) = $centroids 102 centroided(msidata) = $centroids
110 #else 103 #else
104 ## function to read RData files independent of filename
105 loadRData <- function(fileName){
106 load(fileName)
107 get(ls()[ls() != "fileName"])
108 }
111 msidata = loadRData('infile.RData') 109 msidata = loadRData('infile.RData')
110 msidata = as(msidata, "MSImagingExperiment")
111 run(msidata) = "infile"
112 #end if 112 #end if
113 113
114 ]]></token> 114 ]]></token>
115 115
116 <token name="@DATA_PROPERTIES_INRAM@"><![CDATA[ 116 <token name="@DATA_PROPERTIES_INRAM@"><![CDATA[
117 ########################### QC numbers ######################## 117 ########################### QC numbers ########################
118 ## including intensity calculations which need data in RAM 118 ## including intensity calculations which need data in RAM
119 ## Number of features (mz) 119 ## Number of features (mz)
120 maxfeatures = length(features(msidata)) 120 maxfeatures = length(features(msidata))
121 ## Range mz 121 ## Range mz
128 maximumx = max(coord(msidata)[,1]) 128 maximumx = max(coord(msidata)[,1])
129 ## Range y coordinates 129 ## Range y coordinates
130 minimumy = min(coord(msidata)[,2]) 130 minimumy = min(coord(msidata)[,2])
131 maximumy = max(coord(msidata)[,2]) 131 maximumy = max(coord(msidata)[,2])
132 ## Range of intensities 132 ## Range of intensities
133 minint = round(min(spectra(msidata), na.rm=TRUE), digits=2) 133 minint = round(min(as.matrix(spectra(msidata)), na.rm=TRUE), digits=2)
134 maxint = round(max(spectra(msidata), na.rm=TRUE), digits=2) 134 maxint = round(max(as.matrix(spectra(msidata)), na.rm=TRUE), digits=2)
135 ## Number of intensities > 0, for if conditions 135 ## Number of intensities > 0, for if conditions
136 npeaks= sum(spectra(msidata)>0, na.rm=TRUE) 136 npeaks= sum(as.matrix(spectra(msidata))>0, na.rm=TRUE)
137 ## Number of NA in spectra matrix 137 ## Number of NA in spectra matrix
138 NAcount = sum(is.na(spectra(msidata))) 138 NAcount = sum(is.na(spectra(msidata)))
139 ## Number of NA in spectra matrix 139 ## Number of NA in spectra matrix
140 infcount = sum(is.infinite(spectra(msidata))) 140 infcount = sum(is.infinite(as.matrix(spectra(msidata))))
141 ## Number of duplicated coordinates 141 ## Number of duplicated coordinates
142 dupl_coord = sum(duplicated(coord(msidata))) 142 dupl_coord = sum(duplicated(coord(msidata)))
143
144 properties = c("Number of m/z features", 143 properties = c("Number of m/z features",
145 "Range of m/z values", 144 "Range of m/z values",
146 "Number of pixels", 145 "Number of pixels",
147 "Range of x coordinates", 146 "Range of x coordinates",
148 "Range of y coordinates", 147 "Range of y coordinates",
296 </xml> 295 </xml>
297 296
298 <xml name="citations"> 297 <xml name="citations">
299 <citations> 298 <citations>
300 <citation type="doi">10.1093/bioinformatics/btv146</citation> 299 <citation type="doi">10.1093/bioinformatics/btv146</citation>
300 <citation type="doi">10.1093/gigascience/giz143</citation>
301 </citations> 301 </citations>
302 </xml> 302 </xml>
303 <xml name="infile_analyze75"> 303 <xml name="infile_analyze75">
304 <param name="infile" value="" ftype="analyze75"> 304 <param name="infile" value="" ftype="analyze75">
305 <composite_data value="Analyze75.hdr"/> 305 <composite_data value="Analyze75.hdr"/>