twoGOSim: Protein/DNA Similarity Calculation based on Gene Ontology...

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Protein/DNA Similarity Calculation based on Gene Ontology (GO) Similarity

Usage

1
2
twoGOSim(id1, id2, type = c("go", "gene"), ont = "MF",
  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.

semData

GOSemSimDATA object

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.

Details

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

Value

A n x n matrix.

Author(s)

Min-feng Zhu <wind2zhu@163.com>, Nan Xiao <http://nanx.me>

See Also

See parGOSim for protein similarity calculation based on Gene Ontology (GO) semantic similarity. See parSeqSim for paralleled protein/DNA similarity calculation based on Smith-Waterman local alignment.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Be careful when testing this since it involves GO similarity computation
# and might produce unpredictable results in some environments

require(GOSemSim)
require(org.Hs.eg.db)

# by GO terms
go1 = c("GO:0004022", "GO:0004024", "GO:0004023")
go2 = c("GO:0009055", "GO:0020037")
d = GOSemSim::godata('org.Hs.eg.db', ont = 'MF', computeIC = FALSE)
gsim1 = twoGOSim(go1, go2, type = 'go', semData = d, measure = 'Wang')
print(gsim1)

# by Entrez gene id
gene1 = '241'
gene2 = '251'
d = GOSemSim::godata('org.Hs.eg.db', ont = 'MF', computeIC = TRUE)
gsim2 = twoGOSim(gene1, gene2, type = 'gene', semData = d,  measure = 'Wang')
print(gsim2)

wind22zhu/BioMedR documentation built on Oct. 21, 2019, 12:51 p.m.