Closed cvanderaa closed 4 years ago
The issue is just that by providing the experiments
argument, MatchedAssayExperiment()
is expecting an ExperimentList
. Try this:
mae2 <- MatchedAssayExperiment(mae1)
Indeed this works. Thank you !
Maybe the MatchedAssayExperiment
documentation could be slightly adapted to avoid this confusion? But that's only a minor comment, I close the issue.
Marcel, @LiNk-NY, the confusion here arose from this length check:
which specifies that a single argument must be a MultiAssayExperiment
argument, but multiple arguments are arguments to the MultiAssayExperiment()
constructor. I wonder if this check creates more confusion than good - without out it, you would just have:
MatchedAssayExperiment <- function(...) {
listData <- list(...)
if (is(listData[[1L]], "MultiAssayExperiment")){
multiassay <- listData[[1L]]
} else {
multiassay <- MultiAssayExperiment(...)
}
multiassay <- .doMatching(multiassay)
new("MatchedAssayExperiment", multiassay)
}
Then you would rely on MultiAssayExperiment()
to return an informative error message, or you could add a try-catch to create something more specific. ?MatchedAssayExperiment
does not explicitly say that ...
are passed on to MultiAssayExperiment()
if more than one argument is given. Re-opening for now.
Hi, I'm trying to construct a
MatchedAssayExperiment
supplying only anExperimentList
object under theexperiment
parameter. Here is some code to reproduce my issue:Is this expected?