drisso / SingleCellExperiment

Clone of the Bioconductor repository for the SingleCellExperiment package, see https://bioconductor.org/packages/devel/bioc/html/SingleCellExperiment.html for the official development version.
63 stars 17 forks source link

Remove non-used slots #51

Closed jgarces02 closed 4 years ago

jgarces02 commented 4 years ago

Hi @drisso,

Thanks for so usefull class! That's a very (simply, I hope) question: is there any way to remove those slots not used in my SingleCellExperiment (for example, the spikeNames(0) one?

Thanks in advance for your help. Regards.

LTLA commented 4 years ago

You can't "remove" slots from a class. They are always there, just empty. Otherwise, downstream code would have to check whether the slot exists before trying to access it, and at that point, the concept of a class falls apart - we might as well stuff data into a list and work with that.

In any case, the point is moot because the latest version of the package does not have a dedicated slot for spike-ins. This concept has now been generalized to the altExps() idea.

jgarces02 commented 4 years ago

Perfectly logical. Thanks anyway!