reduceSimMatrix: reduceSimMatrix Reduce a set of GO terms based on their...

Description Usage Arguments Details Value Examples

View source: R/rrvgo.R

Description

reduceSimMatrix Reduce a set of GO terms based on their semantic similarity and scores.

Usage

1
reduceSimMatrix(simMatrix, scores = NULL, threshold = 0.7, orgdb)

Arguments

simMatrix

a (square) similarity matrix

scores

*named* vector with scores (weights) assigned to each term. Higher is better. Can be NULL (default, means no scores. In this case, a default score based on set size is assigned, thus favoring larger sets). Note: if you have p-values as scores, consider -1*log-transforming them ('-log(p)')

threshold

similarity threshold (0-1). Some guidance: Large (allowed similarity=0.9), Medium (0.7), Small (0.5), Tiny (0.4) Defaults to Medium (0.7)

orgdb

one of org.* Bioconductor packages (the package name, or the orgdb object itself)

Details

Remove terms with a similarity higher than 'threshold'. Decide which term remains based on a score. If no score is provided, the select either the broader or the narrower one ('untie' parm).

Value

a data.frame with all terms and it's "reducer" (NA if the term was not reduced)

Examples

1
2
3
4
go_analysis <- read.delim(system.file("extdata/example.txt", package="rrvgo"))
simMatrix <- calculateSimMatrix(go_analysis$ID, orgdb="org.Hs.eg.db", ont="BP", method="Rel")
scores <- setNames(-log10(go_analysis$qvalue), go_analysis$ID)
reducedTerms <- reduceSimMatrix(simMatrix, scores, threshold=0.7, orgdb="org.Hs.eg.db")

ssayols/rrvgo-ci documentation built on March 17, 2020, 12:14 a.m.