Browse code

Merge pull request #270 from jorainer/issue_269

fix: read full spectra data in get3DMap (issue #269)

Steffen Neumann authored on 24/05/2022 08:42:57 • GitHub committed on 24/05/2022 08:42:57
Showing2 changed files

... ...
@@ -202,3 +202,9 @@ test_getScanHeaderInfo <- function() {
202 202
 
203 203
     close(mzml)
204 204
 }
205
+
206
+test_get3Dmap <- function() {
207
+    ms <- openMSfile(system.file("microtofq", "MM14.mzML", package = "msdata"))
208
+    td <- get3Dmap(ms, scans = 1:100, lowMz = 100, highMz = 1000, resMz = 1)
209
+    checkTrue(any(td > 0))
210
+}
... ...
@@ -1013,7 +1013,7 @@ Rcpp::NumericMatrix RcppPwiz::get3DMap ( std::vector<int> scanNumbers, double wh
1013 1013
       //Rprintf("%d\n",1);
1014 1014
       for (int i = 0; i < scanNumbers.size(); i++)
1015 1015
         {
1016
-	  SpectrumPtr s = slp->spectrum(scanNumbers[i] - 1, DetailLevel_FullMetadata);
1016
+	  SpectrumPtr s = slp->spectrum(scanNumbers[i] - 1, DetailLevel_FullData);
1017 1017
 	  vector<MZIntensityPair> pairs;
1018 1018
 	  s->getMZIntensityPairs(pairs);
1019 1019