Skip to content

estimateScaleFactor uses old (python2) iteritems  #942

@EricDeveaud

Description

@EricDeveaud

Hello,

while running some tests after installation of deeptTools/3.4.1 I got an error running estimateScaleFactor due to the use of dict.iteritems that was removed in python3
see: https://wiki.python.org/moin/Python3.0#Built-In_Changes

Remove dict.iteritems(), dict.iterkeys(), and dict.itervalues().
      Instead: use dict.items(), dict.keys(), and dict.values() respectively. 
  • Paste your deepTools version (deeptools --version) and your python
    version (python --version) below.
[gensoft@f5317eb70a51 deepTools-3.4.1]$ deeptools --version
deeptools 3.4.1
[gensoft@f5317eb70a51 deepTools-3.4.1]$ python3 --version
Python 3.8.1
  • Paste the full deepTools command that produces the issue below
    (ignore if you simply spotted the issue in the code/documentation).
[gensoft@f5317eb70a51 3.4.1]$ estimateScaleFactor --bamfiles ../../datas/deepTools/phiX.bam ../../datas/deepTools/phiX.bam --numberOfSamples 1000
1,000 number of samples will be computed.
/local/gensoft2/exe/deepTools/3.4.1/venv/lib/python3.8/site-packages/numpy/core/fromnumeric.py:3334: RuntimeWarning: Mean of empty slice.
  return _methods._mean(a, axis=axis, dtype=dtype,
Traceback (most recent call last):
  File "/local/gensoft2/exe/deepTools/3.4.1/bin/estimateScaleFactor", line 115, in <module>
    main(args)
  File "/local/gensoft2/exe/deepTools/3.4.1/bin/estimateScaleFactor", line 109, in main
    for k, v in sizeFactorsDict.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions