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
232 stars 70 forks source link

hicTrainTADClassifier raises ValueError #890

Open bgruening opened 7 months ago

bgruening commented 7 months ago
Job in error state.. tool_id: hicexplorer_hictraintadclassifier, exit_code: 1, stderr: Fontconfig error: No writable cache directories
Traceback (most recent call last):
  File "/usr/local/bin/hicTrainTADClassifier", line 7, in <module>
    main()
  File "/usr/local/lib/python3.10/site-packages/hicexplorer/hicTrainTADClassifier.py", line 214, in main
    program.run_hicTrainClassifier(
  File "/usr/local/lib/python3.10/site-packages/hicexplorer/lib/tadClassifier.py", line 1151, in run_hicTrainClassifier
    self.multi_train(matrix_list, domain_list, protein_list, pChromosome=chromosome_list)
  File "/usr/local/lib/python3.10/site-packages/hicexplorer/lib/tadClassifier.py", line 906, in multi_train
    matrix, positions, features, is_boundary = self.prepare_train(
  File "/usr/local/lib/python3.10/site-packages/hicexplorer/lib/tadClassifier.py", line 813, in prepare_train
    matrix = TADClassifier.MP_Matrix(matrix_file,
  File "/usr/local/lib/python3.10/site-packages/hicexplorer/lib/tadClassifier.py", line 228, in __init__
    hic_ma = TADClassifier.MP_Matrix.obs_exp_normalization(hic_ma, pThreads=pThreads)
  File "/usr/local/lib/python3.10/site-packages/hicexplorer/lib/tadClassifier.py", line 417, in obs_exp_normalization
    obs_exp = _obs_exp(submatrix, pThreads)
  File "/usr/local/lib/python3.10/site-packages/hicexplorer/lib/tadClassifier.py", line 406, in _obs_exp
    csr_matrix(obs_exp_matrix_))
  File "/usr/local/lib/python3.10/site-packages/scipy/sparse/_compressed.py", line 83, in __init__
    self._set_self(self.__class__(
  File "/usr/local/lib/python3.10/site-packages/scipy/sparse/_compressed.py", line 32, in __init__
    arg1 = arg1.asformat(self.format)
  File "/usr/local/lib/python3.10/site-packages/scipy/sparse/_base.py", line 371, in asformat
    return convert_method(copy=copy)
  File "/usr/local/lib/python3.10/site-packages/scipy/sparse/_coo.py", line 401, in tocsr
    return self._csr_container(self.shape, dtype=self.dtype)
  File "/usr/local/lib/python3.10/site-packages/scipy/sparse/_compressed.py", line 44, in __init__
    self.data = np.zeros(0, getdtype(dtype, default=float))
  File "/usr/local/lib/python3.10/site-packages/scipy/sparse/_sputils.py", line 128, in getdtype
    raise ValueError(
ValueError: object dtype is not supported by sparse matrices

Could be related to https://github.com/scipy/scipy/pull/15828

Davieni4yashiro commented 5 months ago

Have you solved the problem? I encountered the same error in hicTransform:

Traceback (most recent call last): File "/home/many/anaconda3/envs/hic/bin/hicTransform", line 7, in main() File "/home/many/anaconda3/envs/hic/lib/python3.10/site-packages/hicexplorer/hicTransform.py", line 160, in main submatrix_chr = _obs_exp(submatrix) File "/home/many/anaconda3/envs/hic/lib/python3.10/site-packages/hicexplorer/hicTransform.py", line 115, in _obs_exp obs_expmatrix = convertNansToZeros(csr_matrix(obs_expmatrix)) File "/home/many/anaconda3/envs/hic/lib/python3.10/site-packages/scipy/sparse/_compressed.py", line 84, in init self._set_self(self.class( File "/home/many/anaconda3/envs/hic/lib/python3.10/site-packages/scipy/sparse/_compressed.py", line 33, in init arg1 = arg1.asformat(self.format) File "/home/many/anaconda3/envs/hic/lib/python3.10/site-packages/scipy/sparse/_base.py", line 376, in asformat return convert_method(copy=copy) File "/home/many/anaconda3/envs/hic/lib/python3.10/site-packages/scipy/sparse/_coo.py", line 392, in tocsr return self._csr_container(self.shape, dtype=self.dtype) File "/home/many/anaconda3/envs/hic/lib/python3.10/site-packages/scipy/sparse/_compressed.py", line 45, in init self.data = np.zeros(0, getdtype(dtype, default=float)) File "/home/many/anaconda3/envs/hic/lib/python3.10/site-packages/scipy/sparse/_sputils.py", line 113, in getdtype raise ValueError( ValueError: object dtype is not supported by sparse matrices