XiaoTaoWang / EagleC

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

FileNotFoundError: [Errno 2] No such file or directory: 'Sample.CNN_SVs.10K.txt' #24

Closed abhijitcbio closed 1 year ago

abhijitcbio commented 1 year ago

Hi,

I managed to run EagleC on most of my samples and they finished successfully. But for some of the samples, I have received the following error

Traceback (most recent call last):
  File "/home/abhijit/.local/bin/predictSV-single-resolution", line 276, in <module>
    run()
  File "/home/abhijit/.local/bin/predictSV-single-resolution", line 227, in run
    intra_expected_count = intraPredict(clr, cnn_models, chroms, cache_folder, seq_depth,
  File "eaglec/scoreUtils.pyx", line 1237, in eaglec.scoreUtils.intraPredict
  File "/home/abhijit/.local/lib/python3.8/site-packages/eaglec/utilities.py", line 450, in load_SVs_full
    with open(fil, 'r') as source:
FileNotFoundError: [Errno 2] No such file or directory: Sample.CNN_SVs.10K.txt'
Traceback (most recent call last):
  File "/home/abhijit/.local/bin/predictSV", line 176, in <module>
    run()
  File "/home/abhijit/.local/bin/predictSV", line 130, in run
    subprocess.check_call(' '.join(command), shell=True)
  File "/home/abhijit/miniconda3/envs/py38/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'predictSV-single-resolution -H ./mcools_files/Sample_1Kb.mcool::/resolutions/5000 --balance-type Raw -O Sample.CNN_SVs.10K_highres.txt --genome hg38 --low-resolution-breaks Sample.CNN_SVs.10K.txt --region-size 25000 -C "#" "X" --output-format full --prob-cutoff 0 --logFile Sample.log --cache-folder Sample_1Kb.mcool.296756349.Raw.None.100000.None' returned non-zero exit status 1.

This is the EagleC command

+ predictSV --hic-5k ./mcools_files/Sample_1Kb.mcool::/resolutions/5000 --hic-10k ./mcools_files/Sample_1Kb.mcool::/resolutions/10000 --hic-50k ./mcools_files/Sample_1Kb.mcool::/resolutions/50000 -O Sample -g hg38 --balance-type Raw --output-format NeoLoopFinder
root                      INFO    @ 04/24/23 11:44:50:
# ARGUMENT LIST:
# Cool URI at 5kb = ./mcools_files/Sample_1Kb.mcool::/resolutions/5000
# Cool URI at 10kb = ./mcools_files/Sample_1Kb.mcool::/resolutions/10000
# Cool URI at 50kb = ./mcools_files/Sample_1Kb.mcool::/resolutions/50000
# Balance Type = Raw
# Reference Genome = hg38
# Included Chromosomes = ['#', 'X']
# Probability Cutoff for 5kb SVs = 0.8
# Probability Cutoff for 10kb SVs = 0.8
# Probability Cutoff for 50kb SVs = 0.99999
# Output File Prefix = Sample
# Output Format = NeoLoopFinder
# Log file name = Sample.log

This is the mcool file conversion log

+ hic2cool convert Sample_1Kb.hic Sample_1Kb.mcool
##########################
### hic2cool / convert ###
##########################
### Header info from hic
... Chromosomes:  ['ALL', 'M', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', 'X', 'Y']
... Resolutions:  [2500000, 1000000, 500000, 250000, 100000, 50000, 25000, 10000, 5000]
... Normalizations:  ['VC', 'VC_SQRT', 'KR']
... Genome:  hg38
### Converting
... Resolution 2500000 took: 3.0350983142852783 seconds.
... Resolution 1000000 took: 11.69859790802002 seconds.
... Resolution 500000 took: 42.468045711517334 seconds.
... Resolution 250000 took: 154.32829523086548 seconds.
... Resolution 100000 took: 385.3717827796936 seconds.
... Resolution 50000 took: 533.3046452999115 seconds.
... Resolution 25000 took: 654.9617240428925 seconds.
... Resolution 10000 took: 823.1433110237122 seconds.
... Resolution 5000 took: 960.6333713531494 seconds.
### Finished! Output written to: Sample_1Kb.mcool
... This file is higlass compatible.

It seems like the mcool file has the 10Kb data but EagleC is unable to use that. Your help is much appreciated.

XiaoTaoWang commented 1 year ago

Hi, thanks for this feedback. To address this issue, could you please try executing the command "rm -rf .Sample_1Kb.mcool/lock" under the directory where you submitted the job, and then re-submit your job?

Sometimes this error occurs when jobs are unexpectedly terminated, and removing the lock files generated during previous runs can help you resume the job.

Let me know if that works. Thanks!

abhijitcbio commented 1 year ago

Thanks a lot, it worked.