[Bioc-devel] A question on IRanges package

Yuan Luo yuan.hypnos.luo at gmail.com
Thu Apr 3 22:13:44 CEST 2014


Hi Michael,
Thanks for your reply! I covered setGeneric as well, attached is the
modified code.
My change is pretty simple, I want to support the o relation in Allen's
Interval algebra (http://en.wikipedia.org/wiki/Allen's_interval_algebra)
So I added one more filter option
    } else if (type == "o") {
        m <- m[start(query)[m[,1L]] < end(subject)[m[,2L]], , drop=FALSE]
    }

>From the stack trace, I suspect the method
definition setMethod("findOverlaps", c("RangesList", "IntervalForest"),
is not called upon, and the error happens before that, but since the stack
trace doesn't tell me in which file and which line each frame is, I am a
bit clueless. Is there anyway to reveal that information?

Best,
Yuan


On Thu, Apr 3, 2014 at 3:57 PM, Michael Lawrence
<lawrence.michael at gene.com>wrote:

>
>
>
> On Thu, Apr 3, 2014 at 11:33 AM, Yuan Luo <yuan.hypnos.luo at gmail.com>wrote:
>
>> Hi All,
>> Sorry for possible spam, but I am trying to customize IRanges package
>> locally. For what I am doing, I introduced another option to type
>> parameters to the findOverlaps method. In the file findOverlaps-methods.R,
>> I modified every instance of
>> type = c("any", "start", "end", "within", "equal"),
>> into
>> type = c("any", "start", "end", "within", "equal", "o"),
>>
>>
> I'm curious as to what "o" is supposed to do and wonder whether you really
> need to be making this modification. Tough to help without seeing any of
> your code. Probably, you just missed one, maybe the generic itself?
>
> Michael
>
>
>> But when I call
>> h = findOverlaps(varanges, rna_tree, type="o")
>>
>> I got the error
>> > h = findOverlaps(varanges, rna_tree, type="o")
>> Error in match.arg(type) :
>>   'arg' should be one of "any", "start", "end", "within", "equal"
>> with the following traceback information
>> > traceback()
>> 5: stop(gettextf("'arg' should be one of %s", paste(dQuote(choices),
>>        collapse = ", ")), domain = NA)
>> 4: match.arg(type)
>> 3: .local(query, subject, maxgap, minoverlap, type, select, ...)
>> 2: findOverlaps(varanges, rna_tree, type = "o")
>> 1: findOverlaps(varanges, rna_tree, type = "o")
>>
>> Is there any place that I missed where there is a default type vector
>> specification?
>> Also, how do you guys get R to display filename and line numbers for the
>> methods in the traceback stack?
>>
>> Best,
>> Yuan
>>
>>         [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> Bioc-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>
>
>


More information about the Bioc-devel mailing list