Skip to content

Commit

Permalink
fix: read full spectra data in get3DMap (issue sneumann#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorainer committed May 24, 2022
1 parent 4745773 commit a0a9a8e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions inst/unitTests/test_pwiz.R
Expand Up @@ -202,3 +202,9 @@ test_getScanHeaderInfo <- function() {

close(mzml)
}

test_get3Dmap <- function() {
ms <- openMSfile(system.file("microtofq", "MM14.mzML", package = "msdata"))
td <- get3Dmap(ms, scans = 1:100, lowMz = 100, highMz = 1000, resMz = 1)
checkTrue(any(td > 0))
}
2 changes: 1 addition & 1 deletion src/RcppPwiz.cpp
Expand Up @@ -1013,7 +1013,7 @@ Rcpp::NumericMatrix RcppPwiz::get3DMap ( std::vector<int> scanNumbers, double wh
//Rprintf("%d\n",1);
for (int i = 0; i < scanNumbers.size(); i++)
{
SpectrumPtr s = slp->spectrum(scanNumbers[i] - 1, DetailLevel_FullMetadata);
SpectrumPtr s = slp->spectrum(scanNumbers[i] - 1, DetailLevel_FullData);
vector<MZIntensityPair> pairs;
s->getMZIntensityPairs(pairs);

Expand Down

0 comments on commit a0a9a8e

Please sign in to comment.