GreenleafLab / ArchR

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

I encontered the exact same error with `addDoubletScores`, here is my command and errors: #1609

Closed kstriedinger closed 2 years ago

kstriedinger commented 2 years ago

I encontered Error in h5checktypeOrOpenLoc(). Cannot open file. File 'NA' does not exist with addDoubletScores, here is my command and errors:

HDF5_USE_FILE_LOCKING=TRUE 
RHDF5_USE_FILE_LOCKING=TRUE 

ArrowFiles <- createArrowFiles(inputFiles = "~/BWS_Multiome/BWS_ASC_Analysis/InputFiles/BWS/pomerantzj/220701_A00269_0664_BHNWLLDRXY_analysis/BWS_fragments.tsv.gz",
                               sampleNames = names(inputs),
                               minTSS = 4, # filter based on TSS enrichment score
                               minFrags = 1000, # filter based on the minimum fragments per cell
                               addTileMat = T, # 500bp sliding addArchRThreads(threads = 1) 
                               addGeneScoreMat = T,
                               subThreading = T) # Gene-Score Matrix uses ATAC-Seq signal proximal to the TSS to estimate gene activity

ArrowFiles <- c("BWS7.arrow")
ArrowFiles
getwd()

addArchRThreads(threads = 1) 

doubScores <- addDoubletScores (input = c("~/BWS_Multiome/BWS_ASC_Analysis/outs/BWS_ASC_Analysis/BWS7.arrow"),
                                 k = 10, 
                                 knnMethod = "UMAP",
                                 LSIMethod = 1, 
                                 verbose = T)

doubScores <- addDoubletScores(
  input = ArrowFiles,
  k = 10, #Refers to how many cells near a "pseudo-doublet" to count.
  knnMethod = "UMAP", #Refers to the embedding to use for nearest neighbor search.
  LSIMethod = 1
)

and my errors


2022-09-08 15:39:27 : ERROR Found in getPartialMatrix for  (1 of 1) :  
LogFile = ArchRLogs/ArchR-addDoubletScores-5be4510201fb-Date-2022-09-08_Time-15-38-42.log

<simpleError in h5checktypeOrOpenLoc(file, readonly = TRUE, fapl = NULL, native = native): Error in h5checktypeOrOpenLoc(). Cannot open file. File 'NA' does not exist.>
___

My env is : 
```R
RStudio 2022.07.1+554 "Spotted Wakerobin" Release (7872775ebddc40635780ca1ed238934c3345c5de, 2022-07-22) for macOS
Mozilla/5.0 (Macintosh; Intel Mac OS X 12_5_0) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.10 Chrome/69.0.3497.128 Safari/537.36
R 4.2.1
rcorces commented 2 years ago

Hi @kstriedinger! Thanks for using ArchR! Please make sure that your post belongs in the Issues section. Only bugs and error reports belong in the Issues section. Usage questions and feature requests should be posted in the Discussions section, not in Issues.
Before we help you, you must respond to the following questions unless your original post already contained this information: 1. If you've encountered an error, have you already searched previous Issues to make sure that this hasn't already been solved? 2. Can you recapitulate your error using the tutorial code and dataset? If so, provide a reproducible example. 3. Did you post your log file? If not, add it now. 4. Remove any screenshots that contain text and instead copy and paste the text using markdown's codeblock syntax (three consecutive backticks). You can do this by editing your original post.

kstriedinger commented 2 years ago
  1. Yes, I found out is a common error not to be able to read the Hdf5 file, and I have done all suggested in the git hub, including HDF5_USE_FILE_LOCKING=TRUE RHDF5_USE_FILE_LOCKING=TRUE and subThreading = T in the creation of the arrow file.
  2. The error doesn't show when using your tutorial dataset.
  3. here is the log file
  4. _ .__ __ .__
    / \ | \ / || | | | | \
    / ^ \ | |_) | | ,----'| |
    | | | |) |
    / /
    \ \ | / | | | | | /
    / ____ \ | |\ \
    | ----.| | | | | |\ \\___. /__/ \__\ | _|.| _||| || | | `.____|

Logging With ArchR!

Start Time : 2022-09-08 15:38:20

------- ArchR Info

ArchRThreads = 1 ArchRGenome = Hg38

------- System Info

Computer OS = unix

------- Session Info

R version 4.2.1 (2022-06-23) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Monterey 12.5

Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

Random number generation: RNG: L'Ecuyer-CMRG Normal: Inversion Sample: Rejection

locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

other attached packages: [1] sp_1.5-0 SeuratObject_4.1.1 Seurat_4.1.1
[4] Rsamtools_2.12.0 BSgenome.Hsapiens.UCSC.hg38_1.4.4 BSgenome_1.64.0
[7] Biostrings_2.64.1 XVector_0.36.0 rhdf5_2.40.0
[10] SummarizedExperiment_1.26.1 Biobase_2.56.0 MatrixGenerics_1.8.1
[13] Rcpp_1.0.9 Matrix_1.4-1 matrixStats_0.62.0
[16] data.table_1.14.2 stringr_1.4.1 plyr_1.8.7
[19] magrittr_2.0.3 ggplot2_3.3.6 gtable_0.3.1
[22] gtools_3.9.3 gridExtra_2.3 ArchR_1.0.2
[25] chromVARmotifs_0.2.0 rtracklayer_1.56.1 GenomicRanges_1.48.0
[28] GenomeInfoDb_1.32.4 IRanges_2.30.1 S4Vectors_0.34.0
[31] BiocGenerics_0.42.0 pheatmap_1.0.12 knitr_1.40

loaded via a namespace (and not attached): [1] utf8_1.2.2 reticulate_1.26 R.utils_2.12.0
[4] tidyselect_1.1.2 poweRlaw_0.70.6 RSQLite_2.2.16
[7] AnnotationDbi_1.58.0 htmlwidgets_1.5.4 BiocParallel_1.30.3
[10] Rtsne_0.16 devtools_2.4.4 munsell_0.5.0
[13] codetools_0.2-18 ica_1.0-3 future_1.28.0
[16] miniUI_0.1.1.1 withr_2.5.0 spatstat.random_2.2-0
[19] colorspace_2.0-3 progressr_0.11.0 rstudioapi_0.14
[22] ROCR_1.0-11 tensor_1.5 listenv_0.8.0
[25] labeling_0.4.2 GenomeInfoDbData_1.2.8 polyclip_1.10-0
[28] bit64_4.0.5 farver_2.1.1 parallelly_1.32.1
[31] vctrs_0.4.1 generics_0.1.3 xfun_0.32
[34] R6_2.5.1 spatstat.utils_2.3-1 bitops_1.0-7
[37] rhdf5filters_1.8.0 cachem_1.0.6 DelayedArray_0.22.0
[40] promises_1.2.0.1 BiocIO_1.6.0 scales_1.2.1
[43] rgeos_0.5-9 Cairo_1.6-0 globals_0.16.1
[46] goftest_1.2-3 processx_3.7.0 seqLogo_1.62.0
[49] rlang_1.0.5 splines_4.2.1 lazyeval_0.2.2
[52] spatstat.geom_2.4-0 abind_1.4-5 BiocManager_1.30.18
[55] yaml_2.3.5 reshape2_1.4.4 httpuv_1.6.6
[58] tools_4.2.1 usethis_2.1.6 ellipsis_0.3.2
[61] spatstat.core_2.4-4 RColorBrewer_1.1-3 sessioninfo_1.2.2
[64] ggridges_0.5.3 zlibbioc_1.42.0 purrr_0.3.4
[67] RCurl_1.98-1.8 ps_1.7.1 prettyunits_1.1.1
[70] rpart_4.1.16 deldir_1.0-6 pbapply_1.5-0
[73] cowplot_1.1.1 urlchecker_1.0.1 zoo_1.8-10
[76] ggrepel_0.9.1 cluster_2.1.4 fs_1.5.2
[79] scattermore_0.8 lmtest_0.9-40 RANN_2.6.1
[82] fitdistrplus_1.1-8 pkgload_1.3.0 hms_1.1.2
[85] patchwork_1.1.2 mime_0.12 xtable_1.8-4
[88] XML_3.99-0.10 compiler_4.2.1 tibble_3.1.8
[91] KernSmooth_2.23-20 crayon_1.5.1 R.oo_1.25.0
[94] htmltools_0.5.3 mgcv_1.8-40 later_1.3.0
[97] tzdb_0.3.0 TFBSTools_1.34.0 tidyr_1.2.1
[100] DBI_1.1.3 MASS_7.3-58.1 readr_2.1.2
[103] cli_3.4.0 R.methodsS3_1.8.2 parallel_4.2.1
[106] igraph_1.3.4 pkgconfig_2.0.3 GenomicAlignments_1.32.1
[109] TFMPvalue_0.0.8 spatstat.sparse_2.1-1 plotly_4.10.0
[112] annotate_1.74.0 DirichletMultinomial_1.38.0 callr_3.7.2
[115] digest_0.6.29 sctransform_0.3.4 RcppAnnoy_0.0.19
[118] pracma_2.3.8 CNEr_1.32.0 spatstat.data_2.2-0
[121] leiden_0.4.2 uwot_0.1.14 restfulr_0.0.15
[124] shiny_1.7.2 rjson_0.2.21 nlme_3.1-159
[127] lifecycle_1.0.1 jsonlite_1.8.0 Rhdf5lib_1.18.2
[130] viridisLite_0.4.1 fansi_1.0.3 pillar_1.8.1
[133] lattice_0.20-45 KEGGREST_1.36.3 fastmap_1.1.0
[136] httr_1.4.4 pkgbuild_1.3.1 survival_3.4-0
[139] GO.db_3.15.0 glue_1.6.2 remotes_2.4.2
[142] png_0.1-7 bit_4.0.4 stringi_1.7.8
[145] profvis_0.3.7 blob_1.2.3 caTools_1.18.2
[148] memoise_2.0.1 dplyr_1.0.10 irlba_2.3.5
[151] future.apply_1.9.1

------- Log Info

2022-09-08 15:38:20 : addDoubletScores Input-Parameters, Class = list

addDoubletScores Input-Parameters$input: length = 2 [1] "BWS7.arrow" "ACS7.arrow"

addDoubletScores Input-Parameters$useMatrix: length = 1 [1] "TileMatrix"

addDoubletScores Input-Parameters$k: length = 1 [1] 10

addDoubletScores Input-Parameters$nTrials: length = 1 [1] 5

addDoubletScores Input-Parameters$dimsToUse: length = 30 [1] 1 2 3 4 5 6

addDoubletScores Input-Parameters$LSIMethod: length = 1 [1] 1

addDoubletScores Input-Parameters$scaleDims: length = 1 [1] FALSE

addDoubletScores Input-Parameters$corCutOff: length = 1 [1] 0.75

addDoubletScores Input-Parameters$knnMethod: length = 1 [1] "UMAP"

addDoubletScores Input-Parameters$outDir: length = 1 [1] "QualityControl"

addDoubletScores Input-Parameters$threads: length = 1 [1] 1

addDoubletScores Input-Parameters$force: length = 1 [1] FALSE

addDoubletScores Input-Parameters$parallelParam: length = 0 NULL

addDoubletScores Input-Parameters$verbose: length = 1 [1] TRUE

addDoubletScores Input-Parameters$logFile: length = 1 [1] "ArchRLogs/ArchR-addDoubletScores-5be4d091bd4-Date-2022-09-08_Time-15-38-20.log"

  1. code block syntax 2022-09-08 15:39:27 : ERROR Found in getPartialMatrix for (1 of 1) :
    LogFile = ArchRLogs/ArchR-addDoubletScores-5be4510201fb-Date-2022-09-08_Time-15-38-42.log

<simpleError in h5checktypeOrOpenLoc(file, readonly = TRUE, fapl = NULL, native = native): Error in h5checktypeOrOpenLoc(). Cannot open file. File 'NA' does not exist.>


Error in .logError(e, fn = "getPartialMatrix", info = prefix, errorList = errorList, : Exiting See Error Above

kstriedinger commented 2 years ago

ArchR-addDoubletScores-5be4d091bd4-Date-2022-09-08_Time-15-38-20.log

rcorces commented 2 years ago

Unless I'm mis-reading something, you are not pointing to a correct arrow file. The file you are pointing to with input does not exist. The arrow file is created in the working directory.