Propagate weighted single sample logFCs down the pathway topologies to compute single sample perturbation scores for each pathway
pathway_pert(genePertScore)List of gene-wise raw perturbation score matrices generated using function raw_gene_pert()
A data.frame with 3 columns: tA (single-sample pathway-level perturbation score), sample, and gs_name (gene-set name)
This function use the algorithm adopted from SPIA (see citation) to compute a single sample perturbation score per sample per
pathway.
Tarca AL, Draghici S, Khatri P, Hassan SS, Mittal P, Kim JS, Kim CJ, Kusanovic JP, Romero R. A novel signaling pathway impact analysis. Bioinformatics. 2009 Jan 1;25(1):75-82.
#compute weighted single sample logFCs
data(metadata_example)
data(logCPM_example)
ls <- weight_ss_fc(logCPM_example, metadata = metadata_example,
factor = "patient", control = "Vehicle")
# extract all the KEGG pathways
gsTopology <- retrieve_topology(database = "kegg")
# compute raw gene-wise perturbation scores
genePertScore <- raw_gene_pert(ls$logFC, gsTopology)
# sum gene-wise perturbation scores to derive the pathway-level single-sample perturbation scores
pathwayPertScore <- pathway_pert( genePertScore)