Starlitnightly / omicverse

A python library for multi omics included bulk, single cell and spatial RNA-seq analysis.
https://starlitnightly.github.io/omicverse/
GNU General Public License v3.0
277 stars 32 forks source link

TypeError: enrichr() got an unexpected keyword argument 'description' #24

Closed hslwillion closed 8 months ago

hslwillion commented 9 months ago

When i run the code: deg_genes=dds.result.loc[dds.result['sig']!='normal'].index.tolist() enr=ov.bulk.geneset_enrichment(gene_list=deg_genes, pathways_dict=pathway_dict, pvalue_type='auto', organism='mouse')

The error:

TypeError Traceback (most recent call last) /home/linux/data/python_code/omic_analysis/omic_learn_bulk_different_expression.ipynb Cell 16 line 2 1 deg_genes=dds.result.loc[dds.result['sig']!='normal'].index.tolist() ----> 2 enr=ov.bulk.geneset_enrichment(gene_list=deg_genes, 3 pathways_dict=pathway_dict, 4 pvalue_type='auto', 5 organism='mouse')

File ~/data/miniconda3/envs/pyomic/lib/python3.8/site-packages/omicverse/bulk/_Enrichment.py:211, in geneset_enrichment(gene_list, pathways_dict, pvalue_threshold, pvalue_type, organism, description, background, outdir, cutoff) 208 elif (organism == 'Human') or (organism == 'human') or (organism == 'hs'): 209 background='hsapiens_gene_ensembl' --> 211 enr = gp.enrichr(gene_list=gene_list, 212 gene_sets=pathways_dict, 213 organism=organism, # don't forget to set organism to the one you desired! e.g. Yeast 214 description=description, 215 background=background, 216 outdir=outdir, 217 cutoff=cutoff # test dataset, use lower value from range(0,1) 218 ) 219 if pvalue_type=='auto': 220 if enr.res2d.shape[0]>100:

TypeError: enrichr() got an unexpected keyword argument 'description'

Starlitnightly commented 8 months ago

Maybe you need to downgrade pyGSEA, refer to the following code

pip install gseapy==0.10.8
hslwillion commented 8 months ago

Maybe you need to downgrade pyGSEA, refer to the following code

pip install gseapy==0.10.8

Thanks for your reply!

It's solved the problem.

My sincere thanks again!

With best wishes.