Hi,

Ran into an intermittent bug in findOverlaps when using select="arbitrary" -
I managed to narrow it down the problem to the C call

> library(IRanges)

Attaching package: 'IRanges'

The following object(s) are masked from 'package:base':

    cbind, eval, Map, mapply, order, paste, pmax, pmax.int, pmin,
    pmin.int, rbind, rep.int, table

> temp <- IRanges(sample(10000000, 100000), width=10000)
> for (i in 1:1000000) xx <- findOverlaps(temp, IntervalTree(temp),
select="arbitrary")
Error in .IntervalTreeCall(subject, fun, query, query_ord) :
  INTEGER() can only be applied to a 'integer', not a 'character'
> i
[1] 7
> traceback()
5: .Call(fun, object@ptr, ..., PACKAGE = "IRanges")
4: .IntervalTreeCall(subject, fun, query, query_ord)
3: .local(query, subject, maxgap, minoverlap, type, select, ...)
2: findOverlaps(temp, IntervalTree(temp), select = "arbitrary")
1: findOverlaps(temp, IntervalTree(temp), select = "arbitrary")
> sessionInfo()
R version 2.12.0 Under development (unstable) (2010-07-06 r52460)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_AU.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_AU.UTF-8        LC_COLLATE=en_AU.UTF-8
 [5] LC_MONETARY=C              LC_MESSAGES=en_AU.UTF-8
 [7] LC_PAPER=en_AU.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] IRanges_1.7.32


Thanks,
Aaron

-- 
Aaron Statham
Postgraduate Scholar, Cancer Epigenetics
Garvan Institute of Medical Research   Tel: (02) 9295 8393
384 Victoria St Darlinghurst 2010   Fax: (02) 9295 8316
NSW Australia         email: a.statham@garvan.org.au

	[[alternative HTML version deleted]]

