Hi Martin, Mike a DESeq2 user brought up the observation that when he subsets a ‘DESeqDataSet’ object (the class inherits from ‘SummarizedExperiment’) by samples, he often ends up with unused factor levels in the colData. (Esp. since the subsetting is often to select certain subgroups). Would either of the following two make sense:
- a ‘droplevels’ method for ‘SummarizedExperiment’ that efficiently and conveniently removes unused levels, i.e. x = x[, x$tissue %in% c(“guts”, “brains”)] x = droplevels(x) - a ‘droplevels’ argument (default: FALSE) x = x[, x$tissue %in% c(“guts”, “brains”), droplevels=TRUE] Wolfgang _______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel