Ontologyο
- ancestors(go_id)ο
Returns the list of all ancestors in the ontology for the given GO Term.
# Arguments
go_id - GO term ID.
# Returns
List of IDs of all the ancestors in the ontology (List of String)
- batch_similarity(list1, list2, method, counter)ο
Compute pairwise semantic similarity in batch using a selected method.
- Parameters:
list1 (List[str]) β First list of GO term IDs.
list2 (List[str]) β Second list of GO term IDs.
method (str) β Name of the similarity method. Options: βresnikβ, βlinβ.
counter (TermCounter) β Precomputed IC values.
- Returns:
List of similarity scores.
- Return type:
List[float]
- Raises:
ValueError β If input lists differ in length or method is unknown.
- common_ancestor(go_id1, go_id2)ο
Returns the list of all the common ancestors in the ontology for the given GO Terms.
# Arguments
go_id1 - GO term ID 1.
go_id2 - GO term ID 2.
# Returns
List of IDs of all the common ancestors in the ontology (List of String)
- deepest_common_ancestor(go_id1, go_id2)ο
Returns the deepest common ancestor in the ontology for the given GO Terms.
# Arguments
go_id1 - GO term ID 1.
go_id2 - GO term ID 2.
# Returns
ID of the deepest common ancestor in the ontology. (String)
- get_term_by_id(go_id)ο
Gets the PyGoTerm object for the given GO Term ID.
# Arguments
go_id - GO term ID.
# Returns
PyGOTerm associated with the ID. (PyGOTerm)
- semantic_similarity(id1, id2, method, counter)ο
Compute semantic similarity between two GO terms using a selected method.
- Parameters:
id1 (str) β First GO term ID.
id2 (str) β Second GO term ID.
method (str) β Name of the similarity method. Options: βresnikβ, βlinβ.
counter (TermCounter) β Precomputed IC values.
- Returns:
Similarity score.
- Return type:
float
- Raises:
ValueError β If the method is unknown.
- term_ic(go_id, counter)ο
Compute the Information Content (IC) of a GO term. Returns the Information Content (IC) value of a given GO term.
- Parameters:
go_id (str) β GO term identifier.
counter (TermCounter) β Precomputed term counter with IC values.
- Returns:
The IC of the GO term.
- Return type:
float