Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tmp_dir not deleting after R session ends #698

Open
eliza-barkan opened this issue Feb 6, 2024 · 0 comments
Open

tmp_dir not deleting after R session ends #698

eliza-barkan opened this issue Feb 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@eliza-barkan
Copy link

The tmp_dir files are not deleting after an R session ends. I believe they are supposed to delete themselves after they are no longer stored in memory but it doesn't seem like this is happening.

suppressPackageStartupMessages({
  library(ggplot2)
  library(tibble)
  library(tidyr)
  library(dplyr)
  library(googledrive)
  library(splines)
  library(plotly)
  library(viridis)
  library(data.table)
  library(DelayedArray)
  library(htmlwidgets)
  library(stringr)
  library(monocle3)
  library(devtools)

  # maddys
  library(usethis)
  library(SingleCellExperiment)
  library(IRanges)
  library(Biobase)
  library(ggplot2)
  library(msigdbr)
  library(SummarizedExperiment)
  library(S4Vectors)
  library(BiocGenerics)
  library(GenomicRanges)
  library(MatrixGenerics)
  library(GenomeInfoDb)
  library(matrixStats)

  library(Rgraphviz)
  library(PLNmodels)
  library(garnett)
  library(hooke) # use instead of load_all()
  library(splines)

  DelayedArray:::set_verbose_block_processing(TRUE)
  options(DelayedArray.block.size=1e9)
})

cds = load_monocle_objects("path to dir")

# plot genes
plot_genes = c("gene1","gene2")

for (g in plot_genes){
plot_cells(cds, x = 1, y = 3,  genes = g,
           label_cell_groups = F, show_trajectory_graph = F,
           cell_size = 0.8, cell_stroke = 0, alpha = 0.8, norm_method = "log", scale_to_range = F) +
  scale_color_viridis_c() +
  theme_void() +
  theme(legend.position = "right")

  ggsave(paste0("fig_all_", g, "-expr_umap.png"),
       dpi = 1400,
       height = 2.5,
       width = 4,
       bg = "transparent")
}

> sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /usr/lib64/libopenblaso-r0.3.3.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
 [1] BPCells_0.1.0               dplyr_1.1.4
 [3] hooke_0.0.1                 PLNmodels_1.1.0
 [5] monocle3_1.4.11             SingleCellExperiment_1.16.0
 [7] SummarizedExperiment_1.24.0 GenomicRanges_1.46.1
 [9] GenomeInfoDb_1.30.1         Biobase_2.54.0
[11] stringr_1.5.1               htmlwidgets_1.6.4
[13] tidyr_1.3.0                 devtools_2.4.3
[15] usethis_2.2.2               DelayedArray_0.20.0
[17] IRanges_2.28.0              S4Vectors_0.32.4
[19] MatrixGenerics_1.6.0        matrixStats_1.2.0
[21] BiocGenerics_0.40.0         Matrix_1.6-4
[23] data.table_1.14.10          viridis_0.6.4
[25] viridisLite_0.4.2           plotly_4.10.3
[27] ggplot2_3.4.4              

loaded via a namespace (and not attached):
 [1] nlme_3.1-153           bitops_1.0-7           fs_1.6.3
 [4] lubridate_1.8.0        bit64_4.0.5            RcppAnnoy_0.0.21
 [7] httr_1.4.7             tools_4.1.2            utf8_1.2.4
[10] R6_2.5.1               DBI_1.2.1              lazyeval_0.2.2
[13] colorspace_2.1-0       withr_2.5.2            tidyselect_1.2.0
[16] gridExtra_2.3          processx_3.8.3         bit_4.0.5
[19] compiler_4.1.2         graph_1.72.0           cli_3.6.2
[22] scales_1.3.0           callr_3.7.3            digest_0.6.34
[25] minqa_1.2.6            XVector_0.34.0         coro_1.0.3
[28] pkgconfig_2.0.3        htmltools_0.5.7        parallelly_1.36.0
[31] lme4_1.1-35.1          sessioninfo_1.2.2      fastmap_1.1.1
[34] rlang_1.1.3            torch_0.12.0           RSQLite_2.2.9
[37] generics_0.1.3         jsonlite_1.8.8         RCurl_1.98-1.14
[40] magrittr_2.0.3         GenomeInfoDbData_1.2.7 Rcpp_1.0.12
[43] munsell_0.5.0          fansi_1.0.6            terra_1.7-46
[46] lifecycle_1.0.4        stringi_1.8.3          MASS_7.3-55
[49] zlibbioc_1.40.0        pkgbuild_1.4.3         plyr_1.8.9
[52] blob_1.2.2             grid_4.1.2             parallel_4.1.2
[55] listenv_0.9.0          crayon_1.5.2           lattice_0.20-45
[58] Biostrings_2.62.0      KEGGREST_1.34.0        ps_1.7.5
[61] pillar_1.9.0           igraph_1.6.0           boot_1.3-28
[64] future.apply_1.11.1    codetools_0.2-18       pkgload_1.3.3
[67] glue_1.7.0             remotes_2.4.2.1        png_0.1-8
[70] vctrs_0.6.5            nloptr_2.0.3           gtable_0.3.4
[73] purrr_1.0.2            assertthat_0.2.1       future_1.33.1
[76] cachem_1.0.8           tidygraph_1.3.0        glassoFast_1.0.1
[79] RSpectra_0.16-1        tibble_3.2.1           AnnotationDbi_1.56.2
[82] memoise_2.0.1          corrplot_0.92          globals_0.16.2
[85] ellipsis_0.3.2

@eliza-barkan eliza-barkan added the bug Something isn't working label Feb 6, 2024
@eliza-barkan eliza-barkan changed the title tmp_dir files are not deleting after R session ends tmp_dir not deleting after R session ends Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant