cistrome / MIRA

Python package for analysis of multiomic single cell RNA-seq and ATAC-seq.
52 stars 7 forks source link

rna_topic_pathways(7, 500, 5, 1, True) TypeError: __init__() got an unexpected keyword argument 'location' #2

Closed shijianasdf closed 2 years ago

shijianasdf commented 2 years ago

When I run rna_topic_pathways(7, 500, 5, 1, True) follow the tutorial, I got the error as follow:

Traceback (most recent call last):
 File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3441, in run_code
 exec(code_obj, self.user_global_ns, self.user_ns)
 File "<ipython-input-61-f2c58d7c646f>", line 1, in <module>
 rna_model.plot_enrichments(7, show_top=5, show_genes=False)
 File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/topic_model/expression_model.py", line 379, in > plot_enrichments
   return mira_plot_enrichments(results, text_color = text_color, label_genes = label_genes,
 File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/plots/enrichment_plot.py", line 70, in plot_enrichments
 fig, ax = map_plot(func, list(enrichment_results.items()), plots_per_row = enrichments_per_row,
 File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/plots/base.py", line 29, in map_plot
 func(ax_i, *d)
 File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/plots/enrichment_plot.py", line 37, in _plot_enrichment
  edgecolor = map_colors(ax, np.array(adj_pvals), palette, add_legend = True,
 File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/plots/base.py", line 66, in map_colors
  plt.colorbar(colormapper, ax=ax, **cbar_kwargs)
 File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/pyplot.py", line 2194, in colorbar
  ret = gcf().colorbar(mappable, cax=cax, ax=ax, **kw)
 File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/figure.py", line 2343, in colorbar
  cb = cbar.colorbar_factory(cax, mappable, **cb_kw)
 File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/colorbar.py", line 1734, in colorbar_factory
  cb = Colorbar(cax, mappable, **kwargs)
  File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/colorbar.py", line 1228, in __init__
   ColorbarBase.__init__(self, ax, **kwargs)
 File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/cbook/deprecation.py", line 451, in wrapper
   return func(*args, **kwargs)
 TypeError: __init__() got an unexpected keyword argument 'location'
AllenWLynch commented 2 years ago

Hello,

This is an issue with the matplotlib version you have installed. Are you running the tutorial in Colab?

Occasionally, Colab will load its own matplotlib version, in which the ColorBar object does not have a location parameter.

Please check that you are running matplotlib version >= 3.5 in the notebook.


From: BioWalker @.> Sent: Tuesday, January 11, 2022 7:50 PM To: cistrome/MIRA @.> Cc: Subscribed @.***> Subject: [cistrome/MIRA] rna_topic_pathways(7, 500, 5, 1, True) TypeError: init() got an unexpected keyword argument 'location' (Issue #2)

When I run rna_topic_pathways(7, 500, 5, 1, True) follow the tutorial, I got the error as follow:

Traceback (most recent call last): File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3441, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 1, in rna_model.plot_enrichments(7, show_top=5, show_genes=False) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/topic_model/expression_model.py", line 379, in > plot_enrichments return mira_plot_enrichments(results, text_color = text_color, label_genes = label_genes, File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/plots/enrichment_plot.py", line 70, in plot_enrichments fig, ax = map_plot(func, list(enrichment_results.items()), plots_per_row = enrichments_per_row, File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/plots/base.py", line 29, in map_plot func(ax_i, *d) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/plots/enrichment_plot.py", line 37, in _plot_enrichment edgecolor = map_colors(ax, np.array(adj_pvals), palette, add_legend = True, File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/plots/base.py", line 66, in map_colors plt.colorbar(colormapper, ax=ax, cbar_kwargs) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/pyplot.py", line 2194, in colorbar ret = gcf().colorbar(mappable, cax=cax, ax=ax, kw) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/figure.py", line 2343, in colorbar cb = cbar.colorbar_factory(cax, mappable, cb_kw) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/colorbar.py", line 1734, in colorbar_factory cb = Colorbar(cax, mappable, kwargs) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/colorbar.py", line 1228, in init ColorbarBase.init(self, ax, *kwargs) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/cbook/deprecation.py", line 451, in wrapper return func(args, **kwargs) TypeError: init() got an unexpected keyword argument 'location'

— Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcistrome%2FMIRA%2Fissues%2F2&data=04%7C01%7C%7Cad8c0b79042c4d4fa14208d9d56df645%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637775490531479521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=fdy96vRxJkVklauwlI7N4uTcWA9myDviZvQnKo4U60c%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAE43JPCVOKI2WTRQB6R32L3UVTM7TANCNFSM5LXYXRAA&data=04%7C01%7C%7Cad8c0b79042c4d4fa14208d9d56df645%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637775490531479521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=225bM4tYBYaDGA%2BOkk93XIGNeikm5eSvOEVunE0vobg%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7Cad8c0b79042c4d4fa14208d9d56df645%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637775490531479521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=7LyYUXbZADMTBoeIGJYjt2QtwAPNkA3p4kvzPLKAssw%3D&reserved=0 or Androidhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7Cad8c0b79042c4d4fa14208d9d56df645%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637775490531479521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=1TFFzomiHP60%2BPr51S31LyFhM7Tls7cU8zgYildhTEQ%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.***>

shijianasdf commented 2 years ago

Hello, This is an issue with the matplotlib version you have installed. Are you running the tutorial in Colab? Occasionally, Colab will load its own matplotlib version, in which the ColorBar object does not have a location parameter. Please check that you are running matplotlib version >= 3.5 in the notebook. ____ From: BioWalker @.> Sent: Tuesday, January 11, 2022 7:50 PM To: cistrome/MIRA @.> Cc: Subscribed @.> Subject: [cistrome/MIRA] rna_topic_pathways(7, 500, 5, 1, True) TypeError: init() got an unexpected keyword argument 'location' (Issue #2) When I run rna_topic_pathways(7, 500, 5, 1, True) follow the tutorial, I got the error as follow: Traceback (most recent call last): File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3441, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 1, in rna_model.plot_enrichments(7, show_top=5, show_genes=False) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/topic_model/expression_model.py", line 379, in > plot_enrichments return mira_plot_enrichments(results, text_color = text_color, label_genes = label_genes, File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/plots/enrichment_plot.py", line 70, in plot_enrichments fig, ax = map_plot(func, list(enrichment_results.items()), plots_per_row = enrichments_per_row, File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/plots/base.py", line 29, in map_plot func(ax_i, d) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/plots/enrichment_plot.py", line 37, in _plot_enrichment edgecolor = map_colors(ax, np.array(adj_pvals), palette, add_legend = True, File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/plots/base.py", line 66, in map_colors plt.colorbar(colormapper, ax=ax, cbar_kwargs) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/pyplot.py", line 2194, in colorbar ret = gcf().colorbar(mappable, cax=cax, ax=ax, kw) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/figure.py", line 2343, in colorbar cb = cbar.colorbar_factory(cax, mappable, cb_kw) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/colorbar.py", line 1734, in colorbar_factory cb = Colorbar(cax, mappable, kwargs) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/colorbar.py", line 1228, in init ColorbarBase.init(self, ax, kwargs) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/cbook/deprecation.py", line 451, in wrapper return func(args, kwargs) TypeError: init() got an unexpected keyword argument 'location' — Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcistrome%2FMIRA%2Fissues%2F2&data=04%7C01%7C%7Cad8c0b79042c4d4fa14208d9d56df645%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637775490531479521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=fdy96vRxJkVklauwlI7N4uTcWA9myDviZvQnKo4U60c%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAE43JPCVOKI2WTRQB6R32L3UVTM7TANCNFSM5LXYXRAA&data=04%7C01%7C%7Cad8c0b79042c4d4fa14208d9d56df645%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637775490531479521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=225bM4tYBYaDGA%2BOkk93XIGNeikm5eSvOEVunE0vobg%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7Cad8c0b79042c4d4fa14208d9d56df645%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637775490531479521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=7LyYUXbZADMTBoeIGJYjt2QtwAPNkA3p4kvzPLKAssw%3D&reserved=0 or Androidhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7Cad8c0b79042c4d4fa14208d9d56df645%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637775490531479521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=1TFFzomiHP60%2BPr51S31LyFhM7Tls7cU8zgYildhTEQ%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.>

shijianasdf commented 2 years ago

Hello, This is an issue with the matplotlib version you have installed. Are you running the tutorial in Colab? Occasionally, Colab will load its own matplotlib version, in which the ColorBar object does not have a location parameter. Please check that you are running matplotlib version >= 3.5 in the notebook. ____ From: BioWalker @.> Sent: Tuesday, January 11, 2022 7:50 PM To: cistrome/MIRA @.> Cc: Subscribed @.> Subject: [cistrome/MIRA] rna_topic_pathways(7, 500, 5, 1, True) TypeError: init() got an unexpected keyword argument 'location' (Issue #2) When I run rna_topic_pathways(7, 500, 5, 1, True) follow the tutorial, I got the error as follow: Traceback (most recent call last): File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3441, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 1, in rna_model.plot_enrichments(7, show_top=5, show_genes=False) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/topic_model/expression_model.py", line 379, in > plot_enrichments return mira_plot_enrichments(results, text_color = text_color, label_genes = label_genes, File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/plots/enrichment_plot.py", line 70, in plot_enrichments fig, ax = map_plot(func, list(enrichment_results.items()), plots_per_row = enrichments_per_row, File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/plots/base.py", line 29, in map_plot func(ax_i, d) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/plots/enrichment_plot.py", line 37, in _plot_enrichment edgecolor = map_colors(ax, np.array(adj_pvals), palette, add_legend = True, File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/mira/plots/base.py", line 66, in map_colors plt.colorbar(colormapper, ax=ax, cbar_kwargs) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/pyplot.py", line 2194, in colorbar ret = gcf().colorbar(mappable, cax=cax, ax=ax, kw) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/figure.py", line 2343, in colorbar cb = cbar.colorbar_factory(cax, mappable, cb_kw) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/colorbar.py", line 1734, in colorbar_factory cb = Colorbar(cax, mappable, kwargs) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/colorbar.py", line 1228, in init ColorbarBase.init(self, ax, kwargs) File "/Users/biofly/opt/anaconda3/lib/python3.8/site-packages/matplotlib/cbook/deprecation.py", line 451, in wrapper return func(args, kwargs) TypeError: init() got an unexpected keyword argument 'location' — Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcistrome%2FMIRA%2Fissues%2F2&data=04%7C01%7C%7Cad8c0b79042c4d4fa14208d9d56df645%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637775490531479521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=fdy96vRxJkVklauwlI7N4uTcWA9myDviZvQnKo4U60c%3D&reserved=0, or unsubscribehttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAE43JPCVOKI2WTRQB6R32L3UVTM7TANCNFSM5LXYXRAA&data=04%7C01%7C%7Cad8c0b79042c4d4fa14208d9d56df645%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637775490531479521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=225bM4tYBYaDGA%2BOkk93XIGNeikm5eSvOEVunE0vobg%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7Cad8c0b79042c4d4fa14208d9d56df645%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637775490531479521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=7LyYUXbZADMTBoeIGJYjt2QtwAPNkA3p4kvzPLKAssw%3D&reserved=0 or Androidhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7Cad8c0b79042c4d4fa14208d9d56df645%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637775490531479521%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=1TFFzomiHP60%2BPr51S31LyFhM7Tls7cU8zgYildhTEQ%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.>

I was running the tutorial in my PyCharm and the matplotlib version = 3.5.0