deeptools / HiCExplorer

HiCExplorer is a powerful and easy to use set of tools to process, normalize and visualize Hi-C data.
https://hicexplorer.readthedocs.org
GNU General Public License v3.0
231 stars 70 forks source link

"HiCMatrix does not exist" error when using hicMergeMatrixBins #775

Closed husseinao closed 2 years ago

husseinao commented 2 years ago

Hello,

I am trying to merge the hicmatrix I generated by using hicMergeMatrixBins with this command:

hicMergeMatrixBins --matrix testing1.h5 --numBins 100 --outFileName hicMatrix/testing1Merged_100bins.h5

However, when I run the command, I get this error:

Traceback (most recent call last): File "/data/homezvol2/aminaoh/.conda/envs/hicexplorer/bin/hicMergeMatrixBins", line 7, in main() File "/data/homezvol2/aminaoh/.conda/envs/hicexplorer/lib/python3.8/site-packages/hicexplorer/hicMergeMatrixBins.py", line 282, in main merged_matrix.save(args.outFileName) File "/data/homezvol2/aminaoh/.conda/envs/hicexplorer/lib/python3.8/site-packages/hicmatrix/HiCMatrix.py", line 104, in save self.matrixFileHandler.save(pMatrixName, pSymmetric=pSymmetric, pApplyCorrection=pApplyCorrection) File "/data/homezvol2/aminaoh/.conda/envs/hicexplorer/lib/python3.8/site-packages/hicmatrix/lib/matrixFileHandler.py", line 57, in save self.matrixFile.save(pName, pSymmetric, pApplyCorrection) File "/data/homezvol2/aminaoh/.conda/envs/hicexplorer/lib/python3.8/site-packages/hicmatrix/lib/h5.py", line 121, in save with tables.open_file(filename, mode="w", title="HiCExplorer matrix") as h5file: File "/data/homezvol2/aminaoh/.conda/envs/hicexplorer/lib/python3.8/site-packages/tables/file.py", line 315, in open_file return File(filename, mode, title, root_uep, filters, kwargs) File "/data/homezvol2/aminaoh/.conda/envs/hicexplorer/lib/python3.8/site-packages/tables/file.py", line 778, in init self._g_new(filename, mode, params) File "tables/hdf5extension.pyx", line 374, in tables.hdf5extension.File._g_new File "/data/homezvol2/aminaoh/.conda/envs/hicexplorer/lib/python3.8/site-packages/tables/utils.py", line 172, in check_file_access raise IOError("%s does not exist" % (parentname,)) OSError: hicMatrix does not exist

I used conda to download hicexplorer. HicInfo 3.7.2, Python 3.8.3.

Thanks, Amina

joachimwolff commented 2 years ago

HI Amina,

this error is confusing. It says hicMatrix does not exists, but it the rest of the error message indicates that the error comes exactly from this non-existing library. Given the rest of the error message and the check for check_file_access seems to throw the error, I assume it is maybe caused that it cannot access either your input or output file. Can you please check if a) the input file really exists (typos; access to paths; are you in the right folder etc?) and also for the output if the given file path is accessible.

I hope this helps to solve the issue.

Best,

Joachim

husseinao commented 2 years ago

Hi Joachim,

There was something wrong with the output file path. Thank you so much!

Best, Amina