You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Along with the new object-oriented API a class union GsvaExprData was created for storing various expression data objects within parameter objects. Among others, classes SummarizedExperiment and SingleCellExperiment are part of this union and SpatialExperiment has recently been added in a dedicated branch.
Since SpatialExperiment inherits from SingleCellExperiment and SingleCellExperiment inherits from SummarizedExperiment, it would be desirable to reuse S4 methods for SummarizedExperiments on instances of the derived classes. Otherwise numerous methods for SummarizedExperiment will need to have identical definitions for SingleCellExperiment and SpatialExperiment as well as potential future class union members. However, with the current definition of the class union, S4 dispatches to GsvaExprData (instead of SummarizedExperiment) methods (AFAIU) because the derived classes are part of the class union.
Removing e.g.SingleCellExperiment from GsvaExprData solves this and SummarizedExperiment methods will be applied to SingleCellExperiment objects as expected while GsvaExprData can still be used for storage in parameter objects. Unfortunately, a number of new issues with method dispatch arises as a consequence of this change, in particular with methods show() and wrapData() and maybe more as yet undetected.
Hence, can we get this to work as expected and is it worth the effort?
The text was updated successfully, but these errors were encountered:
Along with the new object-oriented API a class union
GsvaExprData
was created for storing various expression data objects within parameter objects. Among others, classesSummarizedExperiment
andSingleCellExperiment
are part of this union andSpatialExperiment
has recently been added in a dedicated branch.Since
SpatialExperiment
inherits fromSingleCellExperiment
andSingleCellExperiment
inherits fromSummarizedExperiment
, it would be desirable to reuse S4 methods forSummarizedExperiments
on instances of the derived classes. Otherwise numerous methods forSummarizedExperiment
will need to have identical definitions forSingleCellExperiment
andSpatialExperiment
as well as potential future class union members. However, with the current definition of the class union, S4 dispatches toGsvaExprData
(instead ofSummarizedExperiment
) methods (AFAIU) because the derived classes are part of the class union.Removing e.g.
SingleCellExperiment
fromGsvaExprData
solves this andSummarizedExperiment
methods will be applied toSingleCellExperiment
objects as expected whileGsvaExprData
can still be used for storage in parameter objects. Unfortunately, a number of new issues with method dispatch arises as a consequence of this change, in particular with methodsshow()
andwrapData()
and maybe more as yet undetected.Hence, can we get this to work as expected and is it worth the effort?
The text was updated successfully, but these errors were encountered: