Closed gdolsten closed 2 years ago
Can you supply a short working example?
Here is an example with BED:
prot.bed:
chr4 150 155 . 0 .
in python:
frame = (
BED('../peaks/for_coolbox/prot.bed') + Spacer()
)
frame.plot(f'chr4:{100}-{200}')
Error message:
[WARNING:plot.py:166 - plot_genes()] *Warning* No intervals were found for file ../peaks/for_coolbox/Trl.bed in Track 'BED.168' for the interval plotted (4:100-200).
WARNING:coolbox.core.track.bed.plot:*Warning* No intervals were found for file ../peaks/for_coolbox/Trl.bed in Track 'BED.168' for the interval plotted (4:100-200).
Nevermind, I solved this issue, I had no XAxis()
Hi, I am trying to use my GTF file with Coolbox but I am noticing some errors. Sometimes, a gene will be all the way to the left or the right. Other times, I get the following error:
[ERROR:frame.py:212 - plot()] Error occured when plot track: track name: GTF.5 track type:<class 'coolbox.core.track.gtf.GTF'> Error: <class 'ValueError'> Axis limits cannot be NaN or Inf occurred in "/Users/gabrieladolsten/opt/miniconda3/lib/python3.8/site-packages/coolbox/core/frame/frame.py", line 206 ERROR:coolbox.core.frame.frame:Error occured when plot track: track name: GTF.5 track type:<class 'coolbox.core.track.gtf.GTF'> Error: <class 'ValueError'> Axis limits cannot be NaN or Inf occurred in "/Users/gabrieladolsten/opt/miniconda3/lib/python3.8/site-packages/coolbox/core/frame/frame.py", line 206 [ERROR:frame.py:219 - plot()] Axis limits cannot be NaN or Inf Traceback (most recent call last): File "/Users/gabrieladolsten/opt/miniconda3/lib/python3.8/site-packages/coolbox/core/frame/frame.py", line 206, in plot track.plot(ax, copy(gr), gr2=copy(gr2)) File "/Users/gabrieladolsten/opt/miniconda3/lib/python3.8/site-packages/coolbox/core/track/gtf.py", line 141, in plot record.plot( File "/Users/gabrieladolsten/opt/miniconda3/lib/python3.8/site-packages/dna_features_viewer/GraphicRecord/MatplotlibPlottableMixin.py", line 544, in plot self.finalize_ax( File "/Users/gabrieladolsten/opt/miniconda3/lib/python3.8/site-packages/dna_features_viewer/GraphicRecord/MatplotlibPlottableMixin.py", line 109, in finalize_ax ax.set_ylim(ymin, ymax) File "/Users/gabrieladolsten/opt/miniconda3/lib/python3.8/site-packages/matplotlib/axes/_base.py", line 3568, in set_ylim top = self._validate_converted_limits(top, self.convert_yunits) File "/Users/gabrieladolsten/opt/miniconda3/lib/python3.8/site-packages/matplotlib/axes/_base.py", line 3213, in _validate_converted_limits raise ValueError("Axis limits cannot be NaN or Inf") ValueError: Axis limits cannot be NaN or Inf ERROR:coolbox.core.frame.frame:Axis limits cannot be NaN or Inf Traceback (most recent call last): File "/Users/gabrieladolsten/opt/miniconda3/lib/python3.8/site-packages/coolbox/core/frame/frame.py", line 206, in plot track.plot(ax, copy(gr), gr2=copy(gr2)) File "/Users/gabrieladolsten/opt/miniconda3/lib/python3.8/site-packages/coolbox/core/track/gtf.py", line 141, in plot record.plot( File "/Users/gabrieladolsten/opt/miniconda3/lib/python3.8/site-packages/dna_features_viewer/GraphicRecord/MatplotlibPlottableMixin.py", line 544, in plot self.finalize_ax( File "/Users/gabrieladolsten/opt/miniconda3/lib/python3.8/site-packages/dna_features_viewer/GraphicRecord/MatplotlibPlottableMixin.py", line 109, in finalize_ax ax.set_ylim(ymin, ymax) File "/Users/gabrieladolsten/opt/miniconda3/lib/python3.8/site-packages/matplotlib/axes/_base.py", line 3568, in set_ylim top = self._validate_converted_limits(top, self.convert_yunits) File "/Users/gabrieladolsten/opt/miniconda3/lib/python3.8/site-packages/matplotlib/axes/_base.py", line 3213, in _validate_converted_limits raise ValueError("Axis limits cannot be NaN or Inf") ValueError: Axis limits cannot be NaN or Inf
Do you know what is the source of this error?