Skip to content

Commit

Permalink
Respect application overrides when saving SE base from the RSE method.
Browse files Browse the repository at this point in the history
  • Loading branch information
LTLA committed May 21, 2024
1 parent f48c749 commit d038c27
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: alabaster.se
Title: Load and Save SummarizedExperiments from File
Version: 1.5.0
Date: 2024-02-21
Version: 1.5.1
Date: 2024-05-20
Authors@R: person("Aaron", "Lun", role=c("aut", "cre"), email="[email protected]")
License: MIT + file LICENSE
Description:
Expand Down
6 changes: 5 additions & 1 deletion R/saveRangedSummarizedExperiment.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ NULL
#' @importFrom SummarizedExperiment rowRanges
#' @importFrom S4Vectors mcols<-
setMethod("saveObject", "RangedSummarizedExperiment", function(x, path, ...) {
callNextMethod()
# Can't use callNextMethod() as we want to dispatch on application
# overrides; to avoid potential infinite recursion from the override
# calling back to saveObject, we explicitly cast to the base class.
base <- as(x, "SummarizedExperiment")
altSaveObject(base, path, ...)

if (!emptyRowRanges(x)) {
rr <- rowRanges(x)
Expand Down
7 changes: 7 additions & 0 deletions inst/NEWS.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
\name{alabaster.se News}
\title{alabaster.se News}
\encoding{UTF-8}

\section{Version 1.6.0}{\itemize{
\item Respect application-level overrides when saving the SummarizedExperiment base from the RangedSummarizedExperiment's \code{saveObject} method.
}}

0 comments on commit d038c27

Please sign in to comment.