-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
I'm not quite sure why I did this, but the current code at
SummarizedExperiment/R/combine-methods.R
Line 244 in 8df9772
| metadata=unlist(lapply(all.se, metadata), recursive=FALSE, use.names=FALSE), |
wipes out the names of the metadata list, e.g.,
example(SummarizedExperiment, verbose=FALSE)
metadata(se) <- list(A=1, B=2, C=3)
rownames(se) <- seq_len(nrow(se))
combined <- combineCols(se, se)
metadata(combined)
## [[1]]
## [1] 1
##
## [[2]]
## [1] 2
##
## [[3]]
## [1] 3
##
## [[4]]
## [1] 1
##
## [[5]]
## [1] 2
##
## [[6]]
## [1] 3Oops. Same issue affects both SEs and RSEs at their respective methods.
It should be easily fixable by just doing something like this:
all.meta <- lapply(all.se, metadata)
names(all.meta) <- NULL # or unname, I suppose
combined.meta <- unlist(all.meta, recursive=FALSE)And then using that in the args list. This eliminates the names from the argument list of combineCols(...), while preserving the list names inside the metadata() for each SE. This gives a relatively nicer:
metadata(combined)
## $A
## [1] 1
##
## $B
## [1] 2
##
## $C
## [1] 3
##
## $A
## [1] 1
##
## $B
## [1] 2
##
## $C
## [1] 3Duplicate names... oh well, we'll just have to put up with it.
Metadata
Metadata
Assignees
Labels
No labels