[Bioc-sig-seq] BSGenome: Intermittent failure in getSeq, matchPattern and findOverlaps

Aaron Statham a.statham at garvan.org.au
Mon Mar 8 10:30:26 CET 2010


Hi All,

For the last few days I've been coming across a show-stopping bug when
performing sequence analysis using BSgenome - my code fails either in
getSeq, matchPattern or findOverlaps in a completely intermittent way,
with the only consistent error message being inside either a get() or
assign() call:

"formal argument "envir" matched by multiple actual arguments"

Apparently an internal R problem which gave rise to this error was
fixed in June last year (see
http://tolstoy.newcastle.edu.au/R/e6/devel/09/06/2080.html ), but as
you can see from my examples below I'm running into it with R 2.10.1
and the latest svn R 2.11.0. It usually fails after anywhere from 40
to 500 iterations of the test case below

Any suggestions/workarounds? Or would this be better posted to the
R-devel list?
Aaron

Test case script
-----------------------
library(BSgenome.Hsapiens.UCSC.hg18)
i<-0
repeat{
       i <- i+1
       x <- getSeq(Hsapiens, "chr1", rep(100,10000), rep(500,10000))
}
traceback()
sessionInfo()
cat(i, "\n")


R 2.10.1 example output
-----------------------------------
> library(BSgenome.Hsapiens.UCSC.hg18)
Loading required package: BSgenome
Loading required package: IRanges

Attaching package: 'IRanges'


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

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

Loading required package: Biostrings
>
> i<-0
> repeat{
+ i <- i+1
+ x <- getSeq(Hsapiens, "chr1", rep(100,10000), rep(500,10000))
+ }
Error in get("disabled", envir = .validity_options) :
 formal argument "envir" matched by multiple actual arguments
> traceback()
21: get("disabled", envir = .validity_options)
20: disableValidity()
19: validityMethod(object)
18: identical(x, TRUE)
17: anyStrings(validityMethod(object))
16: validObject(.Object)
15: initialize(value, ...)
14: initialize(value, ...)
13: new(...)
12: new2("GroupedIRanges", shift(ranges, xvector at offset), group = ranges_group,
       check = FALSE)
11: IRanges:::unsafe.newXVectorList1(classname, xvector, ranges)
10: unsafe.newXStringSet(subject(x), ans_ranges, use.names = TRUE,
       names = names(ans_ranges))
9: XStringViewsToSet(x, use.names, verbose = check.limits)
8: .local(x, ...)
7: as.character(Views(subject, solved_SEW))
6: FUN("chr1"[[1L]], ...)
5: lapply(REFSEQnames, extractSeqsFromREFSEQ)
4: lapply(REFSEQnames, extractSeqsFromREFSEQ)
3: .local(x, ...)
2: getSeq(Hsapiens, "chr1", rep(100, 10000), rep(500, 10000))
1: getSeq(Hsapiens, "chr1", rep(100, 10000), rep(500, 10000))
> sessionInfo()
R version 2.10.1 (2009-12-14)
x86_64-pc-linux-gnu

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] BSgenome.Hsapiens.UCSC.hg18_1.3.16 BSgenome_1.14.2
[3] Biostrings_2.14.7                  IRanges_1.4.7

loaded via a namespace (and not attached):
[1] Biobase_2.6.0
> cat(i, "\n")
401


R 2.11.0 example output
-------------------------------------
> library(BSgenome.Hsapiens.UCSC.hg18)
Loading required package: BSgenome
Loading required package: IRanges

Attaching package: 'IRanges'

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

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

Loading required package: Biostrings
>
> i<-0
> repeat{
+ i <- i+1
+ x <- getSeq(Hsapiens, "chr1", rep(100,10000), rep(500,10000))
+ }
Error in assign(".target", method at target, envir = envir) :
 formal argument "envir" matched by multiple actual arguments
> traceback()
18: assign(".target", method at target, envir = envir)
17: loadMethod(function (x, table)
   match(x, table, nomatch = 0L) > 0L, "%in%", <environment>)
16: loadMethod(function (x, table)
   match(x, table, nomatch = 0L) > 0L, "%in%", <environment>)
15: argnames %in% c("", NA)
14: extraArgsAsList(valid_argnames, ...)
13: unsafe.update(x, start = ans_start, width = ans_width, names = ans_names)
12: restrict(as(x, "IRanges"), start = 1L, end = nchar(subject(x)),
       keep.all.ranges = TRUE, use.names = use.names)
11: restrict(as(x, "IRanges"), start = 1L, end = nchar(subject(x)),
       keep.all.ranges = TRUE, use.names = use.names)
10: XStringViewsToSet(x, use.names, verbose = check.limits)
9: .local(x, ...)
8: as.character(Views(subject, solved_SEW))
7: as.character(Views(subject, solved_SEW))
6: FUN("chr1"[[1L]], ...)
5: lapply(REFSEQnames, extractSeqsFromREFSEQ)
4: lapply(REFSEQnames, extractSeqsFromREFSEQ)
3: .local(x, ...)
2: getSeq(Hsapiens, "chr1", rep(100, 10000), rep(500, 10000))
1: getSeq(Hsapiens, "chr1", rep(100, 10000), rep(500, 10000))
> sessionInfo()
R version 2.11.0 Under development (unstable) (2010-03-07 r51225)
x86_64-unknown-linux-gnu

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] BSgenome.Hsapiens.UCSC.hg18_1.3.16 BSgenome_1.15.12
[3] Biostrings_2.15.22                 IRanges_1.5.54

loaded via a namespace (and not attached):
[1] Biobase_2.7.5
> cat(i, "\n")
177



--
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 at garvan.org.au



More information about the Bioc-sig-sequencing mailing list