phasegenomics / hic_qc

A (very) simple script to QC Hi-C data.
GNU Affero General Public License v3.0
25 stars 5 forks source link

ERROR provided too many kwargs, #60

Closed ddelgadillod closed 3 years ago

ddelgadillod commented 3 years ago

Hi

I want to measure the quality of my HiC data reads, I tried to run ALIGNING AND QCING PHASE GENOMICS HI-C DATA tutorial, hic_qc script install and bwa step runs well, so when I tried to execute hic_qc.py script from installation path I obtain ValueError provided too many kwargs, can only pass {'basex', 'subsx', nonposx'} or {'basey', 'subsy', nonposy'}. You passed {'nonpositive': 'clip'}

And extract of terminal output as follows:

(hic_qc) ddelgadillo@COMOSPLNXU09:~/Software/hic_qc$ python hic_qc.py -b tests/collateral/input/abc_test.bam -r
[hic_qc - 2021-03-26 15:31:59,685] parsing the first 1000000 read pairs in bam file tests/collateral/input/abc_test.bam to Q                  C Hi-C library quality
Traceback (most recent call last):
  File "hic_qc.py", line 1147, in <module>
    QC.plot_histograms()
  File "hic_qc.py", line 596, in plot_histograms
    plt.yscale('log', nonpositive='clip')
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/pyplot.py", line 3084, in yscale
    return gca().set_yscale(value, **kwargs)
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/axes/_base.py", line 3704, in set_ys                  cale
    ax.yaxis._set_scale(value, **kwargs)
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/axis.py", line 767, in _set_scale
    self._scale = mscale.scale_factory(value, self, **kwargs)
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/scale.py", line 569, in scale_factor                  y
    return _scale_mapping[scale](axis, **kwargs)
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/scale.py", line 249, in __init__
    "{!r}".format(kwargs))
ValueError: provided too many kwargs, can only pass {'basex', 'subsx', nonposx'} or {'basey', 'subsy', nonposy'}.  You passe                  d {'nonpositive': 'clip'}
(hic_qc) ddelgadillo@COMOSPLNXU09:~/Software/hic_qc$ python hic_qc.py -b /home/bioinfo/HiFiPotato/Hi-C/alCnV1PEHQC.bam -r -o qc
[hic_qc - 2021-03-26 15:36:19,863] parsing the first 1000000 read pairs in bam file /home/bioinfo/HiFiPotato/Hi-C/alCnV1PEHQC.bam to QC Hi-C library quality
Traceback (most recent call last):
  File "hic_qc.py", line 1147, in <module>
    QC.plot_histograms()
  File "hic_qc.py", line 596, in plot_histograms
    plt.yscale('log', nonpositive='clip')
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/pyplot.py", line 3084, in yscale
    return gca().set_yscale(value, **kwargs)
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/axes/_base.py", line 3704, in set_yscale
    ax.yaxis._set_scale(value, **kwargs)
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/axis.py", line 767, in _set_scale
    self._scale = mscale.scale_factory(value, self, **kwargs)
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/scale.py", line 569, in scale_factory
    return _scale_mapping[scale](axis, **kwargs)
  File "/home/ddelgadillo/miniconda3/envs/hic_qc/lib/python3.6/site-packages/matplotlib/scale.py", line 249, in __init__
    "{!r}".format(kwargs))
ValueError: provided too many kwargs, can only pass {'basex', 'subsx', nonposx'} or {'basey', 'subsy', nonposy'}.  You passed {'nonpositive': 'clip'}

Thank some much for your attention

shawnpg commented 3 years ago

Hi,

Can you check what version of matplotlib you have installed? Arguments like "nonposy" and "nonposx" were changed to "nonpositive" in matplotlib 3.3.0, and we've just taken a change to update hic_qc to comply. https://matplotlib.org/3.3.0/api/prev_api_changes/api_changes_3.3.0/deprecations.html

Thanks for reporting this!

ddelgadillod commented 3 years ago

Hi

Thanks for the response, the current matplotlib version is 3.0.3, which was installed by conda install method, and it's the same that indicated in the env.yml file, I tried to downgrade this to matplotlib v2.2.4, but on install process has conflicts with versions of some packages already installed.

bnelsj commented 3 years ago

Hi, this issue was just resolved by #62 . Please pull from master, update your env using the new yml file and try again. Thanks for reporting!