A method to scale a matrix of distance scores with the GO term similarity of the associated genesets.
scaleGO(
scores,
geneset_ids,
method = "Wang",
ontology = "BP",
species = "org.Hs.eg.db",
BPPARAM = BiocParallel::SerialParam()
)
a Matrix::Matrix()
, a matrix of (distance) scores for the
identifiers in geneset_ids
.
list
, a list
of GO identifiers to score
character, the method to calculate the GO similarity. See GOSemSim::goSim measure parameter for possibilities.
character, the ontology to use. See GOSemSim::goSim ont parameter for possibilities.
character, the species of your data. Indicated as org.XX.eg.db package from Bioconductor.
A BiocParallelParam object specifying how parallelization should be handled
A Matrix::Matrix()
of scaled values.
## Mock example showing how the data should look like
go_ids <- c("GO:0002503", "GO:0045087", "GO:0019886",
"GO:0002250", "GO:0001916", "GO:0019885")
set.seed(42)
scores <- Matrix::Matrix(stats::runif(36, min = 0, max = 1), 6, 6)
similarity <- scaleGO(scores,
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(scores_macrophage_topGO_example_small, package = "GeDi")
data(macrophage_topGO_example_small, package = "GeDi")
go_ids <- macrophage_topGO_example_small$Genesets
if (FALSE) {
scores_scaled <- scaleGO(scores_macrophage_topGO_example_small,
go_ids)
}