You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ERROR:frame.py:215 - plot()] Error occured when plot track:
track name: SNP.14
track type:<class 'coolbox.core.track.hist.snp.SNP'>
Error: <class 'KeyError'> 'score'
occurred in "/opt/conda/lib/python3.8/site-packages/coolbox/core/frame/frame.py", line 209
[ERROR:frame.py:222 - plot()] 'score'
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3080, in get_loc
return self._engine.get_loc(casted_key)
File "pandas/_libs/index.pyx", line 70, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 101, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 4554, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 4562, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'score'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/coolbox/core/frame/frame.py", line 209, in plot
track.plot(ax, copy(gr), gr2=copy(gr2))
File "/opt/conda/lib/python3.8/site-packages/coolbox/core/track/hist/base.py", line 101, in plot
data = self.fetch_plot_data(gr, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/coolbox/core/track/hist/snp.py", line 75, in fetch_plot_data
df['score'] = self.transform_fn()(df['score'])
File "/opt/conda/lib/python3.8/site-packages/pandas/core/frame.py", line 3024, in __getitem__
indexer = self.columns.get_loc(key)
File "/opt/conda/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 3082, in get_loc
raise KeyError(key) from err
KeyError: 'score'
Ideally, plotting a range containing no SNPs would just return an empty track?
The text was updated successfully, but these errors were encountered:
Hi there, thanks for such a useful package.
I have encountered a bug when I try to plot a SNP track containing no SNPs in the plotted region.
If I am working with a TSV file:
And I try to plot a track like this:
Then I get the error:
Ideally, plotting a range containing no SNPs would just return an empty track?
The text was updated successfully, but these errors were encountered: