XiaoTaoWang / HiC_pipeline

An easy-to-use Hi-C data processing software supporting distributed computation.
http://xiaotaowang.github.io/HiC_pipeline/index.html
GNU General Public License v3.0
53 stars 20 forks source link

KeyError in the process of merging biological replicates #12

Open kyzhu opened 1 year ago

kyzhu commented 1 year ago

Hi XiaoTao,

Nice and easy to use pipeline. However I got KeyError occasionally in runHiC filtering after printing Merge biological replicates .... The error did not always occur - some samples work fine while the others not. Traceback showed the error occurs in

  File "runHiC", line 834, in <module>
    run(args, commands)
  File "runHiC", line 284, in run
    args.func(args, commands)
  File "runHiC", line 670, in filtering
    stats_pool, outpath = enzyme_level(filenames, outpre, keys, outkey, stats_pool, tmpdir, nproc_in, nproc_out, args.memory)
  File "/lib/python3.7/site-packages/runHiC/filtering.py", line 185, in enzyme_level
    merge_stats(stats_pool, keys, outkey)
  File "/lib/python3.7/site-packages/runHiC/filtering.py", line 165, in merge_stats
    stats_pool[outkey] = deepcopy(stats_pool[keys[0]])
KeyError: (<sample name>, <enzyme name>, <replicate name>)

So is there any way I can get around the error by manually running some commands, or it should be easy to debug and fix?

Thanks!