Question: How to subset SummarizedExperiment object with multiple experiments?
0
gravatar for Omar Mohamed
5 days ago by
Omar Mohamed0 wrote:

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?

rna-seq R • 48 views
ADD COMMENTlink written 5 days ago by Omar Mohamed0

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 is id here? I do not see exactly how filtering for rows of colData makes sense.

ADD REPLYlink modified 4 days ago • written 4 days ago by ATpoint44k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2078 users visited in the last hour
_