Skip to content
Prev 11650 / 21312 Next

[Bioc-devel] assay dimnames in SingleCellExperiment / SummarizedExperiment

Hi Aaron,

Yes - sorry, I meant the names of dimnames. Dimnames are indeed checked,
but my code was meant to demonstrate that names of dimnames aren't.
Obviously, it's not the end of the world, but just something I noticed
while I was investigating the glitch.

My second point is not that much about calling dim or dimnames, but rather
about the side-effects of having names(dimnames(x)) not NULL, such as the
case of `reshape2::melt`.
I think it'd be one worry less for downstream methods to 'know' the
colnames of a melted assay(x, 1) instead of having "Var1, Var2, value" if
names(dimnames) is NULL, and "something else" if not NULL.

Beyond aesthetics, it's really just semantics, but I do think small stuff
like that, if handled at a higher class level, can encourage downstream
developers to work off a more consistent mental and computational model (my
take from Michael Lawrence's BOF at Bioc2017). In other words, it has a
small cost to implement in the parent class, instead of if-else statements
in each child class.

It could be something as simple as :

   - c("Feature", "Sample") at the `SummarizedExperiment` level
   - overriden by c("Feature", "Cell") in `SingleCellExperiment`
   - overriden by developer's choice in other dependent packages.


All the best,
Kevin
On Sat, Sep 16, 2017 at 6:43 AM, Aaron Lun <alun at wehi.edu.au> wrote:

            

  
  
Message-ID: <CAJ3Kd8sC8Hg4OvijuzoyR8vWfnYLxDfMGo_+Gud-AeADLJ5hkw@mail.gmail.com>
In-Reply-To: <SYXPR01MB169661C5F7F6F6DF3FA331CA9F6D0@SYXPR01MB1696.ausprd01.prod.outlook.com>