Skip to contents

This function calculates protein similarity based on Gene Ontology (GO) similarity.

Usage

parGOSim(
  golist,
  type = c("go", "gene"),
  ont = c("MF", "BP", "CC"),
  organism = "human",
  measure = "Resnik",
  combine = "BMA"
)

Arguments

golist

A list, each component contains a character vector of GO terms or one Entrez Gene ID.

type

Input type for golist, "go" for GO Terms, "gene" for gene ID.

ont

Default is "MF", can be one of "MF", "BP", or "CC" subontologies.

organism

Organism name. Default is "human", can be one of "anopheles", "arabidopsis", "bovine", "canine", "chicken", "chimp", "coelicolor", "ecolik12", "ecsakai", "fly", "human", "malaria", "mouse", "pig", "rat", "rhesus", "worm", "xenopus", "yeast" or "zebrafish". Before specifying the organism, please install the corresponding genome wide annotation data package for the selected organism.

measure

Default is "Resnik", can be one of "Resnik", "Lin", "Rel", "Jiang" or "Wang".

combine

Default is "BMA", can be one of "max", "average", "rcmax" or "BMA" for combining semantic similarity scores of multiple GO terms associated with proteins.

Value

A n x n similarity matrix.

See also

See twoGOSim for calculating the GO semantic similarity between two groups of GO terms or two Entrez gene IDs. See parSeqSim for paralleled protein similarity calculation based on Smith-Waterman local alignment.

Author

Nan Xiao <https://nanx.me>

Examples

if (FALSE) { # \dontrun{

# Be careful when testing this since it involves GO similarity computation
# and might produce unpredictable results in some environments

library("GOSemSim")
library("org.Hs.eg.db")

# By GO Terms
# AP4B1
go1 <- c(
  "GO:0005215", "GO:0005488", "GO:0005515",
  "GO:0005625", "GO:0005802", "GO:0005905"
)
# BCAS2
go2 <- c(
  "GO:0005515", "GO:0005634", "GO:0005681",
  "GO:0008380", "GO:0031202"
)
# PDE4DIP
go3 <- c(
  "GO:0003735", "GO:0005622", "GO:0005840",
  "GO:0006412"
)
golist <- list(go1, go2, go3)
parGOSim(golist, type = "go", ont = "CC", measure = "Wang")

# By Entrez gene id
genelist <- list(c("150", "151", "152", "1814", "1815", "1816"))
parGOSim(genelist, type = "gene", ont = "BP", measure = "Wang")
} # }