Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to get ax when calling barplot() #171

Closed
nathaliehsieh opened this issue Oct 31, 2022 · 2 comments
Closed

unable to get ax when calling barplot() #171

nathaliehsieh opened this issue Oct 31, 2022 · 2 comments

Comments

@nathaliehsieh
Copy link

Setup

I am reporting a problem with GSEApy version, Python version, and operating
system as follows:

3.8.6 | packaged by conda-forge | (default, Jan 25 2021, 23:21:18) 
[GCC 9.3.0]
CPython
Linux-4.15.0-169-generic-x86_64-with-glibc2.10
0.14.0

Expected behaviour

get ax when calling barplot() without setting 'ofname' to visualize the enrichr results.

Actual behaviour

When I run ax = barplot(enr.res2d) , I got 'NoneType' object returned.

import gseapy as gp
from gseapy.plot import barplot

enr = gp.enrichr(gene_list=gene_list, # or "./tests/data/gene_list.txt",
                 gene_sets=['KEGG_2016','KEGG_2021_Human'],
                 organism='human', # don't forget to set organism to the one you desired! e.g. Yeast
                 outdir=None, # don't write to disk
                )
ax = barplot(enr.res2d,title='KEGG_2021_Human', figsize=(3, 5))
print(type(ax))

output

image

Steps to reproduce


Thank you!

zqfang pushed a commit that referenced this issue Oct 31, 2022
@zqfang
Copy link
Owner

zqfang commented Oct 31, 2022

Hi @nathaliehsieh,

Thanks for reporting the bug. The quickest way to get the ax it to delete line 879-880 of code in below:

image

@zqfang
Copy link
Owner

zqfang commented Nov 26, 2022

The newest release fixed this issue.

@zqfang zqfang closed this as completed Nov 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants