Entering edit mode
3.3 years ago
Omar Mohamed
•
0
I have a big SummarizedExperiment object. I want to subset all of the tables based on the information in the colData. I think there should be an efficient way rather than piping filters like:
filter <- colData(dat)[id ,which(colData(dat)$parameter) == "cancer" ]
cancer <- assays(dat)[,filter]
Now, I need to do that for all the values of parameter
. There should be a complete function somewhere to automate this process and be memory efficient.
Any ideas?
dat[,dat$parameter == "cancer"]
will subset the entire SE. You can then extract assays as you like. The idea of SE is exactly that, so not having the need to filter every assay but one filter call on the entire object subsets all assays, all colData etc. What isid
here? I do not see exactly how filtering for rows of colData makes sense.