-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
o Add .processHistory slot, ProcessHistory class and functionality to track processing steps. o Add unit tests for subsetting, splitting and concatenating of xcmsSet objects checking that .processHistory slot is processed correctly. o Add showError method for xcmsSet objects that lists eventual errors during the feature detection step. o This addresses discussions in issue #55.
- Loading branch information
Showing
17 changed files
with
639 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,3 +175,8 @@ export( | |
"imputeLinInterpol", | ||
"useOriginalCode" | ||
) | ||
|
||
## New methods | ||
exportMethods( | ||
"showError" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
############################################################ | ||
## Functions for ProcessHistory objects | ||
|
||
############################################################ | ||
## Constructor | ||
ProcessHistory <- function(type., date., info., error., fileIndex.) { | ||
if (missing(type.)) | ||
type. <- .PROCSTEP.UNKNOWN | ||
if (missing(info.)) | ||
info. <- character() | ||
if (missing(error.)) | ||
error. <- NULL | ||
if (missing(date.)) | ||
date. <- date() | ||
if (missing(fileIndex.)) | ||
fileIndex. <- integer() | ||
return(new("ProcessHistory", type = type., info = info., | ||
date = date., error = error., | ||
fileIndex = as.integer(fileIndex.))) | ||
} | ||
|
||
############################################################ | ||
## updateFileIndex | ||
## Update the file index mapping index in 'old' to index in 'new' dropping | ||
## all indices that are not in 'new' | ||
updateFileIndex <- function(x, old = integer(), new = integer()) { | ||
if (length(old) == 0 & length(new) == 0) | ||
return(x) | ||
if (length(old) != length(new)) | ||
stop("Lengths of 'old' and 'new' don't match!") | ||
fidx <- x@fileIndex | ||
fidx <- fidx[fidx %in% old] | ||
if (length(fidx) == 0) | ||
stop("None of the file indices matches 'old'!") | ||
for (i in 1:length(fidx)) { | ||
fidx[i] <- new[old == fidx[i]] | ||
} | ||
x@fileIndex <- fidx | ||
return(x) | ||
} |
Oops, something went wrong.