XiaoTaoWang / EagleC

A deep-learning framework for predicting a full range of structural variations from bulk and single-cell contact maps
Other
52 stars 8 forks source link

No module named 'eaglec.scoreUtils' #31

Open jiadong324 opened 1 year ago

jiadong324 commented 1 year ago

Dear author,

I am trying to run EagleC on tumor data. The .hic file is generated by juicer and converted to .cool with hic2cool of 5k, 10k and 50k resolution.

The error is listed below:

root                      INFO    @ 09/06/23 19:52:32: Predict SVs at 5kb resolution ...
Traceback (most recent call last):
  File "/data/home/jdlin/miniconda3/envs/3dgenome/bin/predictSV-single-resolution", line 276, in <module>
    run()
  File "/data/home/jdlin/miniconda3/envs/3dgenome/bin/predictSV-single-resolution", line 110, in run
    from eaglec.scoreUtils import intraPredict, interPredict
ModuleNotFoundError: No module named 'eaglec.scoreUtils'
Traceback (most recent call last):
  File "/data/home/jdlin/miniconda3/envs/3dgenome/bin/predictSV", line 176, in <module>
    run()
  File "/data/home/jdlin/miniconda3/envs/3dgenome/bin/predictSV", line 112, in run
    subprocess.check_call(' '.join(command), shell=True)
  File "/data/home/jdlin/miniconda3/envs/3dgenome/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'predictSV-single-resolution -H /data/home/jdlin/Prostate/A/HiC/inter_5k.cool --balance-type ICE -O /data/home/jdlin/Prostate/A/HiC/eagleC/A.eagleC.CNN_SVs.5K.txt --genome other --output-format full -C "#" "X" --prob-cutoff 0.8 --logFile /data/home/jdlin/Prostate/A/HiC/eagleC/A.eagleC.log' returned non-zero exit status 1.

Looking forward to your reply! Thanks!

XiaoTaoWang commented 1 year ago

Hi, you may need to upgrade your Python to 3.8 to address this issue. Please refer to issue #19 for more details.

jiadong324 commented 1 year ago

Thanks for your quick response!

I've upgrade to Python 3.8 and executed download-pretrained-models under the conda environment. It came up with the following error:

Traceback (most recent call last):
  File "/data/home/jdlin/miniconda3/envs/HiCSV/bin/predictSV-single-resolution", line 276, in <module>
    run()
  File "/data/home/jdlin/miniconda3/envs/HiCSV/bin/predictSV-single-resolution", line 122, in run
    if clr.info['nnz'] < 100000000:
KeyError: 'nnz'
Traceback (most recent call last):
  File "/data/home/jdlin/miniconda3/envs/HiCSV/bin/predictSV", line 176, in <module>
    run()
  File "/data/home/jdlin/miniconda3/envs/HiCSV/bin/predictSV", line 112, in run
    subprocess.check_call(' '.join(command), shell=True)
  File "/data/home/jdlin/miniconda3/envs/HiCSV/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'predictSV-single-resolution -H /data/home/jdlin/Prostate/A/HiC/inter_5k.cool --balance-type ICE -O /data/home/jdlin/Prostate/A/HiC/eagleC/A.eagleC.CNN_SVs.5K.txt --genome other --output-format full -C "#" "X" --prob-cutoff 0.8 --logFile /data/home/jdlin/Prostate/A/HiC/eagleC/A.eagleC.log' returned non-zero exit status 1.
XiaoTaoWang commented 1 year ago

Hi, it appears that your cool file was not generated properly, because "nnz" is supposed to be stored in the metadata of a valid cool file. Please refer to this page for more details: https://cooler.readthedocs.io/en/latest/schema_v2.html#metadata

jiadong324 commented 1 year ago

Hi,

I used juicer to generate the .hic file, and than covert it to .cool file with hic2cool convert test.hic test_5k.cool -r 5000. Other .cool files with different resolution were generated with different -r options.

jiadong324 commented 1 year ago

Hi,

I found the previous issue could be solved by using hicexplorer for data coversion.

However, I get new issues while running predictSV --balance-type CNV --hic-5k $cooldir/inter_5k_5000.cool --hic-10k $cooldir/inter_10k_10000.cool --hic-50k $cooldir/inter_50k_50000.cool -O $outdir/$sample".eagleC" --genome other. It seems that something wrong with CUDA and a key error 'sweight'.

2023-09-18 21:21:00.358080: W tensorflow/compiler/xla/stream_executor/platform/default/dso_lo
ader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: c
annot open shared object file: No such file or directory
2023-09-18 21:21:00.358102: I tensorflow/compiler/xla/stream_executor/cuda/cudart_stub.cc:29]
 Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2023-09-18 21:21:01.387563: W tensorflow/compiler/xla/stream_executor/platform/default/dso_lo
ader.cc:64] Could not load dynamic library 'libnvinfer.so.7'; dlerror: libnvinfer.so.7: canno
t open shared object file: No such file or directory
2023-09-18 21:21:01.387647: W tensorflow/compiler/xla/stream_executor/platform/default/dso_lo
ader.cc:64] Could not load dynamic library 'libnvinfer_plugin.so.7'; dlerror: libnvinfer_plug
in.so.7: cannot open shared object file: No such file or directory
2023-09-18 21:21:01.387657: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Wa
rning: Cannot dlopen some TensorRT libraries. If you would like to use Nvidia GPU with Tensor
RT, please make sure the missing libraries mentioned above are installed properly.
root                      INFO    @ 09/18/23 21:21:02: matched sequencing depth in human at 1
0Kb: 325905455.27076757
root                      INFO    @ 09/18/23 21:21:02: Load CNN models from /data/home/jdlin/
miniconda3/envs/HiCSV/lib/python3.8/site-packages/eaglec/data/bulk/300M-800M ...
2023-09-18 21:21:02.710648: W tensorflow/compiler/xla/stream_executor/platform/default/dso_lo
ader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
2023-09-18 21:21:02.710695: W tensorflow/compiler/xla/stream_executor/cuda/cuda_driver.cc:265] failed call to cuInit: UNKNOWN ERROR (303)
Traceback (most recent call last):
  File "/data/home/jdlin/miniconda3/envs/HiCSV/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3653, in get_loc
    return self._engine.get_loc(casted_key)
  File "pandas/_libs/index.pyx", line 147, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/index.pyx", line 176, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 7080, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 7088, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'sweight'
XiaoTaoWang commented 1 year ago

Hi, for this error, you may refer to issue #29 for a solution.

jiadong324 commented 1 year ago

I am able to get the SV calls in 10K and 50K resolutions, but the 5K resolution is not generated and thus raise the error at the merging step.

FileNotFoundError: [Errno 2] No such file or directory: '/data/home/jdlin/Prostate/A/HiC/eagleC/A.eagleC.CNN_SVs.5K.txt'
Traceback (most recent call last):
  File "/data/home/jdlin/miniconda3/envs/HiCSV/bin/predictSV", line 176, in <module>
    run()
  File "/data/home/jdlin/miniconda3/envs/HiCSV/bin/predictSV", line 159, in run
    subprocess.check_call(' '.join(command), shell=True)
  File "/data/home/jdlin/miniconda3/envs/HiCSV/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'merge-multiple-resolutions --hic-10k /data/home/jdlin/Prostate/A/HiC/inter_10k_10000.cool --hic-5k /data/home/jdlin/Prostate/A/HiC/inter_5k_5000.cool --balance-type ICE -C "#" "X" --full-sv-files /data/home/jdlin/Prostate/A/HiC/eagleC/A.eagleC.CNN_SVs.5K.txt /data/home/jdlin/Prostate/A/HiC/eagleC/A.eagleC.CNN_SVs.10K_highres.txt /data/home/jdlin/Prostate/A/HiC/eagleC/A.eagleC.CNN_SVs.50K_highres.txt -O /data/home/jdlin/Prostate/A/HiC/eagleC/A.eagleC.CNN_SVs.5K_combined.txt --buff-size 50000 --output-format full --cache-10k .inter_10k_10000.cool.291111431.ICE.None.100000.None --cache-5k .inter_5k_5000.cool.312602734.ICE.None.100000.None' returned non-zero exit status 1.

I found similar issue here https://github.com/XiaoTaoWang/EagleC/issues/24. But it seems not applicable to my case, where I cannot find the folders or files you recommended to remove.