Hello,
in the CAGEr package, I defined a CTSS
(CAGE Transcription Start Site) subclass of GPos
as follows:
.CTSS <- setClass("CTSS", contains = "GPos")
My goal is to add some type safety to my functions, to prevent myself to run them on GPos objects that are not transcription start sites. Unfortunately, this breaks in the Bioc devel, with the following error:
Error in initialize(value, ...) :
'initialize' method returned an object of class “StitchedGPos” instead of the required class “CTSS”
How can I make a class that accepts both UnstitchedGPos
and StitchedGPos
inputs?