Skip to content
Prev 4329 / 21312 Next

[Bioc-devel] deprecation of keepSeqlevels and renameSeqlevels

Hi Michael --
On 5/20/2013 5:56 AM, Michael Lawrence wrote:
I didn't really indicate what drove my desire to see keepSeqlevels deprecated. 
keepSeqlevels, seqlevels<-, and isActiveSeq were developed more or less 
independently, and have different contracts. The different contracts are 
confusing to the user, as is creating a usable help system when there are 
multiple end points for what is a common operation. The help pages of each were 
inadequate in different ways. And because the code was developed independently, 
support for different objects was inconsistent. So actually, yes, the 
maintenance (and use) burden for the previous state of affairs was substantial.

On the other hand, I agree that keepSeqlevels is convenient as a simple wrapper 
around seqlevels<-, in the same way that setNames and names<- are both useful.

So we could iterate to

   keepSeqlevels <-
       function(x, value, ...)
   {
       seqlevels(x, force=TRUE) <- value
       x
   }

but I'd be less enthusiastic about maintaining the original contract of 
keepSeqlevels, where keepSeqlevels(gr1, gr2), would have worked for two GRanges 
objects.

Martin