-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
How to control which SE assay to consider? #266
Comments
Hi Laurent, @lgatto I think that the easier and more general approach would be to separate your assays suppressPackageStartupMessages({
library(MultiAssayExperiment)
})
m1 <- matrix(1:12, ncol = 3)
logm1 <- log2(m1)
m2 <- matrix(rnorm(12), ncol = 3)
colnames(m1) <- colnames(logm1) <- colnames(m2) <- LETTERS[1:3]
se1 <- SummarizedExperiment(list(m1 = m1, logm1 = logm1))
se2 <- SummarizedExperiment(list(m2 = m2))
mae <- MultiAssayExperiment(ExperimentList(list(se1 = se1, se2 = se2)))
c(mae, logse = SummarizedExperiment(list(logm1 = logm1)), mapFrom = 1L)
#> Warning: Assuming column order in the data provided
#> matches the order in 'mapFrom' experiment(s) colnames
#> A MultiAssayExperiment object of 3 listed
#> experiments with user-defined names and respective classes.
#> Containing an ExperimentList class object of length 3:
#> [1] se1: SummarizedExperiment with 4 rows and 3 columns
#> [2] se2: SummarizedExperiment with 4 rows and 3 columns
#> [3] logse: SummarizedExperiment with 4 rows and 3 columns
#> Features:
#> experiments() - obtain the ExperimentList instance
#> colData() - the primary/phenotype DFrame
#> sampleMap() - the sample availability DFrame
#> `$`, `[`, `[[` - extract colData columns, subset, or experiment
#> *Format() - convert into a long or wide DFrame
#> assays() - convert ExperimentList to a SimpleList of matrices Created on 2020-01-28 by the reprex package (v0.3.0) And then use the Also it is quite possible to support a vector (and possibly even Best, |
From your reply, I conclude that the default/expected use case is to have one assay par MultiAssayExperiment assay. Thank you. |
I am wondering if the following scenario is relevant for your applications with MAE objects, and if there are any best practice or experimence of how to proceed.
The MAE below is composed of two SEs, the first one populated with 2 assays, the second one with 1:
How to control which SE assay to consider?
longFormat(mae)
, which is equivalent tolongFormat(mae, i = 1)
takes the first assays in each SE:The motivation behind this question is more general than
longFormat
above, but it illustrates my issue well.The text was updated successfully, but these errors were encountered: