Skip to content
Back to formatted view

Raw Message

Message-ID: <8A208B7C-5FE3-486A-AB65-B8B4312EFA0F@embl.de>
Date: 2014-03-12T22:02:37Z
From: Wolfgang Huber
Subject: [Bioc-devel] 'droplevels' argument in `[` method for SummarizedExperiment?

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