Skip to content

sspa_ssClustPA

source

sspa_ssClustPA(
   pathway_df, min_entity = 2, random_state = 0
)


K-means based clustering method for single sample pathway analysis

Args

  • mat (pd.DataFrame) : pandas DataFrame omics data matrix consisting of m rows (samples) and n columns (entities).
  • pathways (pd.DataFrame) : Dictionary 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 Do not include metadata columns Entity identifiers must match those in the matrix columns

Returns

pandas DataFrame of pathway scores derived using the ssClustPA/(proj) method. Columns represent pathways and rows represent samples.

Methods:

.fit

source

.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

source

.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 ssClustPA/(proj) method. Columns represent pathways and rows represent samples.

.fit_transform

source

.fit_transform(
   X, y = None
)


Fit the model with X and transform X.

.fit_transform_

source

.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 ssClustPA/(proj) method. Columns represent pathways and rows represent samples.