HYsxe / PRINT

32 stars 3 forks source link

getPrecomputedBias #17

Closed m03077yhtnt closed 2 days ago

m03077yhtnt commented 7 months ago

Thank you very much for developing the excellent ATAC-seq package. I'm encountering an issue with the part “the function loads the pre-computed bias in the regions of interest”. I'm following your tutorial and using my own single-cell RNA and ATAC-seq data, which is from human samples. I've downloaded the files "dispModel", "TFBS_model.h5", "Tn5_NN_model.h5", "cisBP_human_pwms_2021.rds", "dm6Tn5Bias.h5", "hg38Tn5Bias.h5", and "files-archive" from https://zenodo.org/records/7121027. I placed them in the ../../data/shared/precomputedTn5Bias/ directory as instructed, but I'm encountering an error when running the following command.

  1. I'm unsure which files are needed for precomputedTn5Bias. The files which I have downloaded are correct?
  2. Are these files specific to your tutorial data, or can they be used with other data, such as mine?
  3. I would greatly appreciate any advice you could offer regarding the following error message.

if(file.exists(paste0(projectDataDir, "predBias.rds"))){ regionBias(project) <- readRDS(paste0(projectDataDir, "predBias.rds")) }else{ project <- getPrecomputedBias(project, nCores = 8) saveRDS(regionBias(project), paste0(projectDataDir, "predBias.rds")) } Error in H5File.open(filename, mode, file_create_pl, file_access_pl) : HDF5-API Errors: error #000: ../../src/H5F.c in H5Fopen(): line 620: unable to open file class: HDF5 major: File accessibility minor: Unable to open file

error #001: ../../src/H5VLcallback.c in H5VL_file_open(): line 3501: failed to iterate over available VOL connector plugins
    class: HDF5
    major: Virtual Object Layer
    minor: Iteration failed

error #002: ../../src/H5PLpath.c in H5PL__path_table_iterate(): line 578: can't iterate over plugins in plugin path '(null)'
    class: HDF5
    major: Plugin for dynamically loaded library
    minor: Iteration failed

error #003: ../../src/H5PLpath.c in H5PL__path_table_iterate_process_path(): line 712: can't open directory
    class: HDF5
    major: Plugin for dynamically loaded library
    minor: Can't open directory or file

error #004: ../../src/H5VLcallback.c in H5VL__file_open(): line 3351: open failed
    class: HDF5
    major: Virtu

Called from: H5File.open(filename, mode, file_create_pl, file_access_pl)

Yu Hatano

HYsxe commented 6 months ago

Hi,

Apologies for the late reply. What is the genome are you using when you create the footprintingProject objet?

If you are using hg38, dm6, or mm10, you should only be needing the precomputed bias file like hg38Tn5Bias.h5 and I think you are putting them in the right directory. Could you also show me the absolute path of your current working directory and the absolute path to your data/shared/precomputedTn5Bias directory?

Thanks!

m03077yhtnt commented 3 months ago

Thank you for your reply and sorry for my super late reply. I have restarted it again, and have faced the same issue. The genome I am using is hg38. My directory is as follows. projectMainDir <- "E:/R/RNAandATAC3_d30RNAUMAP/ATAC_R/PRINT/" projectDataDir is "E:/R/RNAandATAC3_d30RNAUMAP/ATAC_R/PRINT/data/Tutorial/" absolute path to my data/shared/precomputedTn5Bias directory is "E:/R/RNAandATAC3_d30RNAUMAP/ATAC_R/PRINT/data/shared/precomputedTn5Bias"

Many thanks

HYsxe commented 2 months ago

This seems correct. Maybe we can try simplifying the issue. Seems like you are having problem accessing this h5 file.

Inside the getPrecomputedBias function, the line of code that accesses the h5 files is this

library(hdf5r)
H5File$new(h5_path, mode="r")

Coud you try using the H5File$new function to directly load the hg38 file and see if it works?

If this doesn't work I'm also happy to do a zoom meeting with you to try to figure this out. Feel free to email me at yanhu@g.harvard.edu to schedule a chat!

Thanks!