On 03 May 2016, at 18:51, Martin Morgan <Martin.Morgan at roswellpark.org> wrote:
On 05/02/2016 03:46 AM, Rainer Johannes wrote:
Hi Herve,
passing down additional arguments to the internal exonsBy, cdsBy,
fiveUTRsByTranscript and threeUTRsByTranscript would do it! That
would be great, thanks.
Hi Johannes --
Lori (cc'd, a new team member) and I are working on this.
The easiest thing to do is add '...' to the transcriptLengths argument list, and to pass this to transcripts, exonsBy, etc.
The only obstacle is that 'tx_name' (in the call to transcripts()) plays a central role in TxDb, but is not supported by EnsDb. Is it reasonable for you to add support for tx_name as a column (maybe a simple alias to tx_id, so no need for schema change)?
Martin & Lori
On 02 May 2016, at 07:38, Herv? Pag?s <hpages at fredhutch.org>
wrote:
Hi Johannes,
We can make transcriptLengths() a generic but isn't the situation
similar to the extractTranscriptSeqs() situation that you brought
in January
(https://stat.ethz.ch/pipermail/bioc-devel/2016-January/008570.html)
for which adding the ellipsis to the argument list of the function
and proper forwarding of the extra arguments did the trick? In the
case of transcriptLengths() the extra arguments would be forwarded
to the internal calls to transcripts(), exonsBy(), cdsBy(),
fiveUTRsByTranscript(), and threeUTRsByTranscript(), and so
transcriptLengths() would work out-of-the-box on EnsDb objects.
Would that work?
H.
On 04/30/2016 04:05 AM, Rainer Johannes wrote:
Dear all,
I was wondering, you think it would be possible to make the
transcriptLength function in GenomicFeatures a method and export
that? Reason is that I have also implemented a transcriptLength
function (actually presently a method in order to allow that to
be used for EnsDb and TxDb objects), but this causes the warning
The following object is masked from 'package:GenomicFeatures':
transcriptLengths
on package loading.
Just in case, that?s the code from my package:
if(!isGeneric("transcriptLengths"))
setGeneric("transcriptLengths", function(x, with.cds_len=FALSE,
with.utr5_len=FALSE, with.utr3_len=FALSE, ...)
standardGeneric("transcriptLengths?))
setMethod("transcriptLengths", "EnsDb", function(x,
with.cds_len=FALSE, with.utr5_len=FALSE, with.utr3_len=FALSE,
filter=list()){ return(.transcriptLengths(x,
with.cds_len=with.cds_len, with.utr5_len=with.utr3_len,
with.utr3_len=with.utr3_len, filter=filter)) })
cheers, jo