sa-lee/plyexperiment

Support MultiAssayExperiment

Closed this issue · 2 comments

This might be as simple as not relying on colnames(object) (which does something different for MAE) but rather calling rownames(colData(x)) with the same result, which does support MAE

rownames(pd) <- colnames(object)

This

mutate_col <- function(object, ...) {
  pd <- as.data.frame(colData(object))
  pd <- mutate(pd, ...)
  rownames(pd) <- rownames(colData(object))
  colData(object) <- DataFrame(pd)
  object
}

seems to work fine on an MAE as well as a SE for mutate_col and rename_col (with this change), while filter_col and arrange_col already work as-is.

A select_col would also require the same alteration, but would work nicely.

I will try to make a simple PR sometime if you like.

That would be great, the plan was to support MAE at some point. I am working on many other things at the moment so this project has taken the back seat for quite a while. PRs and contributions are always welcome!