bxlab / hifive

Tools for handling HiC and 5C data
MIT License
22 stars 8 forks source link

error handling w/ insufficient memory #9

Open jamesdalg opened 6 years ago

jamesdalg commented 6 years ago

Sometimes, without sufficient ram, quasar crashes. I've encountered this several times. In this case, I'm using 256GB of ram and it's insufficient to generate correct stats for 10kb. Traceback (most recent call last): File "/data/CCRBioinfo/dalgleishjl/quasarenv/bin/hifive", line 849, in main() File "/data/CCRBioinfo/dalgleishjl/quasarenv/bin/hifive", line 93, in main run(args) File "/data/CCRBioinfo/dalgleishjl/quasarenv/lib/python2.7/site-packages/hifive/commands/find_quasar_scores.py", line 134, in run q1.print_report(args.report) File "/data/CCRBioinfo/dalgleishjl/quasarenv/lib/python2.7/site-packages/hifive/quasar.py", line 642, in print_report self._print_txt_report(filename, qscores, rscores) File "/data/CCRBioinfo/dalgleishjl/quasarenv/lib/python2.7/site-packages/hifive/quasar.py", line 855, in _print_txt_report temp = [label, self._num2str(cov), "%0.6f" % qscores[-1, i, j]] IndexError: index 1 is out of bounds for axis 1 with size 1

msauria commented 6 years ago

I agree this is an issue. I will look into improving this.

jamesdalg commented 6 years ago

Also helpful. With 5kb, it takes >1024GB to run. Question-- is there documentation that explains the per chromosome metrics in the text report?

msauria commented 6 years ago

The best thing to do is look at https://www.biorxiv.org/content/early/2017/11/14/204438 The per chromosome metrics are the same as the global metric, as for as calculation. They're less useful unless you're really interested in looking at chromosome variation.