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

issues with enrichr #243

Open
SaBay89 opened this issue Jan 28, 2024 · 2 comments
Open

issues with enrichr #243

SaBay89 opened this issue Jan 28, 2024 · 2 comments

Comments

@SaBay89
Copy link

SaBay89 commented Jan 28, 2024

Setup

I am reporting a problem with GSEApy version 0.10.5, Python version 3.8.8, and operating
system in windows (jupyter notebook) as follows:

import gseapy

# assign a list object to enrichr
gl = ['SCARA3', 'LOC100044683', 'CMBL', 'CLIC6', 'IL13RA1', 'TACSTD2', 'DKKL1', 'CSF1',
     'SYNPO2L', 'TINAGL1', 'PTX3', 'BGN', 'HERC1', 'EFNA1', 'CIB2', 'PMP22', 'TMEM173']

gseapy.enrichr(gene_list=gl, gene_sets='KEGG_2016', outdir='test')

# or a txt file path.
gseapy.enrichr(gene_list='gene_list.txt', gene_sets='KEGG_2016',
               outdir='test', cutoff=0.05, format='png' )

I get the following error:

AttributeError: 'DataFrame' object has no attribute 'append'

Can you explain what is wrong ? Thank you

@rachebouche
Copy link

I have the same error
python = 3.11
pandas = 2.0.3
code :

gene_symbols = ['GNAI1', 'SPP1', 'IKZF1', 'TGFBR2', 'TLR4', 'MBOAT7', 'CCNB2', 'MYLK', 'CDKN1A', 'ZNF586', 'WASHC4', 'SRC', 'UGDH', 'CDK6', 'HMG20B']

gp.enrichr(gene_list=gene_symbols, gene_sets="GO_Biological_Process_2023", outdir=None)

It seems to be an error related to pandas. Maybe it could be corrected by using pandas.concat() instead of pandas.DataFrame.append() ?


AttributeError Traceback (most recent call last)
/tmp/ipykernel_98143/1600401673.py in ?()
----> 1 gp.enrichr(gene_list=gene_symbols, gene_sets="GO_Biological_Process_2023", outdir=None, )

~/miniconda3/envs/dataproc/lib/python3.11/site-packages/gseapy/enrichr.py in ?(gene_list, gene_sets, description, outdir, cutoff, format, figsize, top_term, no_plot, verbose)
299 :return: An Enrichr object, which obj.res2d contains your enrichr query.
300 """
301 enr = Enrichr(gene_list, gene_sets, description, outdir,
302 cutoff, format, figsize, top_term, no_plot, verbose)
--> 303 enr.run()
304
305 return enr

~/miniconda3/envs/dataproc/lib/python3.11/site-packages/gseapy/enrichr.py in ?(self)
169 shortID, res = self.get_results(genes_list)
170 # Remember gene set library used
171 res["Gene_set"] = self._gs
172 # Append to master dataframe
--> 173 self.results = self.results.append(res, ignore_index=True)
174 self.res2d = res
175 sleep(2)
176 if self._outdir is None: continue

~/miniconda3/envs/dataproc/lib/python3.11/site-packages/pandas/core/generic.py in ?(self, name)
...
5987 ):
5988 return self[name]
-> 5989 return object.getattribute(self, name)

AttributeError: 'DataFrame' object has no attribute 'append'

@zqfang
Copy link
Owner

zqfang commented Feb 8, 2024

Hello, could you please update GSEApy to the latest version? This should fix the issue we are currently experiencing. Thank you.

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

3 participants