DiffBind 'mc.cores' > 1 is not supported on Windows
1
0
Entering edit mode
GM ▴ 10
@gm
Last seen 3.2 years ago
Sint-Martens-Latem

Hello,

I have a problem with Diffbind. After the command:

DB_greylist <- dba.blacklist(DB, greylist=T )

I get the following error:

Error in mclapply(seq_len(reps), fitDist, obj@counts, size, mc.cores = cores) : 
  'mc.cores' > 1 is not supported on Windows

I tried mc.cores=1 but didn't work.

Thank you for your time.

R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

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

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

other attached packages:
 [1] DESeq2_1.30.0               GenomeInfoDbData_1.2.4      dplyr_1.0.2                 DiffBind_3.0.4             
 [5] SummarizedExperiment_1.20.0 Biobase_2.50.0              MatrixGenerics_1.2.0        matrixStats_0.57.0         
 [9] GenomicRanges_1.42.0        GenomeInfoDb_1.26.0         IRanges_2.24.0              S4Vectors_0.28.0           
[13] BiocGenerics_0.36.0        

loaded via a namespace (and not attached):
  [1] backports_1.2.1          GOstats_2.56.0           BiocFileCache_1.14.0     plyr_1.8.6               GSEABase_1.52.0         
  [6] splines_4.0.3            BiocParallel_1.24.1      ggplot2_3.3.3            amap_0.8-18              digest_0.6.27           
 [11] invgamma_1.1             htmltools_0.5.0          GO.db_3.12.1             SQUAREM_2020.5           magrittr_2.0.1          
 [16] checkmate_2.0.0          memoise_1.1.0            BSgenome_1.58.0          base64url_1.4            limma_3.46.0            
 [21] Biostrings_2.58.0        readr_1.4.0              annotate_1.68.0          systemPipeR_1.24.2       askpass_1.1             
 [26] bdsmatrix_1.3-4          prettyunits_1.1.1        jpeg_0.1-8.1             colorspace_2.0-0         blob_1.2.1              
 [31] rappdirs_0.3.1           apeglm_1.12.0            ggrepel_0.9.0            xfun_0.20                crayon_1.3.4            
 [36] RCurl_1.98-1.2           jsonlite_1.7.2           graph_1.68.0             genefilter_1.72.0        brew_1.0-6              
 [41] survival_3.2-7           VariantAnnotation_1.36.0 glue_1.4.2               gtable_0.3.0             zlibbioc_1.36.0         
 [46] XVector_0.30.0           DelayedArray_0.16.0      V8_3.4.0                 Rgraphviz_2.34.0         scales_1.1.1            
 [51] pheatmap_1.0.12          mvtnorm_1.1-1            DBI_1.1.0                edgeR_3.32.0             Rcpp_1.0.5              
 [56] xtable_1.8-4             progress_1.2.2           emdbook_1.3.12           bit_4.0.4                rsvg_2.1                
 [61] AnnotationForge_1.32.0   truncnorm_1.0-8          httr_1.4.2               gplots_3.1.1             RColorBrewer_1.1-2      
 [66] ellipsis_0.3.1           pkgconfig_2.0.3          XML_3.99-0.5             dbplyr_2.0.0             locfit_1.5-9.4          
 [71] tidyselect_1.1.0         rlang_0.4.10             AnnotationDbi_1.52.0     munsell_0.5.0            tools_4.0.3             
 [76] generics_0.1.0           RSQLite_2.2.1            evaluate_0.14            stringr_1.4.0            yaml_2.2.1              
 [81] knitr_1.30               bit64_4.0.5              caTools_1.18.0           purrr_0.3.4              RBGL_1.66.0             
 [86] xml2_1.3.2               biomaRt_2.46.0           compiler_4.0.3           rstudioapi_0.13          curl_4.3                
 [91] png_0.1-7                geneplotter_1.68.0       tibble_3.0.4             stringi_1.5.3            GenomicFeatures_1.42.0  
 [96] lattice_0.20-41          Matrix_1.2-18            vctrs_0.3.6              pillar_1.4.7             lifecycle_0.2.0         
[101] irlba_2.3.3              data.table_1.13.6        bitops_1.0-6             rtracklayer_1.50.0       R6_2.5.0                
[106] latticeExtra_0.6-29      hwriter_1.3.2            ShortRead_1.48.0         KernSmooth_2.23-17       MASS_7.3-53             
[111] gtools_3.8.2             assertthat_0.2.1         openssl_1.4.3            Category_2.56.0          rjson_0.2.20            
[116] withr_2.3.0              GenomicAlignments_1.26.0 batchtools_0.9.14        Rsamtools_2.6.0          hms_0.5.3               
[121] grid_4.0.3               DOT_0.1                  coda_0.19-4              rmarkdown_2.6            GreyListChIP_1.22.0     
[126] ashr_2.2-47              mixsqp_0.3-43            bbmle_1.0.23.1           numDeriv_2016.8-1.1      tinytex_0.28
DiffBind • 2.8k views
ADD COMMENT
0
Entering edit mode

I will permit that the developer of DiffBind responds, as there may be a fix about which I am unaware. Please show the command that you ran prior to the error appearing. Also add the output of sessionInfo() to your original question.

Windows cannot implement compute parallelisation in the same way as on MAC / Linux. So, on Windows, you cannot use mc.cores > 1. On Windows, pseudo-compute parallelisation can be achieved via SNOW by registering a cluster object and using parLapply(), as to which I elaborate here on Biostars: Tutorial: Parallel processing in R

ADD REPLY
1
Entering edit mode

Thanks, I add the details in my post.

ADD REPLY
0
Entering edit mode
Rory Stark ★ 5.2k
@rory-stark-5741
Last seen 4 weeks ago
Cambridge, UK

DiffBind does not support parallel operation on Windows. There is an issue when building greylists (greylist=TRUE by default when calling dba.blacklist) within the GreyListChIP package on Windows.

You can set cores=1 when calling dba.blacklist(), or set

DB$config$cores <- 1

to avoid this problem. I will put out an update soon to catch the case where it is trying to use more cores on Windows so as to avoid the error.

Note that it can take a long time to generate greylists in this way!

Also, you should update to the latest version of DiffBind (currently 3.0.9) as there have been important bug fixes.

ADD COMMENT
0
Entering edit mode

Thanks for the reply. I was about to comment on my post that, when I set the cores to 1 in the DB I get the error:

Error in sample.int(length(x), size, replace, prob) : 
  cannot take a sample larger than the population when 'replace = FALSE'
ADD REPLY
0
Entering edit mode

I'm pretty sure that this is a separate issue, unrelated to the parallel one. Do you have more of the output? It should have printed out which control file was being processed when the error occurred.

If you could give me access to the control bam file that is being used to generate the greylist, I can track it down with Gord Brown, who wrote the GreyListChIP package.

In the mean time it would be good if you could update to 3.0.9 so we know this isn't impacted by more recent fixes.

ADD REPLY
0
Entering edit mode

I update to 3.0.9. The error is on the first control sample. How can I send you the file?

ADD REPLY
0
Entering edit mode

I assume it is pretty big (more than a few MB), the best way to to put it on a Dropbox or other server and send me a link.

ADD REPLY
0
Entering edit mode

Thank you for the assistance, I have send you by email the link.

ADD REPLY

Login before adding your answer.

Traffic: 883 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