Propagate weighted single sample logFCs down the pathway topologies to compute single sample perturbation scores for each pathway

compute_perturbation_score(weightedFC, gsTopology)

Arguments

weightedFC

A matrix of weighted single sample logFCs derived from function weight_ss_fc()

gsTopology

List of pathway topology matrices generated using function retrieve_topology()

Value

A list where each element is a matrix corresponding to a pathway. Each column of an element corresponds to a sample.

Details

This function use the algorithm adopted from SPIA (see citation) to compute a single sample perturbation score per sample per pathway. The rownames of the weighted single sample logFC matrix and the pathway topology matrices must use the same type of gene identifier (ie. entrez ID).

References

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.

Examples

#compute weighted single sample logFCs
data(metadata_example)
data(logCPM_example)
ls <- weight_ss_fc(logCPM_example, metadata = metadata_example,
factor = "patient", control = "Vehicle")

# explore all databases supported by graphite
graphite::pathwayDatabases()
#>          species     database
#> 1      athaliana         kegg
#> 2      athaliana     pathbank
#> 3      athaliana wikipathways
#> 4        btaurus         kegg
#> 5        btaurus     pathbank
#> 6        btaurus     reactome
#> 7        btaurus wikipathways
#> 8       celegans         kegg
#> 9       celegans     pathbank
#> 10      celegans     reactome
#> 11      celegans wikipathways
#> 12   cfamiliaris         kegg
#> 13   cfamiliaris     reactome
#> 14   cfamiliaris wikipathways
#> 15 dmelanogaster         kegg
#> 16 dmelanogaster     pathbank
#> 17 dmelanogaster     reactome
#> 18 dmelanogaster wikipathways
#> 19        drerio         kegg
#> 20        drerio     reactome
#> 21        drerio wikipathways
#> 22         ecoli         kegg
#> 23         ecoli     pathbank
#> 24         ecoli wikipathways
#> 25       ggallus         kegg
#> 26       ggallus     reactome
#> 27       ggallus wikipathways
#> 28      hsapiens         kegg
#> 29      hsapiens      panther
#> 30      hsapiens     pathbank
#> 31      hsapiens     pharmgkb
#> 32      hsapiens     reactome
#> 33      hsapiens        smpdb
#> 34      hsapiens wikipathways
#> 35     mmusculus         kegg
#> 36     mmusculus     pathbank
#> 37     mmusculus     reactome
#> 38     mmusculus wikipathways
#> 39   rnorvegicus         kegg
#> 40   rnorvegicus     pathbank
#> 41   rnorvegicus     reactome
#> 42   rnorvegicus wikipathways
#> 43   scerevisiae         kegg
#> 44   scerevisiae     pathbank
#> 45   scerevisiae     reactome
#> 46   scerevisiae wikipathways
#> 47       sscrofa         kegg
#> 48       sscrofa     reactome
#> 49       sscrofa wikipathways
#> 50       xlaevis         kegg
gsTopology <- retrieve_topology(database = "kegg")
ssPertScore <- compute_perturbation_score(ls$logFC, gsTopology)