[Bioc-devel] GenomicFeatures::extractTranscriptSeqs setMethod suggestion

Rainer Johannes Johannes.Rainer at eurac.edu
Mon Jan 18 15:46:34 CET 2016


Dear all,

I’m having hard times to extend the extractTranscriptSeqs method implemented in GenomicFeatures. Basically, I would like to implement a method for signature(x="ANY”, transcripts="EnsDb”), so that I can re-use the method from GenomicFeatures and add the optional parameter “filter” which would allow to further specify from which transcripts the sequence should be returned.
The problem is that when I try e.g. to define a extractTranscrptSeqs method with transcripts being an EnsDb object:

setMethod("extractTranscriptSeqs",
          signature(x="ANY", transcripts="EnsDb"),
          function(x, transcripts, filter){
              return(extractTranscriptSeqs(x, transcripts, filter=list()))
          })


I get the error:

** preparing package for lazy loading
Error in match.call(definition, call, expand.dots, envir) : 
  unused argument (transcripts = c("EnsDb", "ensembldb"))
Error : unable to load R code in package ‘ensembldb’

It would make life easier for me, if the generic in GenomicFeatures would be defined as:

setGeneric("extractTranscriptSeqs",
    function(x, transcripts, ...) standardGeneric("extractTranscriptSeqs")
)
Instead of

setGeneric("extractTranscriptSeqs", signature="x",
    function(x, transcripts, ...) standardGeneric("extractTranscriptSeqs")
)

Since that seems to solve my problem. There might however also be an alternative solution which I’m not aware of.

Thanks for help or any alternative solutions!

jo


More information about the Bioc-devel mailing list