DiffBind dba.counts memory issue
0
0
Entering edit mode
rreese2 • 0
@0e644d97
Last seen 18 days ago
United States

Hi all, I am having trouble getting DiffBind's dba.counts to run to completion. I am frequently met with the following error:


Reads will be counted as Paired-end.
Error in (function (cond)  : 
  error in evaluating the argument 'x' in selecting a method for function 'assay': BiocParallel errors
  element index: 1
  first error: cannot allocate vector of size 163.4 Mb

From what I understand, this is a memory issue. I have tried running gc() and I have also tried chainging the DBA$config$yieldSize to a lower number, although I am not sure if I have actually done that correctly. Below I have my various attempts at dba.count(), all of which eventually give the "cannot allocate vector size" error, never at the same sample and always a different size vector. Am I changing the yieldSize correctly, and if I am is there anything else I can do to lower the memory usage (even if it takes longer to run?)

For computer specs, I do only have 8GB of RAM which I suspect is problematic.

Code should be placed in three backticks as shown below


library(DiffBind)

#Read in meta data which directs to bam and peak files
samples2 <- read.csv("meta.csv") 
samples2

#####################
#Create a dba object#
#####################
dba <- dba(sampleSheet = samples2)
dba2 <- dba(sampleSheet=samples2)
dba3 <- dba(sampleSheet = samples2)
dba4 <- dba(sampleSheet = samples2)

################
#Counting Reads#
################
dba <- dba.count(dba, bUseSummarizeOverlaps = TRUE)
dba2$config$yieldSize <- 2500000
dba2 <- dba.count(dba2, bUseSummarizeOverlaps = dba2$config$yieldSize, bParallel = FALSE) 
dba3$config$yieldSize <- 50000
dba3 <- dba.count(dba3, bUseSummarizeOverlaps = dba3$config$yieldSize, bParallel = FALSE)
dba4 <- dba.count(dba4, bParallel = FALSE)

sessionInfo( )
R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
 [1] DiffBind_3.2.7              SummarizedExperiment_1.22.0
 [3] Biobase_2.52.0              MatrixGenerics_1.4.3       
 [5] matrixStats_0.61.0          GenomicRanges_1.44.0       
 [7] GenomeInfoDb_1.28.4         IRanges_2.26.0             
 [9] S4Vectors_0.30.1            BiocGenerics_0.38.0        

loaded via a namespace (and not attached):
  [1] backports_1.2.1          GOstats_2.58.0           BiocFileCache_2.0.0     
  [4] plyr_1.8.6               GSEABase_1.54.0          splines_4.1.1           
  [7] BiocParallel_1.26.2      ggplot2_3.3.5            amap_0.8-18             
 [10] digest_0.6.28            invgamma_1.1             GO.db_3.13.0            
 [13] SQUAREM_2021.1           fansi_0.5.0              magrittr_2.0.1          
 [16] checkmate_2.0.0          memoise_2.0.0            BSgenome_1.60.0         
 [19] base64url_1.4            limma_3.48.3             Biostrings_2.60.2       
 [22] annotate_1.70.0          systemPipeR_1.26.3       bdsmatrix_1.3-4         
 [25] prettyunits_1.1.1        jpeg_0.1-9               colorspace_2.0-2        
 [28] blob_1.2.2               rappdirs_0.3.3           apeglm_1.14.0           
 [31] ggrepel_0.9.1            dplyr_1.0.7              crayon_1.4.1            
 [34] RCurl_1.98-1.5           jsonlite_1.7.2           graph_1.70.0            
 [37] genefilter_1.74.0        brew_1.0-6               survival_3.2-11         
 [40] VariantAnnotation_1.38.0 glue_1.4.2               gtable_0.3.0            
 [43] zlibbioc_1.38.0          XVector_0.32.0           DelayedArray_0.18.0     
 [46] V8_3.4.2                 Rgraphviz_2.36.0         scales_1.1.1            
 [49] pheatmap_1.0.12          mvtnorm_1.1-2            DBI_1.1.1               
 [52] edgeR_3.34.1             Rcpp_1.0.7               xtable_1.8-4            
 [55] progress_1.2.2           emdbook_1.3.12           bit_4.0.4               
 [58] rsvg_2.1.2               AnnotationForge_1.34.0   truncnorm_1.0-8         
 [61] httr_1.4.2               gplots_3.1.1             RColorBrewer_1.1-2      
 [64] ellipsis_0.3.2           pkgconfig_2.0.3          XML_3.99-0.8            
 [67] dbplyr_2.1.1             locfit_1.5-9.4           utf8_1.2.2              
 [70] tidyselect_1.1.1         rlang_0.4.11             AnnotationDbi_1.54.1    
 [73] munsell_0.5.0            tools_4.1.1              cachem_1.0.6            
 [76] generics_0.1.0           RSQLite_2.2.8            stringr_1.4.0           
 [79] fastmap_1.1.0            yaml_2.2.1               bit64_4.0.5             
 [82] caTools_1.18.2           purrr_0.3.4              KEGGREST_1.32.0         
 [85] RBGL_1.68.0              xml2_1.3.2               biomaRt_2.48.3          
 [88] compiler_4.1.1           rstudioapi_0.13          filelock_1.0.2          
 [91] curl_4.3.2               png_0.1-7                tibble_3.1.4            
 [94] stringi_1.7.4            GenomicFeatures_1.44.2   lattice_0.20-44         
 [97] Matrix_1.3-4             vctrs_0.3.8              pillar_1.6.3            
[100] lifecycle_1.0.1          irlba_2.3.3              data.table_1.14.0       
[103] bitops_1.0-7             rtracklayer_1.52.1       R6_2.5.1                
[106] BiocIO_1.2.0             latticeExtra_0.6-29      hwriter_1.3.2           
[109] ShortRead_1.50.0         KernSmooth_2.23-20       MASS_7.3-54             
[112] gtools_3.9.2             assertthat_0.2.1         Category_2.58.0         
[115] rjson_0.2.20             withr_2.4.2              GenomicAlignments_1.28.0
[118] batchtools_0.9.15        Rsamtools_2.8.0          GenomeInfoDbData_1.2.6  
[121] hms_1.1.1                grid_4.1.1               DOT_0.1                 
[124] coda_0.19-4              GreyListChIP_1.24.0      ashr_2.2-47             
[127] mixsqp_0.3-43            bbmle_1.0.24             numDeriv_2016.8-1.1     
[130] restfulr_0.0.13
DiffBind • 70 views
ADD COMMENT

Login before adding your answer.

Traffic: 314 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6