GreenleafLab / ArchR

ArchR : Analysis of Regulatory Chromatin in R (www.ArchRProject.com)
MIT License
384 stars 137 forks source link

saveArchRProject() creates copying both "from"and "to" error #296

Closed l-cli closed 4 years ago

l-cli commented 4 years ago

I was going through the manual and tried to save my ArchR project using saveArchRProject(), and the following error occurred: image

Session Info R version 3.6.3 (2020-02-29) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Scientific Linux 7.4 (Nitrogen)

Matrix products: default BLAS: /software/R-3.6.3-no-openblas-el7-x86_64/lib64/R/lib/libRblas.so LAPACK: /software/R-3.6.3-no-openblas-el7-x86_64/lib64/R/lib/libRlapack.so

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

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

other attached packages: [1] BSgenome.Hsapiens.UCSC.hg38_1.4.1 ggridges_0.5.2 Rsamtools_2.2.3
[4] BSgenome.Hsapiens.UCSC.hg19_1.4.0 BSgenome_1.54.0 rtracklayer_1.46.0
[7] Biostrings_2.54.0 XVector_0.26.0 pheatmap_1.0.12
[10] rhandsontable_0.3.7 shiny_1.4.0.2 ggrepel_0.8.2
[13] circlize_0.4.10 ComplexHeatmap_2.2.0 nabor_0.5.0
[16] gtable_0.3.0 harmony_1.0 Rcpp_1.0.4.6
[19] gridExtra_2.3 uwot_0.1.8 ArchR_0.9.5
[22] magrittr_1.5 rhdf5_2.30.1 Matrix_1.2-18
[25] data.table_1.12.8 SummarizedExperiment_1.16.1 DelayedArray_0.12.3
[28] BiocParallel_1.20.1 matrixStats_0.56.0 Biobase_2.46.0
[31] GenomicRanges_1.38.0 GenomeInfoDb_1.22.1 IRanges_2.20.2
[34] S4Vectors_0.24.4 BiocGenerics_0.32.0 ggplot2_3.3.1
[37] patchwork_1.0.0 Seurat_3.1.5 dplyr_1.0.0

loaded via a namespace (and not attached): [1] plyr_1.8.6 igraph_1.2.5 lazyeval_0.2.2 splines_3.6.3
[5] listenv_0.8.0 digest_0.6.25 htmltools_0.4.0 fansi_0.4.1
[9] cluster_2.1.0 ROCR_1.0-11 limma_3.42.2 globals_0.12.5
[13] colorspace_1.4-1 rappdirs_0.3.1 xfun_0.14 crayon_1.3.4
[17] RCurl_1.98-1.2 jsonlite_1.6.1 hexbin_1.28.1 survival_3.1-8
[21] zoo_1.8-8 ape_5.4 glue_1.4.1 zlibbioc_1.32.0
[25] leiden_0.3.3 GetoptLong_1.0.2 Rhdf5lib_1.8.0 future.apply_1.5.0
[29] shape_1.4.4 scales_1.1.1 viridisLite_0.3.0 xtable_1.8-4
[33] clue_0.3-57 reticulate_1.16 rsvd_1.0.3 tsne_0.1-3
[37] htmlwidgets_1.5.1 httr_1.4.1 RColorBrewer_1.1-2 ellipsis_0.3.1
[41] ica_1.0-2 XML_3.99-0.3 pkgconfig_2.0.3 farver_2.0.3
[45] tidyselect_1.1.0 labeling_0.3 rlang_0.4.6 reshape2_1.4.4
[49] later_1.1.0.1 munsell_0.5.0 tools_3.6.3 cli_2.0.2
[53] generics_0.0.2 evaluate_0.14 stringr_1.4.0 fastmap_1.0.1
[57] yaml_2.2.1 knitr_1.28 fitdistrplus_1.1-1 purrr_0.3.4
[61] RANN_2.6.1 pbapply_1.4-2 future_1.17.0 nlme_3.1-144
[65] mime_0.9 compiler_3.6.3 shinythemes_1.1.2 rstudioapi_0.11
[69] plotly_4.9.2.1 png_0.1-7 tibble_3.0.1 stringi_1.4.6
[73] RSpectra_0.16-0 lattice_0.20-38 vctrs_0.3.1 pillar_1.4.4
[77] lifecycle_0.2.0 lmtest_0.9-37 GlobalOptions_0.1.2 RcppAnnoy_0.0.16
[81] cowplot_1.0.0 bitops_1.0-6 irlba_2.3.3 httpuv_1.5.4
[85] R6_2.4.1 promises_1.1.0 KernSmooth_2.23-16 codetools_0.2-16
[89] MASS_7.3-51.5 gtools_3.8.2 assertthat_0.2.1 rjson_0.2.20
[93] withr_2.2.0 GenomicAlignments_1.22.1 sctransform_0.2.1 GenomeInfoDbData_1.2.2
[97] tidyr_1.1.0 rmarkdown_2.2 Cairo_1.5-12.2 Rtsne_0.15
[101] base64enc_0.1-3

rcorces commented 4 years ago

This looks like a bash error. Did you try googling the error? It looks like you might have a file already named "Save-ProjAC2" and you are trying to overwrite that file with a directory of the same name. I'm going to close this issue. If this doesnt answer your problem, feel free to reopen.

l-cli commented 4 years ago

I did try googling before reporting here! I also deleted anything in the folder that says Save-ProjAC2, but the function still won't run properly. It seems like somehow it's trying to save "Save-ProjAC2" at the last step but it's also the file it's saving to.. Is there a way to prevent the function from doing that step?

rcorces commented 4 years ago

Can you detail what you have tried? Have you tried providing a full path? Have you tried any other names other than the one you listed? Can you provide a reproducible example of this error using the tutorial data?

l-cli commented 4 years ago

Thank you! I originally followed the tutorial and saved the archR project as different versions (corresponding to projectHeme2, projectHeme3, etc. in the tutorial), but now I tried not creating new projects and was successful in saving the original project!

For reference, unfortunately I still couldn't save the newly created projects. I tried: 1) deleting the ProjAC2 folder in my directory, 2) providing the full path, 3) restart Rstudio after these steps, 4) setting a different working directory, 5) changing the name of the output directory to "test" instead of "Save-ProjAC2", but none worked.

rcorces commented 4 years ago

Glad this worked out. I'm not sure why it wasnt working before but if anyone else runs into this error we can use this issue as the starting point for discussion.

xiangrong7 commented 4 years ago

Thank you! I originally followed the tutorial and saved the archR project as different versions (corresponding to projectHeme2, projectHeme3, etc. in the tutorial), but now I tried not creating new projects and was successful in saving the original project!

For reference, unfortunately I still couldn't save the newly created projects. I tried: 1) deleting the ProjAC2 folder in my directory, 2) providing the full path, 3) restart Rstudio after these steps, 4) setting a different working directory, 5) changing the name of the output directory to "test" instead of "Save-ProjAC2", but none worked.

I have met the same error,but I want to create new projects for different step or parameter. I also tried the methods listed above and couldn't save the newly created projects.... have any suggestions ?

xiangrong7 commented 4 years ago

I see, you can't save it under the output directory, it copies the output directory, if you save it under the output directory, it's like a loop.

xiangrong7 commented 4 years ago

Thank you! I originally followed the tutorial and saved the archR project as different versions (corresponding to projectHeme2, projectHeme3, etc. in the tutorial), but now I tried not creating new projects and was successful in saving the original project!

For reference, unfortunately I still couldn't save the newly created projects. I tried: 1) deleting the ProjAC2 folder in my directory, 2) providing the full path, 3) restart Rstudio after these steps, 4) setting a different working directory, 5) changing the name of the output directory to "test" instead of "Save-ProjAC2", but none worked.

You can try "../test"

qdong2023 commented 1 year ago

Hi @rcorces, I encountered a similar issue (see below). I saved multiple ArchR objects using saveRDS() instead of the saveArchRProject() in the server. Then I transferred these rds files and arrow files to the PC, and imported the rds files using readRDS(), it works normally as long as the working directory is set to the folder where the arrow files are located. However, it always shows output directory errors when saving plots via plotPDF() or other functions. Is there any way to bypass the outputdirectory issue or if I have to save the ArchR project via saveArchRProject() from the server and then transfer again?

... Copying Arrow Files (17 of 18) Copying Arrow Files (18 of 18) Getting ImputeWeights Dropping ImputeWeights... Copying Other Files... Error in saveArchRProject(ArchRProj = match_atac_mfg_cls, outputDirectory = "~/Desktop/test2") : all(file.exists(zfiles)) is not TRUE In addition: Warning message: In normalizePath(getOutputDirectory(ArchRProj)) : path[1]="/home/ubuntu/Documents/results_mfg/ArchROutput": No such file or directory