Skip to content
Snippets Groups Projects
Commit 7f80a2d6 authored by Michele Stravs's avatar Michele Stravs
Browse files

headerCache fix 3 and "partially matched" fix

parent 2128ad84
No related branches found
No related tags found
No related merge requests found
......@@ -1375,9 +1375,9 @@ recalibrateSpectra <- function(mode, rawspec = NULL, rc = NULL, rc.ms1=NULL, w =
colnames(p) <- c("mzFound", "int")
drecal <- predict(rc.ms1, newdata= p)
if(recalibrateBy == "dppm")
p$mzRecal <- p$mz / ( 1 + drecal/1e6 )
p$mzRecal <- p$mzFound / ( 1 + drecal/1e6 )
else
p$mzRecal <- p$mz - drecal
p$mzRecal <- p$mzFound - drecal
colnames(p) <- c("mz", "int", "mzRecal")
}
p <- as.matrix(p)
......@@ -1404,9 +1404,9 @@ recalibrateSingleSpec <- function(spectrum, rc,
colnames(p) <- c("mzFound", "int")
drecal <- predict(rc, newdata= p)
if(recalibrateBy == "dppm")
p$mzRecal <- p$mz / ( 1 + drecal/1e6 )
p$mzRecal <- p$mzFound / ( 1 + drecal/1e6 )
else
p$mzRecal <- p$mz - drecal
p$mzRecal <- p$mzFound - drecal
# And rename them back so our "mz" column is
# called "mz" again
colnames(p) <- c("mz", "int", "mzRecal")
......
......@@ -249,17 +249,17 @@ findMsMsHR.direct <- function(msRaw, cpdID, mode = "pH", confirmMode = 0, useRtL
,fillPrecursorScan, deprofile)
# check whether a) spectrum was found and b) enough spectra were found
if(length(spectra) < (confirmMode + 1))
sp <- new("RmbSpectraSet", found=FALSE)
sp <- list(foundOK = FALSE)
else
sp <- spectra[[confirmMode + 1]]
#sp@mz <- mzLimits
sp@id <- as.integer(cpdID)
sp@name <- findName(cpdID)
sp@formula <- findFormula(cpdID)
sp$mz <- mzLimits
sp$id <- cpdID
sp$formula <- findFormula(cpdID)
return(sp)
}
#' Read in mz-files using XCMS
#'
#' Picks peaks from mz-files and returns the pseudospectra that CAMERA creates with the help of XCMS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment