Open spiderzbh opened 2 years ago
Hi,
the file ending in command (a) is wrong. First, you write hdf5 instead of h5. However, h5 is our HiCExplorer specific file format, and I don't think a study from 2016 used HiCExplorer to create their files! I know it is a bit confusing, but hdf5 is a generalised container format, we just use it, but the internal structure of the file is specific to HiCExplorer. For (b) you specify a h5 but it tries to load a cool file. And then it complains that certain data structures are not available. This indicates that the file you try to load is neither a HiCExplorer specific h5 nor a cool file.
To confirm my assumption, I downloaded one of the files of the given GSE, and yes, the content looks very different from what we are expecting for HiCExplorer:
Compare to: https://hicexplorer.readthedocs.io/en/latest/content/file-formats.html#interaction-matrix-format-h5
Long story short: Please try to load data formats that HiCExplorer actually supports!
Best,
Joachim
Hi Joachim,
Thank you for the information, that's really helpful. Besides that, I was wondering if it is possible for you to tell me if there is any software I can use to convert the hdf5 files to HiCExplorer specific h5s or cool files.
Thanks, Bohan
Hi Joachim,
I've run into a similar problem as Bohan. I downloaded publicly available Hi-C data in hdf5 format and would like to convert this to a cool file. I thought that hdf5 and h5 are interchangable file extensions, so I tried with with hicConvertFormat
but got essentially the same error as Bohan's Output from B posted above. Any help would be greatly appreciated!
Thanks, Jasmin
Welcome to the HiCExplorer GitHub repository! Before opening the issue please check that the following requirements are met :
[x] Search whether this issue (or a similar issue) has been solved before using the search tab above. Link the previous issue if appropriate below. Didn't find a similar issue.
[x] Paste your HiCExplorer version (
hicInfo --version
) and your python version (python --version
) below. hicInfo 3.7.2; Python 3.8.3.[x] Have you checked our documentation on hicexplorer.readthedocs.io? Yes.
[x] Do you use conda to install HiCExplorer? Yes, I used conda to instal the software. (conda install hicexplorer -c bioconda -c conda-forge)
[x] Do you use the latest HiCExplorer release? If not, please install it via a conda environment:
conda create --name hicexplorer hicexplorer=3.6 python=3.8 -c bioconda -c conda-forge
and activate the environment:conda activate hicexplorer
. Retry your command. You can exit a conda environment viaconda deactivate
. To learn more about conda and environments, please consider the following documentation. The HiCExplorer is the latest version.Retry your command, is it solved now? If not please continue with the following:
[x] Paste the full HiCExplorer command that produces the issue below (ignore if you simply spotted the issue in the code/documentation). Command A: hicFindTADs -m GSE77565_FBP_IC-heatmap-chr-40k.hdf5 --outPrefix tmp --correctForMultipleTesting fdr Command B: hicFindTADs -m GSE77565_FBD_40K.h5 --outPrefix tmp --correctForMultipleTesting fdr
[x] Paste the output printed on screen from the command that produces the issue below (ignore if you simply spotted the issue in the code/documentation). Output from A: Traceback (most recent call last): File "/home/bz10/usr/miniconda3/bin/hicFindTADs", line 7, in
main()
File "/home/bz10/usr/miniconda3/lib/python3.8/site-packages/hicexplorer/hicFindTADs.py", line 1313, in main
ft = HicFindTads(args.matrix, num_processors=args.numberOfProcessors, max_depth=args.maxDepth,
File "/home/bz10/usr/miniconda3/lib/python3.8/site-packages/hicexplorer/hicFindTADs.py", line 375, in init
self.set_matrix(matrix, pChromosomes)
File "/home/bz10/usr/miniconda3/lib/python3.8/site-packages/hicexplorer/hicFindTADs.py", line 396, in set_matrix
self.hic_ma = hm.hiCMatrix(pMatrix)
File "/home/bz10/usr/miniconda3/lib/python3.8/site-packages/hicmatrix/HiCMatrix.py", line 59, in init
raise Exception('Matrix failed to load: {}'.format(str(matrixFileHandler_load[1])))
Exception: Matrix failed to load: 'No cooler found at: GSE77565_FBP_IC-heatmap-chr-40k.hdf5.'
Output from B:
Traceback (most recent call last):
File "/home/bz10/usr/miniconda3/bin/hicFindTADs", line 7, in
main()
File "/home/bz10/usr/miniconda3/lib/python3.8/site-packages/hicexplorer/hicFindTADs.py", line 1313, in main
ft = HicFindTads(args.matrix, num_processors=args.numberOfProcessors, max_depth=args.maxDepth,
File "/home/bz10/usr/miniconda3/lib/python3.8/site-packages/hicexplorer/hicFindTADs.py", line 375, in init
self.set_matrix(matrix, pChromosomes)
File "/home/bz10/usr/miniconda3/lib/python3.8/site-packages/hicexplorer/hicFindTADs.py", line 396, in set_matrix
self.hic_ma = hm.hiCMatrix(pMatrix)
File "/home/bz10/usr/miniconda3/lib/python3.8/site-packages/hicmatrix/HiCMatrix.py", line 56, in init
matrixFileHandler_load = self.matrixFileHandler.load()
File "/home/bz10/usr/miniconda3/lib/python3.8/site-packages/hicmatrix/lib/matrixFileHandler.py", line 51, in load
return self.matrixFile.load()
File "/home/bz10/usr/miniconda3/lib/python3.8/site-packages/hicmatrix/lib/h5.py", line 35, in load
matrix = csr_matrix(tuple([parts['data'], parts['indices'], parts['indptr']]),
KeyError: 'data'
Data from GSE77565.
Thanks, Bohan