custom signatures and ssGSEA method
Contents
custom signatures and ssGSEA method
[3]:
from GSVA import gmt_to_dataframe
import gseapy as gp
Gene Symbols Conversion for the GMT file
[ ]:
custom_signatures = gmt_to_dataframe("tests/extdata/enrichr.KEGG_2016.gmt")
ssGSEA method
ref: https://gseapy.readthedocs.io/en/latest/singlecell_example.html
[ ]:
res = gp.gsea(data=adata.to_df().T, # row -> genes, column-> samples
gene_sets="tests/extdata/enrichr.KEGG_2016.gmt",
cls=adata.obs.stim,
permutation_num=1000,
permutation_type='phenotype',
outdir=None,
method='s2n', # signal_to_noise
threads= 16)
[ ]: