The function calculates an interaction score between two sets of genes based on a protein-protein interaction network.
getInteractionScore(a, b, ppi, maxInteract)
character vector, set of gene identifiers.
a data.frame
, Protein-protein interaction (PPI) network data
frame. The object is expected to have three columns, Gene1
and
Gene2
which specify the gene names of the interacting proteins
in no particular order (symmetric interaction) and a column
combined_score
which is a numerical value of the strength of
the interaction.
numeric, Maximum interaction value in the PPI.
Interaction score between the two gene sets.
See https://doi.org/10.1186/s12864-019-5738-6 for details on the original implementation.
## Mock example showing how the data should look like
a <- c("PDHB", "VARS2", "IARS2")
b <- c("IARS2", "PDHA1")
ppi <- data.frame(
Gene1 = c("PDHB", "VARS2", "IARS2"),
Gene2 = c("IARS2", "PDHA1", "CD3"),
combined_score = c(0.5, 0.2, 0.1)
)
maxInteract <- max(ppi$combined_score)
interaction <- getInteractionScore(a, b, ppi, maxInteract)
## Example using the data available in the package
data(macrophage_topGO_example_small,
package = "GeDi",
envir = environment())
genes <- GeDi::getGenes(macrophage_topGO_example_small)
data(ppi_macrophage_topGO_example_small,
package = "GeDi",
envir = environment())
maxInteract <- max(ppi_macrophage_topGO_example_small$combined_score)
interaction <- getInteractionScore(genes[1], genes[2], ppi, maxInteract)