deeptools / HiCExplorer

HiCExplorer is a powerful and easy to use set of tools to process, normalize and visualize Hi-C data.
https://hicexplorer.readthedocs.org
GNU General Public License v3.0
233 stars 70 forks source link

hicFindEnrichedContacts issue #78

Closed apaytuvi closed 7 years ago

apaytuvi commented 7 years ago

I want to find enriched contacts between matrix1.npz and matrix2.npz. They come from different cell types. For that, I call the following command:

hicFindEnrichedContacts --matrix matrix1.npz --originalMat matrix2.npz --outFileName enrichedcontacts_zscore.npz --method z-score

And what I get is:

Traceback (most recent call last):
  File "/usr/bin/hicFindEnrichedContacts", line 4, in <module>
    __import__('pkg_resources').run_script('HiCExplorer==1.3', 'hicFindEnrichedContacts')
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 738, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1499, in run_script
    exec(code, namespace, namespace)
  File "/DATA/centos/usr/lib/python2.7/site-packages/HiCExplorer-1.3-py2.7.egg/EGG-INFO/scripts/hicFindEnrichedContacts", line 7, in <module>
    main()
  File "/usr/lib/python2.7/site-packages/HiCExplorer-1.3-py2.7.egg/hicexplorer/hicFindEnrichedContacts.py", line 149, in main
    depth_in_bins=max_depth_in_bins)
  File "/usr/lib/python2.7/site-packages/HiCExplorer-1.3-py2.7.egg/hicexplorer/utilities.py", line 75, in transformMatrix
    counts_by_distance, cut_intervals = hicma.getCountsByDistance(per_chr=per_chr, depth_in_bins=depth_in_bins)
TypeError: getCountsByDistance() got an unexpected keyword argument 'depth_in_bins'
fidelram commented 7 years ago

I will need to check this..

Apart from that, the hicFindEnrichedContacts works with a corrected hi-c matrix (--matrix) and its uncorrected matrix (--originalMat) not with two matrices from different cell lines.

This is done to remove spurious enriched contacts coming from the correction.

fidelram commented 7 years ago

I modified the hicFindEnrichment code and now it should work (see 7d47403df14aca44ddf81542e5bd7ac55a5bbc03). This is now part of release 1.7.2

apaytuvi commented 7 years ago

@fidelram Thank you,

the plot given by hicFindEnrichment (or the output txt file) takes into account library sizes to make different samples comparable? Do hicFindEnrichmentnormalize by the library size of the different samples?

Thank you, A.