Skip to content
Prev 8314 / 21307 Next

[Bioc-devel] Unexpected behaviour with Assays and Vector classes

Hi Herve,

I would have expected GRanges behaviour, where the metadata is affected
by the replacement. For example, with GRanges objects, I often use the
metadata to store statistics or descriptors relevant to each genomic
interval, e.g., peak scores, log-fold changes and so on. If I did a
replacement to change the genomic coordinates, I would expect that the
associated metadata would come along for the ride. The same argument
would be applied to other classes derived from Vector.

I should add that I encountered this problem in the context of doing
subset replacement for metadata. To re-use your IRanges example:
[1] 1 2 3 4

I would expect that the first entry of "stuff" would now be 2. But
because metadata doesn't get replaced during subset replacement, it
remains at 1. This is problematic, because if I wanted to update a
subset of entries in the metadata, I would use something similar to the
above replacement and expect it to change the existing object.

Cheers,

Aaron
Herv? Pag?s wrote: