comparison macros.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 c4df3005e04d
children
comparison
equal deleted inserted replaced
17:80600735685d 18:ae304a72db7b
1 <macros> 1 <macros>
2 <token name="@VERSION@">2.10.0</token> 2 <token name="@TOOL_VERSION@">3.4.3</token>
3 <token name="@VERSION_SUFFIX@">0</token>
3 4
4 <xml name="requirements"> 5 <xml name="requirements">
5 <requirements> 6 <requirements>
6 <requirement type="package" version="@VERSION@">bioconductor-cardinal</requirement> 7 <requirement type="package" version="@TOOL_VERSION@">bioconductor-cardinal</requirement>
7 <!--requirement type="package" version="3.6.1">r-base</requirement--> 8 <requirement type="package" version="2.3">r-gridextra</requirement>
9 <requirement type="package" version="3.5.1">r-ggplot2</requirement>
10 <requirement type="package" version="0.14.1">r-maldiquantforeign</requirement>
11 <requirement type="package" version="1.22.2">r-maldiquant</requirement>
12 <requirement type="package" version="3.50.0">bioconductor-sva</requirement>
13 <requirement type="package" version="1.1.0.1">r-randomcolor</requirement>
14 <requirement type="package" version="1.1_3">r-rcolorbrewer</requirement>
15 <requirement type="package" version="2.23_24">r-kernsmooth</requirement>
16 <requirement type="package" version="1.3.0">r-scales</requirement>
17 <requirement type="package" version="1.0.12">r-pheatmap</requirement>
8 <yield/> 18 <yield/>
9 </requirements> 19 </requirements>
10 </xml> 20 </xml>
11 21
12 <xml name="print_version"> 22 <xml name="print_version">
15 ]]></version_command> 25 ]]></version_command>
16 </xml> 26 </xml>
17 27
18 <token name="@INPUT_LINKING@"><![CDATA[ 28 <token name="@INPUT_LINKING@"><![CDATA[
19 #if $infile.ext == 'imzml' 29 #if $infile.ext == 'imzml'
20 ln -s '${infile.extra_files_path}/imzml' infile.imzML && 30 cp '${infile.extra_files_path}/imzml' infile.imzML &&
21 ln -s '${infile.extra_files_path}/ibd' infile.ibd && 31 cp '${infile.extra_files_path}/ibd' infile.ibd &&
22 #elif $infile.ext == 'analyze75' 32 #elif $infile.ext == 'analyze75'
23 ln -s '${infile.extra_files_path}/hdr' infile.hdr && 33 cp '${infile.extra_files_path}/hdr' infile.hdr &&
24 ln -s '${infile.extra_files_path}/img' infile.img && 34 cp '${infile.extra_files_path}/img' infile.img &&
25 ln -s '${infile.extra_files_path}/t2m' infile.t2m && 35 cp '${infile.extra_files_path}/t2m' infile.t2m &&
26 #else 36 #else
27 ln -s $infile infile.RData && 37 ln -s $infile infile.RData &&
28 #end if 38 #end if
29 ]]></token> 39 ]]></token>
30 40
36 loadRData <- function(fileName){ 46 loadRData <- function(fileName){
37 load(fileName) 47 load(fileName)
38 get(ls()[ls() != "fileName"]) 48 get(ls()[ls() != "fileName"])
39 } 49 }
40 50
51
41 #if $infile.ext == 'imzml' 52 #if $infile.ext == 'imzml'
42 #if str($processed_cond.processed_file) == "processed": 53 #if str($processed_cond.processed_file) == "processed":
43 msidata <- readImzML('infile', resolution=$processed_cond.accuracy, attach.only=TRUE, units = "$processed_cond.units") 54 msidata <- readImzML('infile', resolution=$processed_cond.accuracy, attach.only=TRUE, units = "$processed_cond.units")
44 msidata = collect(msidata, as.matrix=TRUE) ##coercion to continuous
45 centroided(msidata) = $centroids 55 centroided(msidata) = $centroids
46 #else 56 #else
47 msidata <- readImzML('infile', attach.only=TRUE) 57 msidata <- readImzML('infile')
48 centroided(msidata) = $centroids 58 centroided(msidata) = $centroids
49 #end if 59 #end if
50 #elif $infile.ext == 'analyze75' 60 #elif $infile.ext == 'analyze75'
51 msidata = readAnalyze('infile', attach.only=TRUE) 61 msidata = readAnalyze('infile', attach.only=TRUE)
52 centroided(msidata) = $centroids 62 centroided(msidata) = $centroids
93 #if $infile.ext == 'imzml' 103 #if $infile.ext == 'imzml'
94 #if str($processed_cond.processed_file) == "processed": 104 #if str($processed_cond.processed_file) == "processed":
95 msidata <- readImzML('infile', resolution=$processed_cond.accuracy, units = "$processed_cond.units", attach.only=TRUE) 105 msidata <- readImzML('infile', resolution=$processed_cond.accuracy, units = "$processed_cond.units", attach.only=TRUE)
96 centroided(msidata) = $centroids 106 centroided(msidata) = $centroids
97 #else 107 #else
98 msidata <- readImzML('infile', attach.only=TRUE) 108 msidata <- readImzML('infile')
99 centroided(msidata) = $centroids 109 centroided(msidata) = $centroids
100 #end if 110 #end if
101 #elif $infile.ext == 'analyze75' 111 #elif $infile.ext == 'analyze75'
102 msidata = readAnalyze('infile', attach.only=TRUE) 112 msidata = readAnalyze('infile', attach.only=TRUE)
103 centroided(msidata) = $centroids 113 centroided(msidata) = $centroids
115 ]]></token> 125 ]]></token>
116 126
117 <token name="@DATA_PROPERTIES_INRAM@"><![CDATA[ 127 <token name="@DATA_PROPERTIES_INRAM@"><![CDATA[
118 ########################### QC numbers ######################## 128 ########################### QC numbers ########################
119 ## including intensity calculations which need data in RAM 129 ## including intensity calculations which need data in RAM
120
121 int_matrix = as.matrix(spectra(msidata)) ## only load once into RAM, then re-use 130 int_matrix = as.matrix(spectra(msidata)) ## only load once into RAM, then re-use
122 ## Number of NA in spectra matrix 131 ## Number of NA in spectra matrix
123 NAcount = sum(is.na(int_matrix)) 132 NAcount = sum(is.na(int_matrix))
124 ## replace NA with zero to calculate data properties based on intensity matrix, no change in msidata 133 ## replace NA with zero to calculate data properties based on intensity matrix, no change in msidata
125 int_matrix[is.na(int_matrix)] <- 0 134 int_matrix[is.na(int_matrix)] <- 0
126 135
136
127 ## Number of features (mz) 137 ## Number of features (mz)
128 maxfeatures = length(features(msidata)) 138 maxfeatures = length(features(msidata))
129 ## Range mz 139 ## Range mz
130 minmz = round(min(mz(msidata)), digits=2) 140 minmz = round(min(mz(msidata)), digits=2)
131 maxmz = round(max(mz(msidata)), digits=2) 141 maxmz = round(max(mz(msidata)), digits=2)