lcolladotor/derfinder

Problem with fullCoverage function

PietaSchofield opened this issue · 3 comments

Hullo

I am trying to use derfinder to find differentially enriched regions in some human histone mark chip-seq data. I have bam files that were created with STAR and indexed with samtools. I have an odd issue that when I call fullCoverage on a file and specify chromosome "1" it works fine (it also works for chromosome "20", "21", "X" and "Y" but if I try chromosome "2" or "10" I get the following error

fulCov <- fullCoverage(bamFiles,"2",cutoff=2)
2015-03-03 13:15:30 fullCoverage: processing chromosome 2
2015-03-03 13:15:30 loadCoverage: finding chromosome lengths
Error: 1 errors; first error:
Error in .Call2("solve_user_SEW0", start, end, width, PACKAGE = "IRanges"): solving row 2: range cannot be determined from the supplied arguments (too many NAs)

For more information, use bplasterror(). To resume calculation, re-call
the function and set the argument 'BPRESUME' to TRUE or wrap the
previous call in bpresume().

First traceback:
20: fullCoverage(bamFiles, "2", cutoff = 2)
19: bplapply(seq_len(length(chrs)), loadChr, files = files, chrs = chrs,
bai = bai, chrlens = chrlens, outputs = outputs, cutoff = cutoff,
mc.cores.load = mc.cores.load, ..., BPPARAM = BPPARAM)
18: bplapply(seq_len(length(chrs)), loadChr, files = files, chrs = chrs,
bai = bai, chrlens = chrlens, outputs = outputs, cutoff = cutoff,
mc.cores.load = mc.cores.load, ..., BPPARAM = BPPARAM)
17: lapply(X, FUN, ...)
16: lapply(X, FUN, ...)
15: FUN(1L[[1L]], ...)
14: .try(FUN(...))
13: withRestarts(withCallingHandler

any advice would be gratefully received

Pietà

sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
[1] LC_CTYPE=en_GB LC_NUMERIC=C LC_TIME=en_GB
[4] LC_COLLATE=en_GB LC_MONETARY=en_GB LC_MESSAGES=en_GB
[7] LC_PAPER=en_GB LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_GB LC_IDENTIFICATION=C

attached base packages:
[1] stats4 parallel grDevices datasets splines graphics utils
[8] stats grid methods base

other attached packages:
[1] BiocInstaller_1.16.1 IRanges_1.99.31 S4Vectors_0.2.5
[4] BiocGenerics_0.11.5 derfinder_0.99.5 knitr_1.6
[7] Hmisc_3.14-5 Formula_1.1-2 survival_2.37-7
[10] lattice_0.20-29

loaded via a namespace (and not attached):
[1] acepack_1.3-3.3 AnnotationDbi_1.27.19 base64enc_0.1-2
[4] BatchJobs_1.4 BBmisc_1.7 Biobase_2.25.0
[7] BiocParallel_0.99.25 biomaRt_2.21.5 Biostrings_2.33.14
[10] bitops_1.0-6 brew_1.0-6 bumphunter_1.5.5
[13] checkmate_1.4 cluster_1.15.3 codetools_0.2-9
[16] DBI_0.3.1 derfinderHelper_0.99.2 digest_0.6.4
[19] doRNG_1.6 evaluate_0.5.5 fail_1.2
[22] foreach_1.4.2 foreign_0.8-61 formatR_1.0
[25] futile.logger_1.3.7 futile.options_1.0.0 GenomeInfoDb_1.1.25
[28] GenomicAlignments_1.1.30 GenomicFeatures_1.17.20 GenomicFiles_1.1.19
[31] GenomicRanges_1.17.46 iterators_1.0.7 lambda.r_1.1.6
[34] latticeExtra_0.6-26 locfit_1.5-9.1 Matrix_1.1-4
[37] matrixStats_0.10.0 nnet_7.3-8 pkgmaker_0.22
[40] qvalue_1.39.1 R.methodsS3_1.6.1 RColorBrewer_1.0-5
[43] RCurl_1.95-4.3 registry_0.2 rngtools_1.2.4
[46] rpart_4.1-8 Rsamtools_1.17.34 RSQLite_0.11.4
[49] rtracklayer_1.25.19 sendmailR_1.2-1 stringr_0.6.2
[52] tools_3.1.1 XML_3.98-1.1 xtable_1.7-4
[55] XVector_0.5.8 zlibbioc_1.11.1

Hello Pietà,

I see that you are using R 3.1.1 with derfinder 0.99.5 The latest version for R 3.1.1 is 1.0.10 and you can install it from Bioconductor using:

source("http://bioconductor.org/biocLite.R")
biocLite("derfinder")

I believe this bug is addressed by the fixes introduced in versions 1.0.3 and 1.0.4 described further at https://github.com/lcolladotor/derfinder/blob/release/NEWS

Best,
Leo

Thanks Leo that has indeed fixed it.