View source: R/overlap_coefficient.R
overlap_coefficient | R Documentation |
Calculate overlap coefficient between pathways
overlap_coefficient(pathwayA, pathwayB, pathways = NULL, organism = NULL)
pathwayA |
a character string of pathway name or pathway code or a character vector of metabolite names or metabolite codes |
pathwayB |
a character string of pathway name or pathway code or a character vector of metabolite names or metabolite codes |
pathways |
data.frame or matrix with metabolites in rows and the following information in columns:
Used if |
organism |
organism code in KEGG database. Required if
|
A value between 0 and 1 calculated with the formula:
\text{OC}(A,B) = \frac{\vert A \cap B \vert}{\min(\vert A \vert,
\vert B \vert)}
An overlap coefficient of 1 means that one pathway is included in the other. An overlap coefficient of 0 means that there is no overlap between the pathways.
Wieder C., Lai R.P.J., Ebbels T.M.D. (2022). Single sample pathway analysis in metabolomics: performance evaluation and application. BMC Bioinformatics, 23, 481. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1186/s12859-022-05005-1")}
data("MTBLS422")
pathwayA <- "Galactose metabolism"
pathwayB <- "Vitamin digestion and absorption"
overlap_coefficient(pathwayA, pathwayB, pathways)
if (requireNamespace("KEGGREST", quietly = TRUE)) {
pathwayA <- "Galactose metabolism"
pathwayB <- "Vitamin digestion and absorption"
overlap_coefficient(pathwayA, pathwayB, organism = "mmu")
}
pathwayA <- "mmu00052"
pathwayB <- "mmu00562"
overlap_coefficient(pathwayA, pathwayB, pathways)
pathwayA <- c("C00029", "C00116", "C00137", "C00794", "C00984", "C01697")
pathwayB <- c("C00191", "C00092", "C00137")
overlap_coefficient(pathwayA, pathwayB)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.