Calculate the pairwise similarity of GO terms

goSimilarity(
  geneset_ids,
  method = "Wang",
  ontology = "BP",
  species = "org.Hs.eg.db",
  progress = NULL,
  BPPARAM = BiocParallel::SerialParam()
)

Arguments

geneset_ids

list, a list of GO identifiers to score

method

character, the method to calculate the GO similarity. See GOSemSim::goSim measure parameter for possibilities.

ontology

character, the ontology to use. See GOSemSim::goSim ont parameter for possibilities.

species

character, the species of your data. Indicated as org.XX.eg.db package from Bioconductor.

progress

shiny::Progress() object, optional. To track the progress of the function (e.g. in a Shiny app)

BPPARAM

A BiocParallel bpparam object specifying how parallelization should be handled. Defaults to BiocParallel::SerialParam()

Value

A Matrix::Matrix() with the pairwise GO similarity of each geneset pair.

Examples



## Mock example showing how the data should look like
go_ids <- c("GO:0002503", "GO:0045087", "GO:0019886",
            "GO:0002250", "GO:0001916", "GO:0019885")

similarity <- goSimilarity(go_ids)
#> Warning: use 'annoDb' instead of 'OrgDb'
#> 
#> preparing gene to GO mapping data...
#> preparing IC data...

## Example using the data available in the package
data(macrophage_topGO_example_small, package = "GeDi")
go_ids <- macrophage_topGO_example_small$Genesets
if (FALSE) {
similarity <- goSimilarity(go_ids)
}