[Bioc-devel] GenomicFeatures::extractTranscriptSeqs setMethod suggestion

Rainer Johannes Johannes.Rainer at eurac.edu
Wed Jan 20 08:51:22 CET 2016


Thanks Hervé!

I’ll check it out but don’t expect any problems.

cheers, jo

> On 19 Jan 2016, at 22:31, Hervé Pagès <hpages at fredhutch.org> wrote:
> 
> Hi Jo,
> 
> In GenomicFeatures 1.23.18 I've modified the default
> "extractTranscriptSeqs" method so it can be called with additional
> arguments when the 2nd argument in not a GRangesList object. These
> additional arguments then get passed to the internal call to exonsBy().
> With this change, the user should be able to use extractTranscriptSeqs()
> on an EnsDb object and specify any additional argument that is
> accepted by the "exonsBy" method for EnsDb objects.
> 
> Let me know if you run into problems with this.
> 
> Cheers,
> H.
> 
> On 01/18/2016 06:46 AM, Rainer Johannes wrote:
>> 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
>> _______________________________________________
>> Bioc-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>> 
> 
> -- 
> Hervé Pagès
> 
> Program in Computational Biology
> Division of Public Health Sciences
> Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N, M1-B514
> P.O. Box 19024
> Seattle, WA 98109-1024
> 
> E-mail: hpages at fredhutch.org
> Phone:  (206) 667-5791
> Fax:    (206) 667-1319



More information about the Bioc-devel mailing list