sspa_ssGSEA
sspa_ssGSEA(
pathway_df, min_entity = 2
)
Barbie et al ssGSEA method for single sample pathway analysis.
Uses the ssgsea function of the gseapy package (https://github.com/zqfang/GSEApy) as a backend.
All credit for ssGSEA code goes to developers of the GSEAPY python package (credit: Zhuoqing Fang, Xinyuan Liu, Gary Peltz, GSEApy: a comprehensive package for performing gene set enrichment analysis in Python, Bioinformatics, 2022;, btac757, https://doi.org/10.1093/bioinformatics/btac757)
Args
- pathway_df (pd.DataFrame) : pandas DataFrame of pathway identifiers (keys) and corresponding list of pathway entities (values).
- min_entity (int) : minimum number of metabolites mapping to pathways for ssPA to be performed Entity identifiers must match those in the matrix columns
Returns
pandas DataFrame of pathway scores derived using the ssGSEA method. Columns represent pathways and rows represent samples.
Methods:
.fit
.fit(
X, y = None
)
Fit the model with X.
Args
- X (pd.DataFrame) : pandas DataFrame omics data matrix consisting of m rows (samples) and n columns (entities). Do not include metadata columns
Returns
- self : object
.transform
.transform(
X, y = None
)
Transform X.
Args
- X (pd.DataFrame) : pandas DataFrame omics data matrix consisting of m rows (samples) and n columns (entities). Do not include metadata columns
Returns
pandas DataFrame of pathway scores derived using the ssGSEA method. Columns represent pathways and rows represent samples.
.fit_transform
.fit_transform(
X, y = None
)
Fit the model with X and transform X.
Args
- X (pd.DataFrame) : pandas DataFrame omics data matrix consisting of m rows (samples) and n columns (entities). Do not include metadata columns
Returns
pandas DataFrame of pathway scores derived using the ssGSEA method. Columns represent pathways and rows represent samples.