dputhier / pygtftk

A python package and a set of shell commands to handle GTF files
GNU General Public License v3.0
44 stars 6 forks source link

profile: etst fail with plotnine 0.7.1 #136

Closed dputhier closed 3 years ago

dputhier commented 4 years ago
     gtftk profile -D -i mini_real_tx.zip -g tx_classes -t tx_classes.txt -f bwig  -o profile_tx -pf png -if  example_07.png -w -nm ranging -K toto

  Traceback (most recent call last):
    File "/Users/puthier/miniconda3/envs/pygtftk_dev/bin/gtftk", line 4, in <module>
      __import__('pkg_resources').run_script('pygtftk==1.1.5', 'gtftk')
    File "/Users/puthier/miniconda3/envs/pygtftk_dev/lib/python3.7/site-packages/pkg_resources/__init__.py", line 665, in run_script
      self.require(requires)[0].run_script(script_name, ns)
    File "/Users/puthier/miniconda3/envs/pygtftk_dev/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1463, in run_script
      exec(code, namespace, namespace)
    File "/Users/puthier/miniconda3/envs/pygtftk_dev/lib/python3.7/site-packages/pygtftk-1.1.5-py3.7-macosx-10.9-x86_64.egg/EGG-INFO/scripts/gtftk", line 104, in <module>
      args = main()
    File "/Users/puthier/miniconda3/envs/pygtftk_dev/lib/python3.7/site-packages/pygtftk-1.1.5-py3.7-macosx-10.9-x86_64.egg/EGG-INFO/scripts/gtftk", line 89, in main
      CmdManager.run(args)
    File "/Users/puthier/miniconda3/envs/pygtftk_dev/lib/python3.7/site-packages/pygtftk-1.1.5-py3.7-macosx-10.9-x86_64.egg/pygtftk/cmd_manager.py", line 959, in run
      fun(**args)
    File "/Users/puthier/miniconda3/envs/pygtftk_dev/lib/python3.7/site-packages/pygtftk-1.1.5-py3.7-macosx-10.9-x86_64.egg/pygtftk/plugins/profile.py", line 1171, in profile
      ha='left')
    File "/Users/puthier/miniconda3/envs/pygtftk_dev/lib/python3.7/site-packages/plotnine/geoms/geom_text.py", line 112, in __init__
      geom.__init__(self, mapping, data, **kwargs)
    File "/Users/puthier/miniconda3/envs/pygtftk_dev/lib/python3.7/site-packages/plotnine/geoms/geom.py", line 37, in __init__
      kwargs = data_mapping_as_kwargs((mapping, data), kwargs)
    File "/Users/puthier/miniconda3/envs/pygtftk_dev/lib/python3.7/site-packages/plotnine/utils.py", line 962, in data_mapping_as_kwargs
      raise PlotnineError(msg.format(duplicates))
  plotnine.exceptions.PlotnineError: "Aesthetics {'ha'} specified two times."
dputhier commented 3 years ago

So I would naturally go for plotnine 0.5.1 (as previous release) but then I get:

Traceback (most recent call last):
  File "/Users/puthier/miniconda3/envs/pygtftk_dev/bin/gtftk", line 4, in <module>
    __import__('pkg_resources').run_script('pygtftk==1.1.5', 'gtftk')
  File "/Users/puthier/miniconda3/envs/pygtftk_dev/lib/python3.7/site-packages/pkg_resources/__init__.py", line 665, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/Users/puthier/miniconda3/envs/pygtftk_dev/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1463, in run_script
    exec(code, namespace, namespace)
  File "/Users/puthier/miniconda3/envs/pygtftk_dev/lib/python3.7/site-packages/pygtftk-1.1.5-py3.7-macosx-10.9-x86_64.egg/EGG-INFO/scripts/gtftk", line 104, in <module>
    args = main()
  File "/Users/puthier/miniconda3/envs/pygtftk_dev/lib/python3.7/site-packages/pygtftk-1.1.5-py3.7-macosx-10.9-x86_64.egg/EGG-INFO/scripts/gtftk", line 89, in main
    CmdManager.run(args)
  File "/Users/puthier/miniconda3/envs/pygtftk_dev/lib/python3.7/site-packages/pygtftk-1.1.5-py3.7-macosx-10.9-x86_64.egg/pygtftk/cmd_manager.py", line 959, in run
    fun(**args)
  File "/Users/puthier/miniconda3/envs/pygtftk_dev/lib/python3.7/site-packages/pygtftk-1.1.5-py3.7-macosx-10.9-x86_64.egg/pygtftk/plugins/profile.py", line 1070, in profile
    p += scale_x_continuous(expand=[0, 0], breaks=ticks, labels=labels)
  File "/Users/puthier/miniconda3/envs/pygtftk_dev/lib/python3.7/site-packages/plotnine/scales/scale.py", line 485, in __init__
    scale.__init__(self, **kwargs)
  File "/Users/puthier/miniconda3/envs/pygtftk_dev/lib/python3.7/site-packages/plotnine/scales/scale.py", line 93, in __init__
    if cbook.iterable(self.breaks) and cbook.iterable(self.labels):
AttributeError: module 'matplotlib.cbook' has no attribute 'iterable'
dputhier commented 3 years ago

I restarted with a fresh conda, deleted matplotlib from my conda env and reinstall...

 rm -rf /Users/puthier/miniconda3/envs/pygtftk_dev/lib/python3.7/site-packages/matplotlib*
 conda install -c anaconda matplotlib

but I get:

 raise DistributionNotFound(req, requirers)

pkg_resources.DistributionNotFound: The 'matplotlib>=3.0.0' distribution was not found and is required by plotnine, pygtftk

So I install it with pip:

pip install matplotlib==3.3.1

But I got

 if cbook.iterable(self.breaks) and cbook.iterable(self.labels):
 AttributeError: module 'matplotlib.cbook' has no attribute 'iterable'

 Hum...