Mercurial > repos > galaxyp > cardinal_quality_report
comparison macros.xml @ 11:f396c176f366 draft
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit ca89f8e007c6b17f7c30066729e05b8686ab975a"
author | galaxyp |
---|---|
date | Sun, 27 Sep 2020 11:11:53 +0000 |
parents | f365bad862c9 |
children | 23d0394b5908 |
comparison
equal
deleted
inserted
replaced
10:f365bad862c9 | 11:f396c176f366 |
---|---|
115 ]]></token> | 115 ]]></token> |
116 | 116 |
117 <token name="@DATA_PROPERTIES_INRAM@"><![CDATA[ | 117 <token name="@DATA_PROPERTIES_INRAM@"><![CDATA[ |
118 ########################### QC numbers ######################## | 118 ########################### QC numbers ######################## |
119 ## including intensity calculations which need data in RAM | 119 ## including intensity calculations which need data in RAM |
120 | |
121 int_matrix = as.matrix(spectra(msidata)) ## only load once into RAM, then re-use | |
122 ## Number of NA in spectra matrix | |
123 NAcount = sum(is.na(int_matrix)) | |
124 ## replace NA with zero to calculate data properties based on intensity matrix, no change in msidata | |
125 int_matrix[is.na(int_matrix)] <- 0 | |
126 | |
120 ## Number of features (mz) | 127 ## Number of features (mz) |
121 maxfeatures = length(features(msidata)) | 128 maxfeatures = length(features(msidata)) |
122 ## Range mz | 129 ## Range mz |
123 minmz = round(min(mz(msidata)), digits=2) | 130 minmz = round(min(mz(msidata)), digits=2) |
124 maxmz = round(max(mz(msidata)), digits=2) | 131 maxmz = round(max(mz(msidata)), digits=2) |
129 maximumx = max(coord(msidata)[,1]) | 136 maximumx = max(coord(msidata)[,1]) |
130 ## Range y coordinates | 137 ## Range y coordinates |
131 minimumy = min(coord(msidata)[,2]) | 138 minimumy = min(coord(msidata)[,2]) |
132 maximumy = max(coord(msidata)[,2]) | 139 maximumy = max(coord(msidata)[,2]) |
133 ## Range of intensities | 140 ## Range of intensities |
134 minint = round(min(as.matrix(spectra(msidata)), na.rm=TRUE), digits=2) | 141 minint = round(min(int_matrix), digits=2) |
135 maxint = round(max(as.matrix(spectra(msidata)), na.rm=TRUE), digits=2) | 142 maxint = round(max(int_matrix), digits=2) |
136 ## Number of intensities > 0, for if conditions | 143 ## Number of intensities > 0, for if conditions |
137 npeaks= sum(as.matrix(spectra(msidata))>0, na.rm=TRUE) | 144 npeaks= sum(int_matrix>0) |
138 ## Number of NA in spectra matrix | 145 ## Number of NA in spectra matrix |
139 NAcount = sum(is.na(spectra(msidata))) | 146 infcount = sum(is.infinite(int_matrix)) |
140 ## Number of NA in spectra matrix | |
141 infcount = sum(is.infinite(as.matrix(spectra(msidata)))) | |
142 ## Number of duplicated coordinates | 147 ## Number of duplicated coordinates |
143 dupl_coord = sum(duplicated(coord(msidata))) | 148 dupl_coord = sum(duplicated(coord(msidata))) |
144 properties = c("Number of m/z features", | 149 properties = c("Number of m/z features", |
145 "Range of m/z values", | 150 "Range of m/z values", |
146 "Number of pixels", | 151 "Number of pixels", |