3DGenomes / TADbit

TADbit is a complete Python library to deal with all steps to analyze, model and explore 3C-based data. With TADbit the user can map FASTQ files to obtain raw interaction binned matrices (Hi-C like matrices), normalize and correct interaction matrices, identify and compare the so-called Topologically Associating Domains (TADs), build 3D models from the interaction matrices, and finally, extract structural properties from the models. TADbit is complemented by TADkit for visualizing 3D models
GNU General Public License v3.0
100 stars 61 forks source link

plot_distance_vs_interactions issue #279

Open dawe opened 5 years ago

dawe commented 5 years ago

Hi again, During the tests I'm running, I've slipped into this error from plot_distance_vs_interactions function

 ddi = plot_distance_vs_interactions(reads, savefig='DDI.png', axe = ax,  max_diff=10000, resolution=1000000)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dcittaro/.local/lib/python2.7/site-packages/pytadbit/mapping/analyze.py", line 430, in plot_distance_vs_interactions
    for k in xrange(max(dist_intr[diff]) - diff)]
ValueError: max() arg is an empty sequence

Any hint on how to tackle this is appreciated.

fransua commented 5 years ago

Hi @dawe sorry for the late repply. I guess that the problem here is that there is not data point in a given range. Perhaps you can play with the min_diff and max_diff parameters to focus on the range of distances where you do have data.

We will try to make TADbit robust to this case in the future.

thanks for reporting