Open xzt199610 opened 1 week ago
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'
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.
@GhostInTheShellwjc Thanks a lot for your answering, it works well.
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)
/ ___ (_)| | / / ____ / / / / ` \/ / / | / / \/ __/ / \ / // / / / / / / / / | |/ / / / ( ) / _// // ///\/ |/\/_/ /_/\/", 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'
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 "