Especially since it seems that
  assay()
has no option for dim names and therefore automatically removes them.

I vore for withDimNames = FALSE and also adding the option to assay() (or
remove it from assays())


On Tue, Jul 9, 2013 at 9:06 PM, Kasper Daniel Hansen <
kasperdanielhansen@gmail.com> wrote:

> Thanks for the answer, which explains the reasoning.  I will argue it is a
> design mistake to have withDimNames=TRUE as default as it destroys the nice
> work on not copying the assays.  If you want the return object to include
> dimnames per default I see no other reason than to store them in the assays
> (unlike now where they are stripped), which should not take up much memory,
> but will slow down the replacement methods for colnames and rownames.
>
> In the old bsseq I insisted on sampleNames (because they are super useful)
> and on not having rownames (because I have the granges coordinates).  Of
> course, that was just my choice for my application, and I fully understand
> not having dimnames at all.
>
> In case the above is super confusing, this is a very strong vote for
> having withDimNames=FALSE as the default.
>
> Kasper
>
>
>
>
> On Tue, Jul 9, 2013 at 6:34 PM, Martin Morgan <mtmorgan@fhcrc.org> wrote:
>
>> The problem is that the dimnames are stored in only one location, and
>> this is not on the assays. When you ask for the assays, the dimnames are
>> added, triggering a full copy of the data. If the dimnames are not of
>> interest, then
>>
>>   assays(BS, withDimnames=FALSE)
>>
>> This is not really ideal, so I'll give some thought to a better
>> implementation.
>>
>> Martin
>> ----- Kasper Daniel Hansen <kasperdanielhansen@gmail.com> wrote:
>> > Note the final "s" in assays.  It is super slow.  This is a BSseq object
>> > with 28M rows and 7 columns, which means there are two assays M and Cov
>> > each being 28M x 7 (which is pretty big, on the Gb scale)
>> >
>> > These two commands retrieve the same data as far as I understand.
>> >
>> > > system.time({BS@assays$field("data")})
>> >    user  system elapsed
>> >       0       0       0
>> > > system.time({assays(BS)})
>> >    user  system elapsed
>> >  19.677  10.436  30.114
>> >
>> > Follow up question:
>> >
>> > 1) It seems that all assays are stored in a SimpleList inside a
>> reference
>> > class.  If I only want to replace one of the assays, like
>> >   assay(Object, "NAME") <- value
>> > does this mean that all assays are being copied?  Is this different from
>> > say eSet where each assay is a matrix in an environment?
>> >
>> > 2) I think we need a convenience function for the assay names of a
>> > SummarizedExperiment.  (This is how I saw the issue above, I was using
>> > names(assays(Object)))
>> >
>> > Kasper
>> >
>> >       [[alternative HTML version deleted]]
>> >
>> > _______________________________________________
>> > Bioc-devel@r-project.org mailing list
>> > https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>
>>
>

	[[alternative HTML version deleted]]

