diff --git a/R/FamiliarObjectUpdate.R b/R/FamiliarObjectUpdate.R index b5893922..4d7b3ac4 100644 --- a/R/FamiliarObjectUpdate.R +++ b/R/FamiliarObjectUpdate.R @@ -277,6 +277,19 @@ setMethod( }) } + if (tail(object@familiar_version, n = 1L) < "1.5.0") { + # Update feature_expressions slot by iterating over its contents. This is + # to account for changes in transformation objects, introduced with 1.5.0. + object@feature_expressions <- lapply( + object@feature_expressions, + function(x) { + x@feature_info <- update_object(x@feature_info) + + return(x) + } + ) + } + if (!methods::validObject(object)) { stop("Could not update the familiarData object to the most recent definition.") } @@ -377,6 +390,19 @@ setMethod( }) } + if (tail(object@familiar_version, n = 1L) < "1.5.0") { + # Update feature_expressions slot by iterating over its contents. This is + # to account for changes in transformation objects, introduced with 1.5.0. + object@feature_expressions <- lapply( + object@feature_expressions, + function(x) { + x@feature_info <- update_object(x@feature_info) + + return(x) + } + ) + } + if (!methods::validObject(object)) { stop("Could not update the familiarCollection object to the most recent definition.") }