Skip to contents

Protein Similarity Calculation based on Gene Ontology (GO) Similarity

Usage

calcTwoProtGOSim(
  id1,
  id2,
  type = c("go", "gene"),
  ont = c("MF", "BP", "CC"),
  organism = "human",
  measure = "Resnik",
  combine = "BMA"
)

Arguments

id1

A character vector. length > 1: each element is a GO term; length = 1: the Entrez Gene ID.

id2

A character vector. length > 1: each element is a GO term; length = 1: the Entrez Gene ID.

type

Input type of id1 and id2, 'go' for GO Terms, 'gene' for gene ID.

ont

Default is 'MF', could be one of 'MF', 'BP', or 'CC' subontologies.

organism

Default is 'human', could be one of 'anopheles', 'arabidopsis', 'bovine', 'canine', 'chicken', 'chimp', 'coelicolor', 'ecolik12', 'ecsakai', 'fly', 'human', 'malaria', 'mouse', 'pig', 'rat', 'rhesus', 'worm', 'xenopus', 'yeast' or 'zebrafish'.

measure

Default is 'Resnik', could be one of 'Resnik', 'Lin', 'Rel', 'Jiang' or 'Wang'.

combine

Default is 'BMA', could be one of 'max', 'average', 'rcmax' or 'BMA' for combining semantic similarity scores of multiple GO terms associated with protein.

Value

A n x n matrix.

Details

This function calculates the Gene Ontology (GO) similarity between two groups of GO terms or two Entrez gene IDs.

See also

See calcParProtGOSim for protein similarity calculation based on Gene Ontology (GO) semantic similarity. See calcParProtSeqSim for paralleled protein similarity calculation based on sequence alignment.

Examples

# By GO terms
go1 = c("GO:0004022", "GO:0004024", "GO:0004023")
go2 = c("GO:0009055", "GO:0020037")
calcTwoProtGOSim(go1, go2, type = 'go', ont = 'MF', measure = 'Wang')
#> Warning: use 'annoDb' instead of 'OrgDb'
#> Error in loadNamespace(name): there is no package called ‘org.Hs.eg.db’

# By Entrez gene id
gene1 = '241'
gene2 = '251'
calcTwoProtGOSim(gene1, gene2, type = 'gene', ont = 'CC', measure = 'Lin')
#> Warning: use 'annoDb' instead of 'OrgDb'
#> Error in loadNamespace(name): there is no package called ‘org.Hs.eg.db’