brentp / somalier

fast sample-swap and relatedness checks on BAMs/CRAMs/VCFs/GVCFs... "like damn that is one smart wine guy"
MIT License
255 stars 35 forks source link

`ancestry-predict.py` error #24

Closed fgvieira closed 4 years ago

fgvieira commented 4 years ago

Error when running ancestry-predict.py:

Traceback (most recent call last):
  File "ancestry-predict.py", line 128, in <module>
    alpha=0.15, c=[colors[i % len(colors)]], ec='none')
  File "/services/tools/anaconda3/4.4.0/lib/python3.6/site-packages/matplotlib/__init__.py", line 1810, in inner
    return func(ax, *args, **kwargs)
  File "/services/tools/anaconda3/4.4.0/lib/python3.6/site-packages/matplotlib/axes/_axes.py", line 4300, in scatter
    collection.update(kwargs)
  File "/services/tools/anaconda3/4.4.0/lib/python3.6/site-packages/matplotlib/artist.py", line 916, in update
    ret = [_update_property(self, k, v) for k, v in props.items()]
  File "/services/tools/anaconda3/4.4.0/lib/python3.6/site-packages/matplotlib/artist.py", line 916, in <listcomp>
    ret = [_update_property(self, k, v) for k, v in props.items()]
  File "/services/tools/anaconda3/4.4.0/lib/python3.6/site-packages/matplotlib/artist.py", line 912, in _update_property
    raise AttributeError('Unknown property %s' % k)
AttributeError: Unknown property ec

I think lines should be:

        axes[0].scatter(bg_reduced[sel, 0], bg_reduced[sel, 1], label=l, s=8,
                alpha=0.15, c=[colors[i % len(colors)]])
brentp commented 4 years ago

"ec" should be edgecolor in matplotlib. perhaps you have an older version?

fgvieira commented 4 years ago

Ah, yes... had version 3.0.7! now works fine... thanks,