Closed jinghuazhao closed 1 year ago
Hi Jing Hua,
Could you also copy the error/warning regarding the ".as_matrix" message?
-- Ruth D. Johnson PhD Student Dept of Computer Science University of California, Los Angeles @.***
On Fri, Nov 11, 2022 at 11:59 AM Jing Hua Zhao @.***> wrote:
I am running CANVIS under Python 2.7.18 with the following problem,
python CANVIS.py -l chr4.3473139.rs6831256.post.filt.300 -z ldl.Zscore tg.Zscore -r chr4.3473139.rs6831256.ld.filt.300 -a chr4.3473139.rs6831256.annot.filt.300 -s E066.H3K27ac.narrowPeak.Adult_Liver E066.H3K4me1.narrowPeak.Adult_Liver -t 99 -i 3381705 3507346
... first complaints about .as_matrix should be .values() go away when changing to .to_numpy()
Traceback (most recent call last): File "CANVIS.py", line 518, in main() File "CANVIS.py", line 492, in main zscore_plots = Plot_Statistic_Value(location, zscores, zscore_names, greyscale, ld) File "CANVIS.py", line 124, in Plot_Statistic_Value sub = fig.add_subplot(1,1,1, axisbg='white') File "/usr/local/Cluster-Apps/ceuadmin/PAINTOR/3.0/CANVIS/lib/python2.7/site-packages/matplotlib/figure.py", line 1257, in add_subplot a = subplot_class_factory(projection_class)(self, *args, kwargs) File "/usr/local/Cluster-Apps/ceuadmin/PAINTOR/3.0/CANVIS/lib/python2.7/site-packages/matplotlib/axes/_subplots.py", line 77, in init self._axes_class.init(self, fig, self.figbox, kwargs) File "/usr/local/Cluster-Apps/ceuadmin/PAINTOR/3.0/CANVIS/lib/python2.7/site-packages/matplotlib/axes/_base.py", line 541, in init self.update(kwargs) File "/usr/local/Cluster-Apps/ceuadmin/PAINTOR/3.0/CANVIS/lib/python2.7/site-packages/matplotlib/artist.py", line 888, in update for k, v in props.items()] File "/usr/local/Cluster-Apps/ceuadmin/PAINTOR/3.0/CANVIS/lib/python2.7/site-packages/matplotlib/artist.py", line 881, in _update_property raise AttributeError('Unknown property %s' % k) AttributeError: Unknown property axisbg
Any suggestions?
— Reply to this email directly, view it on GitHub https://github.com/gkichaev/PAINTOR_V3.0/issues/63, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQBOD32QEHFTZWPTJQEOCTWH2QQDANCNFSM6AAAAAAR54TNJ4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Sure. This is the message from run_canvis.sh
CANVIS.py:69: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.
ld_matrix = ld.as_matrix()
CANVIS.py:85: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.
annotations = annotations.as_matrix()
CANVIS.py:89: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.
zscores = zscores.as_matrix()
CANVIS.py:91: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.
pos_prob = pos_prob.as_matrix()
CANVIS.py:93: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead.
location = location.as_matrix()
Traceback (most recent call last):
File "CANVIS.py", line 518, in
Thanks for the information.
It looks like the numpy .as_matrix() message is only a warning and that the main error is from matplotlib. Can you confirm that you have the correct matplotlib versions listed in the Github?
According to a preliminary search, this is the source of the error:
https://stackoverflow.com/questions/50504053/attributeerror-unknown-property-axisbg
The code base is pretty straightforward, so you might be able to just implement the change listed in the StackOverflow post if you don't want to fiddle with the versions.
-- Ruth D. Johnson PhD Student Dept of Computer Science University of California, Los Angeles @.***
On Sat, Nov 12, 2022 at 1:07 AM Jing Hua Zhao @.***> wrote:
Sure. This is the message from run_canvis.sh CANVIS.py:69: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. ld_matrix = ld.as_matrix() CANVIS.py:85: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. annotations = annotations.as_matrix() CANVIS.py:89: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. zscores = zscores.as_matrix() CANVIS.py:91: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. pos_prob = pos_prob.as_matrix() CANVIS.py:93: FutureWarning: Method .as_matrix will be removed in a future version. Use .values instead. location = location.as_matrix() Traceback (most recent call last): File "CANVIS.py", line 518, in main() File "CANVIS.py", line 492, in main zscore_plots = Plot_Statistic_Value(location, zscores, zscore_names, greyscale, ld) File "CANVIS.py", line 124, in Plot_Statistic_Value sub = fig.add_subplot(1,1,1, axisbg='white') File "/usr/local/Cluster-Apps/ceuadmin/PAINTOR/3.0/CANVIS/lib/python2.7/site-packages/matplotlib/figure.py", line 1257, in add_subplot a = subplot_class_factory(projection_class)(self, *args, kwargs) File "/usr/local/Cluster-Apps/ceuadmin/PAINTOR/3.0/CANVIS/lib/python2.7/site-packages/matplotlib/axes/_subplots.py", line 77, in init self._axes_class.init(self, fig, self.figbox, kwargs) File "/usr/local/Cluster-Apps/ceuadmin/PAINTOR/3.0/CANVIS/lib/python2.7/site-packages/matplotlib/axes/_base.py", line 541, in init self.update(kwargs) File "/usr/local/Cluster-Apps/ceuadmin/PAINTOR/3.0/CANVIS/lib/python2.7/site-packages/matplotlib/artist.py", line 888, in update for k, v in props.items()] File "/usr/local/Cluster-Apps/ceuadmin/PAINTOR/3.0/CANVIS/lib/python2.7/site-packages/matplotlib/artist.py", line 881, in _update_property raise AttributeError('Unknown property %s' % k) AttributeError: Unknown property axisbg
— Reply to this email directly, view it on GitHub https://github.com/gkichaev/PAINTOR_V3.0/issues/63#issuecomment-1312419295, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQBOD3HODRHJNFYLW2OL4TWH5M37ANCNFSM6AAAAAAR54TNJ4 . You are receiving this because you commented.Message ID: @.***>
Thanks. I now follow specifications from wiki with a requirements.txt, so that 'pip freeze' gives me
cycler==0.10.0 functools32==3.2.3.post2 lxml==4.9.1 matplotlib==2.0.0 numpy==1.12.0 pandas==0.15.2 pyparsing==2.4.7 python-dateutil==2.8.2 pytz==2022.6 scipy==0.15.1 seaborn==0.7.1 six==1.16.0 subprocess32==3.5.4 svgutils==0.3.4
It does indicate facecolor option but another complaint.
/usr/local/Cluster-Apps/ceuadmin/PAINTOR/3.0/CANVIS/lib/python2.7/site-packages/matplotlib/cbook.py:136: MatplotlibDeprecationWarning: The axisbg attribute was deprecated in version 2.0. Use facecolor instead.
warnings.warn(message, mplDeprecation, stacklevel=1)
Traceback (most recent call last):
File "CANVIS.py", line 518, in
Ah I see. Can you downgrade your svgutils to "svgutils==0.2.0". I believe the error stems from this.
-- Ruth D. Johnson PhD Student Dept of Computer Science University of California, Los Angeles @.***
On Sun, Nov 13, 2022 at 2:46 PM Jing Hua Zhao @.***> wrote:
Thanks. I now follow specifications from wiki with a requirements.txt, so that 'pip freeze' gives me
cycler==0.10.0 functools32==3.2.3.post2 lxml==4.9.1 matplotlib==2.0.0 numpy==1.12.0 pandas==0.15.2 pyparsing==2.4.7 python-dateutil==2.8.2 pytz==2022.6 scipy==0.15.1 seaborn==0.7.1 six==1.16.0 subprocess32==3.5.4 svgutils==0.3.4
It does indicate facecolor option but another complaint.
/usr/local/Cluster-Apps/ceuadmin/PAINTOR/3.0/CANVIS/lib/python2.7/site-packages/matplotlib/cbook.py:136: MatplotlibDeprecationWarning: The axisbg attribute was deprecated in version 2.0. Use facecolor instead. warnings.warn(message, mplDeprecation, stacklevel=1) Traceback (most recent call last): File "CANVIS.py", line 518, in main() File "CANVIS.py", line 505, in main Assemble_Figure(zscore_plots, value_plots, heatmap, annotation_plot, output, horizontal) File "CANVIS.py", line 364, in Assemble_Figure plot4.moveto(0,y_scale, scale=1.40) TypeError: moveto() got an unexpected keyword argument 'scale'
— Reply to this email directly, view it on GitHub https://github.com/gkichaev/PAINTOR_V3.0/issues/63#issuecomment-1312841920, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQBOD3CDR7EEYT4R7NRC3LWIFVR3ANCNFSM6AAAAAAR54TNJ4 . You are receiving this because you commented.Message ID: @.***>
Hi Ruth,
I just returned to this and indeed with svgutils 0.2.0 the script runs successfully.
Kind regards,
Jing Hua
Great! I'm glad this got resolved. I'll update the readme to explicitly list the version for svgutils.
-- Ruth D. Johnson PhD Student Dept of Computer Science University of California, Los Angeles @.***
On Thu, Nov 17, 2022 at 12:20 PM Jing Hua Zhao @.***> wrote:
Hi Ruth,
I just returned to this and indeed with svgutils 0.2.0 the script runs successfully.
Kind regards,
Jing Hua
— Reply to this email directly, view it on GitHub https://github.com/gkichaev/PAINTOR_V3.0/issues/63#issuecomment-1319154711, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACQBODYCKDKL4PAC2CURY43WI2HOVANCNFSM6AAAAAAR54TNJ4 . You are receiving this because you commented.Message ID: @.***>
I am running CANVIS under Python 2.7.18 with the following problem,
python CANVIS.py -l chr4.3473139.rs6831256.post.filt.300 -z ldl.Zscore tg.Zscore -r chr4.3473139.rs6831256.ld.filt.300 -a chr4.3473139.rs6831256.annot.filt.300 -s E066.H3K27ac.narrowPeak.Adult_Liver E066.H3K4me1.narrowPeak.Adult_Liver -t 99 -i 3381705 3507346
... first complaints about .as_matrix should be .values() go away when changing to .to_numpy()
Traceback (most recent call last): File "CANVIS.py", line 518, in
main()
File "CANVIS.py", line 492, in main
zscore_plots = Plot_Statistic_Value(location, zscores, zscore_names, greyscale, ld)
File "CANVIS.py", line 124, in Plot_Statistic_Value
sub = fig.add_subplot(1,1,1, axisbg='white')
File "/usr/local/Cluster-Apps/ceuadmin/PAINTOR/3.0/CANVIS/lib/python2.7/site-packages/matplotlib/figure.py", line 1257, in add_subplot
a = subplot_class_factory(projection_class)(self, *args, kwargs)
File "/usr/local/Cluster-Apps/ceuadmin/PAINTOR/3.0/CANVIS/lib/python2.7/site-packages/matplotlib/axes/_subplots.py", line 77, in init
self._axes_class.init(self, fig, self.figbox, kwargs)
File "/usr/local/Cluster-Apps/ceuadmin/PAINTOR/3.0/CANVIS/lib/python2.7/site-packages/matplotlib/axes/_base.py", line 541, in init
self.update(kwargs)
File "/usr/local/Cluster-Apps/ceuadmin/PAINTOR/3.0/CANVIS/lib/python2.7/site-packages/matplotlib/artist.py", line 888, in update
for k, v in props.items()]
File "/usr/local/Cluster-Apps/ceuadmin/PAINTOR/3.0/CANVIS/lib/python2.7/site-packages/matplotlib/artist.py", line 881, in _update_property
raise AttributeError('Unknown property %s' % k)
AttributeError: Unknown property axisbg
Any suggestions?