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
470 stars 57 forks source link

I want to reproduce the examples in the code tutorial, but the following problem occurs. Is it due to version inconsistency? #212

Open xzt199610 opened 1 week ago

xzt199610 commented 1 week ago

ov.utils.download_pathway_database()

pathway_dict=ov.utils.geneset_prepare('genesets/WikiPathways_2019_Mouse.txt',organism='Mouse')

rnk=dds.ranking2gsea()

gsea_obj=ov.bulk.pyGSEA(rnk,pathway_dict) enrich_res=gsea_obj.enrichment()

gsea_obj.enrich_res.head() gsea_obj.plot_enrichment(num=10,node_size=[10,20,30], cax_fontsize=12, fig_title='Wiki Pathway Enrichment',fig_xlabel='Fractions of genes', figsize=(4,4),cmap='YlGnBu', text_knock=2,text_maxsize=30, cax_loc=[2.5, 0.45, 0.5, 0.02] )

gsea_obj.enrich_res.index[:5] # 获取行标签的前5个索引

p2 = gsea_obj.plot_gsea(term_num=1, gene_set_title='Matrix Metalloproteinases', figsize=(3,4), cmap='RdBu_r', title_fontsize=14, title_y=0.95)


/ ___ (_)| | / / ____ / / / / ` \/ / / | / / \/ __/ / \ / // / / / / / / / / | |/ / / / ( ) / _// // ///\/ |/\/_/ /_/\/
Version: 1.6.8, Tutorials: https://omicverse.readthedocs.io/ Traceback (most recent call last): File "/home/shuaiyongzhang/anaconda3/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3553, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "", line 24, in p2 = gsea_obj.plot_gsea(term_num=1, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/shuaiyongzhang/anaconda3/lib/python3.11/site-packages/omicverse/bulk/_Enrichment.py", line 422, in plot_gsea g = GSEAPlot( ^^^^^^^^^ TypeError: GSEAPlot.init() missing 2 required positional arguments: 'tag' and 'runes'

GhostInTheShellwjc commented 1 week ago

Downgrading your gseapy to 0.10.8 may help.However,I really hope if the newest gseapy would join in the next version of omicverse.

xzt199610 commented 1 week ago

@GhostInTheShellwjc Thanks a lot for your answering, it works well.