Question: RStudio quits unexpectedly while running DiffBind on R 3.4.0
gravatar for msabbag2
2.5 years ago by
msabbag20 wrote:

I recently updated R to 3.4.0 and RStudio to 1.0.143. After doing so, I noticed that when I try to read in a peakset using DiffBind, RStudio will quit unexpectedly. 

The command that causes the quit:

peakset = dba(sampleSheet = "expinfo.csv")

The output of sessionInfo() just prior to running the command that causes the quit:

> sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages:
 [1] DiffBind_2.4.1             SummarizedExperiment_1.6.0 DelayedArray_0.2.0         matrixStats_0.52.2        
 [5] Biobase_2.36.0             GenomicRanges_1.28.0       GenomeInfoDb_1.12.0        IRanges_2.10.0            
 [9] S4Vectors_0.14.0           BiocGenerics_0.22.0       

loaded via a namespace (and not attached):
 [1] edgeR_3.18.0             splines_3.4.0            gtools_3.5.0             assertthat_0.2.0        
 [5] latticeExtra_0.6-28      amap_0.8-14              RBGL_1.52.0              GenomeInfoDbData_0.99.0 
 [9] Rsamtools_1.28.0         ggrepel_0.6.5            Category_2.42.0          RSQLite_1.1-2           
[13] backports_1.0.5          lattice_0.20-35          limma_3.32.2             digest_0.6.12           
[17] RColorBrewer_1.1-2       XVector_0.16.0           checkmate_1.8.2          colorspace_1.3-2        
[21] Matrix_1.2-10            plyr_1.8.4               GSEABase_1.38.0          XML_3.98-1.7            
[25] pheatmap_1.0.8           ShortRead_1.34.0         biomaRt_2.32.0           genefilter_1.58.0       
[29] zlibbioc_1.22.0          xtable_1.8-2             GO.db_3.4.1              scales_0.4.1            
[33] brew_1.0-6               gdata_2.17.0             BiocParallel_1.10.0      tibble_1.3.0            
[37] annotate_1.54.0          ggplot2_2.2.1            GenomicFeatures_1.28.0   lazyeval_0.2.0          
[41] survival_2.41-3          magrittr_1.5             memoise_1.1.0            systemPipeR_1.10.0      
[45] fail_1.3                 gplots_3.0.1             hwriter_1.3.2            GOstats_2.42.0          
[49] graph_1.54.0             tools_3.4.0              BBmisc_1.11              stringr_1.2.0           
[53] sendmailR_1.2-1          munsell_0.4.3            locfit_1.5-9.1           AnnotationDbi_1.38.0    
[57] Biostrings_2.44.0        compiler_3.4.0           caTools_1.17.1           grid_3.4.0              
[61] RCurl_1.95-4.8           rjson_0.2.15             AnnotationForge_1.18.0   bitops_1.0-6            
[65] base64enc_0.1-3          gtable_0.2.0             DBI_0.6-1                R6_2.2.0                
[69] GenomicAlignments_1.12.0 dplyr_0.5.0              rtracklayer_1.36.0       KernSmooth_2.23-15      
[73] stringi_1.1.5            BatchJobs_1.6            Rcpp_0.12.10   

If I run R directly in terminal, the peaksets get loaded. However, when I try to derive a consensus set of peaks by running :

consensus = dba.peakset(peakset, consensus=-DBA_REPLICATE)

I get this error message:

 *** caught segfault ***

address 0x1159e1000, cause 'memory not mapped'



 1: .Call("DiffBind_mergeScores", PACKAGE = "DiffBind", sMerged,     sScore, sPeaks)

 2: mergeScores(merged, def, peakset)

 3: pv.merge(allpeaks, peaks, pv$class)

 4: pv.vectors(tmp, minOverlap = minOverlap)

 5: pv.consensus(pv, samples, sampID = sampid, minOverlap = minOverlap)

 6: pv.consensusSets(pv, peaks = peaks, minOverlap = minOverlap,     attributes = consensus, tissue, factor, condition, treatment,     replicate, control, peak.caller, readBam, controlBam)

 7: pv.peakset(DBA, peaks = peaks, sampID = sampID, tissue = tissue,     factor = factor, condition = condition, treatment = treatment,     replicate = replicate, control = control, peak.caller = peak.caller,     peak.format = peak.format, reads = reads, consensus = consensus,     readBam = bamReads, controlBam = bamControl, scoreCol = scoreCol,     bLowerScoreBetter = bLowerScoreBetter, bRemoveM = bRemoveM,     bRemoveRandom = bRemoveRandom, minOverlap = minOverlap, filter = filter,     counts = counts)

 8: dba.peakset(peakset, consensus = -DBA_REPLICATE)

Any help would be much appreciated.



ADD COMMENTlink modified 2.5 years ago by Gord Brown590 • written 2.5 years ago by msabbag20


I can't reproduce this on R 3.4.0 (MacOS 10.10.5).  (Haven't tried within RStudio due to some configuration issues.)  Could you pass along to me a zip or tarball with your sample sheet and peaks files (don't need the bams)?  Via dropbox, email, or whatever (email addr on DiffBind's home page). 

 - Gord

ADD REPLYlink written 2.5 years ago by Gord Brown590


FYI, I tried from within RStudio as well, and on our test data set, got no errors.  So I'd be very interested to see your data.


 - Gord

ADD REPLYlink written 2.5 years ago by Gord Brown590

Hi Gord,

Will send data as a zip file through email. I tried the same command on another computer running R 3.3.2, and it works just fine. It was working previously on my computer, so I tried reinstalling R 3.3.3 on my computer and repeating the command. However, it still won't work which is odd. 

Thanks for the help,


ADD REPLYlink written 2.5 years ago by msabbag20
Answer: RStudio quits unexpectedly while running DiffBind on R 3.4.0
gravatar for Gord Brown
2.5 years ago by
Gord Brown590
United Kingdom
Gord Brown590 wrote:


Based on the data you provided offline, I reproduced and (eventually...) fixed the bug (buffer overflow).  It'll show up as DiffBind 2.4.2 (or 2.5.1 in the development branch) after the next build cycle of Bioconductor (usually a day or so).

Thanks for reporting it.


 - Gord

ADD COMMENTlink written 2.5 years ago by Gord Brown590
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 213 users visited in the last hour