read.bismark() ->Error in manager$availability[[as.character(result$node)]] <- TRUE : wrong args for environment subassignment
0
0
Entering edit mode
@b25897b6
Last seen 2.2 years ago
Germany

Hej, I want to analyse differential Methylation with the MethylSig package but dont manage to import my data files ino R. With the following code I always get a error massage (see below). I dont nderstand what the error massage means. Can anybody help? Has had the same problem? Thanks a lot in advance

test = bsseq::read.bismark(files = c("VA-3177-2215_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2217_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2219_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2270_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2272_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2274_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2222_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2224_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2226_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2306_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2308_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2310_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2246_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2248_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2250_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2312_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2314_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2316_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2294_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2296_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2298_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2321_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2323_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2325_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2345_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2347_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2349_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2351_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2353_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2355_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2413_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2415_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2417_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2282_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2284_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2286_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2496_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2498_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2500_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2620_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2622_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2624_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2425_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2427_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2429_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2502_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2504_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2506_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2466_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2468_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2470_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2596_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2598_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2600_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2437_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2439_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2441_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2460_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                                     "VA-3177-2462_R1_val_1_bismark_bt2_pe.deduplicated.bismark.cov.gz",
                        ....."), 
                            colData = data.frame(row.names = c("2215","2217","2219","2270","2272","2274","2222","2224","2226","2306","2308","2310",                                                             "2246","2248","2250","2312","2314","2316","2294","2296","2298","2321","2323","2325",                                                                "2345","2347","2349","2351","2353","2355","2413","2415","2417","2282","2284","2286",                                                           "2496","2498","2500","2620","2622","2624","2425","2427","2429","2502","2504","2506",                                                               ....."),
                                                 id=c("endurance _ control _ pre","endurance _ control _ post",
                                                      "endurance _ control _ 3h","resistance _ control _ pre",
                                                      "resistance _ control _ post","resistance _ control _ 3h",
                                                      "endurance _ endurance _ pre","endurance _ endurance _ post",
                                                      "endurance _ endurance _ 3h","resistance _ strength _ pre",
                                                      "resistance _ strength _ post","resistance _ strength _ 3h",
                                                      "endurance _ endurance _ pre","endurance _ endurance _ post",
                                                      "endurance _ endurance _ 3h","resistance _ strength _ pre",
                                                      "resistance _ strength _ post","resistance _ strength _ 3h",
                                                      "endurance _ endurance _ pre","endurance _ endurance _ post",
                                                      "endurance _ endurance _ 3h","endurance _ endurance _ pre",
                                                      "endurance _ endurance _ post","endurance _ endurance _ 3h",
                                                      "endurance _ endurance _ pre","endurance _ endurance _ post",
                                                      "endurance _ endurance _ 3h","resistance _ strength _ pre",
                                                      "resistance _ strength _ post","resistance _ strength _ 3h",
                                                      "resistance _ strength _ pre","resistance _ strength _ post",
                                                   ......")),
                            rmZeroCov = FALSE,
                            strandCollapse = FALSE)

Error in manager$availability[[as.character(result$node)]] <- TRUE : 
  wrong args for environment subassignment


sessionInfo( )

R version 4.2.0 (2022-04-22 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale: [1] LC_COLLATE=Swedish_Sweden.utf8 LC_CTYPE=Swedish_Sweden.utf8 LC_MONETARY=Swedish_Sweden.utf8 [4] LC_NUMERIC=C LC_TIME=Swedish_Sweden.utf8

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

other attached packages: [1] forcats_0.5.2 stringr_1.4.1 dplyr_1.0.10
[4] purrr_0.3.4 readr_2.1.2 tidyr_1.2.0
[7] tibble_3.1.8 ggplot2_3.3.6 tidyverse_1.3.2
[10] methylSig_1.7.0 bsseq_1.32.0 SummarizedExperiment_1.26.1 [13] Biobase_2.56.0 MatrixGenerics_1.8.1 matrixStats_0.62.0
[16] GenomicRanges_1.48.0 GenomeInfoDb_1.32.3 IRanges_2.30.1
[19] S4Vectors_0.34.0 BiocGenerics_0.42.0

loaded via a namespace (and not attached): [1] googledrive_2.0.0 colorspace_2.0-3 rjson_0.2.21
[4] ellipsis_0.3.2 XVector_0.36.0 fs_1.5.2
[7] rstudioapi_0.14 remotes_2.4.2 lubridate_1.8.0
[10] fansi_1.0.3 xml2_1.3.3 codetools_0.2-18
[13] splines_4.2.0 R.methodsS3_1.8.2 sparseMatrixStats_1.8.0
[16] cachem_1.0.6 pkgload_1.3.0 jsonlite_1.8.0
[19] Rsamtools_2.12.0 broom_1.0.1 dbplyr_2.2.1
[22] R.oo_1.25.0 DSS_2.44.0 shiny_1.7.2
[25] HDF5Array_1.24.2 httr_1.4.4 BiocManager_1.30.18
[28] compiler_4.2.0 backports_1.4.1 assertthat_0.2.1
[31] Matrix_1.4-1 fastmap_1.1.0 gargle_1.2.0
[34] limma_3.52.2 cli_3.3.0 later_1.3.0
[37] htmltools_0.5.3 prettyunits_1.1.1 tools_4.2.0
[40] gtable_0.3.1 glue_1.6.2 GenomeInfoDbData_1.2.8
[43] Rcpp_1.0.9 cellranger_1.1.0 vctrs_0.4.1
[46] Biostrings_2.64.1 rhdf5filters_1.8.0 rtracklayer_1.56.1
[49] DelayedMatrixStats_1.18.0 ps_1.7.1 rvest_1.0.3
[52] mime_0.12 miniUI_0.1.1.1 lifecycle_1.0.1
[55] restfulr_0.0.15 gtools_3.9.3 devtools_2.4.4
[58] googlesheets4_1.0.1 XML_3.99-0.10 zlibbioc_1.42.0
[61] scales_1.2.1 BSgenome_1.64.0 hms_1.1.2
[64] promises_1.2.0.1 parallel_4.2.0 rhdf5_2.40.0
[67] yaml_2.3.5 memoise_2.0.1 stringi_1.7.8
[70] BiocIO_1.6.0 permute_0.9-7 pkgbuild_1.3.1
[73] BiocParallel_1.30.3 rlang_1.0.5 pkgconfig_2.0.3
[76] bitops_1.0-7 lattice_0.20-45 Rhdf5lib_1.18.2
[79] GenomicAlignments_1.32.1 htmlwidgets_1.5.4 processx_3.7.0
[82] tidyselect_1.1.2 magrittr_2.0.3 R6_2.5.1
[85] snow_0.4-4 generics_0.1.3 profvis_0.3.7
[88] DelayedArray_0.22.0 DBI_1.1.3 withr_2.5.0
[91] haven_2.5.1 pillar_1.8.1 RCurl_1.98-1.8
[94] modelr_0.1.9 crayon_1.5.1 utf8_1.2.2
[97] tzdb_0.3.0 urlchecker_1.0.1 usethis_2.1.6
[100] readxl_1.4.1 locfit_1.5-9.6 grid_4.2.0
[103] data.table_1.14.2 callr_3.7.2 reprex_2.0.2
[106] digest_0.6.29 xtable_1.8-4 httpuv_1.6.5
[109] R.utils_2.12.0 munsell_0.5.0 sessioninfo_1.2.2

methylSig bsseq • 2.4k views
ADD COMMENT
1
Entering edit mode

It's often best to simplify the problem when facing such an error. For example, try re-running the code with just 1 sample - does the code then work? We can then narrow down the problem and it will be easier for people to help you.

Please also include the output of sessionInfo() (it seems to have been cut off in your original post).

ADD REPLY
0
Entering edit mode

Thanks a lot for your reply. I added sesionInfo(). I reran with fewer samples/files now and it works. However, if i add those functioning samples/files together and try to run them in one, I get the same warning as I posted. Could it be that my computer is to weak? or that the function has a limit?

Otherwise, is there an option to import files in batches and then combine those bs files into one bs file afterwards?

ADD REPLY
0
Entering edit mode

I'm still unsure about where the specific error:

Error in manager$availability[[as.character(result$node)]] <- TRUE : 
  wrong args for environment subassignment

is coming from. However, it could be that your computer doesn't have enough available RAM to load all samples into memory. A few things you could try to work around such a restriction/limitation:

  • Try splitting the samples up, creating a separate _BSseq_ object for each subset using read.bismark(), and then combining into a single _BSseq_ object using cbind() (if all the objects contain the exact same loci) or combine() (if they contain different loci).
  • Try using the BACKEND = "HDF5Array" argument to read.bismark(). This will reduce memory usage because the count matrices will be stored on disk in an HDF5 file, but it will be slower to import the data.
ADD REPLY

Login before adding your answer.

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