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

Added mode to RmbSpectraSet

parent 2f74bd54
No related branches found
No related tags found
No related merge requests found
......@@ -252,6 +252,7 @@
},
set@children, analyzedSpec$msmsdata)
set@children <- as(children, "SimpleList")
set@mode <- analyzedSpec$mode
return(set)
},
spectra, analyzedSpecs)
......
......@@ -9,7 +9,8 @@
dbe = "numeric",
formulaCount = "integer",
dppm = "numeric",
dppmBest = "numeric"
dppmBest = "numeric",
ok = "logical"
),
contains=c("Spectrum2"),
prototype = prototype(
......@@ -23,6 +24,7 @@
formulaCount = integer(),
dppm = numeric(),
dppmBest = numeric(),
ok = logical(),
new("Versioned", versions=c(classVersion("Spectrum2"), RmbSpectrum2 = "0.1.0"))
),
)
......@@ -71,5 +73,5 @@
setGeneric("getData", function(s) standardGeneric("getData"))
setGeneric("setData", function(s, df) standardGeneric("setData"))
setGeneric("setData", function(s, df, ...) standardGeneric("setData"))
......@@ -20,7 +20,7 @@ setMethod("setData", c("RmbSpectrum2", "data.frame"), function(s, df, clean = TR
cols <- c("mz", "intensity", "satellite", "low", "rawOK", "good", "mzCalc", "formula", "dppm")
types <- c("mz" = "numeric", "intensity" = "numeric", "satellite" = "logical", "low" = "logical",
"rawOK" = "logical", "good" = "logical", "mzCalc" = "numeric", "formula" = "character",
"dppm" = "numeric"
"dppm" = "numeric", "ok" = "numeric"
)
s@peaksCount <- as.integer(nrow(df))
cols.inDf <- which(cols %in% colnames(df))
......@@ -33,7 +33,7 @@ setMethod("setData", c("RmbSpectrum2", "data.frame"), function(s, df, clean = TR
cols.no <- cols[cols.notinDf]
if(clean)
{
for(col in cols.df)
for(col in cols.no)
{
slot(s, col) <- c()
}
......
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