Interface GeneOntologyService

All Superinterfaces:
AutoCloseable, OntologyService
All Known Implementing Classes:
GeneOntologyServiceImpl

public interface GeneOntologyService extends OntologyService
Author:
paul
  • Method Details

    • calculateGoTermOverlap

      Map<Long,Collection<OntologyTerm>> calculateGoTermOverlap(Gene queryGene, Collection<Long> geneIds)

      Given a query Gene, and a collection of gene ids calculates the go term overlap for each pair of queryGene and gene in the given collection. Returns a Map<Gene,Collection<OntologyEntries>>. The key is the gene (from the [queryGene,gene] pair) and the values are a collection of the overlapping ontology entries.

      Parameters:
      queryGene - query gene
      geneIds - gene ids
      Returns:
      map of gene ids to collections of ontologyTerms. This will always be populated but collection values will be empty when there is no overlap.
    • calculateGoTermOverlap

      Collection<OntologyTerm> calculateGoTermOverlap(Gene queryGene1, Gene queryGene2)
      Parameters:
      queryGene1 - query gene 1
      queryGene2 - query gene 2
      Returns:
      Collection>OntologyEntries<s
    • calculateGoTermOverlap

      Map<Long,Collection<OntologyTerm>> calculateGoTermOverlap(Long queryGene, Collection<Long> geneIds)
    • computeOverlap

      Collection<OntologyTerm> computeOverlap(Collection<OntologyTerm> masterOntos, Collection<OntologyTerm> comparisonOntos)
    • getAllParents

      Set<OntologyTerm> getAllParents(Collection<OntologyTerm> entries)
      Parameters:
      entries - NOTE terms that are in this collection are NOT explicitly included; however, some of them may be included incidentally if they are parents of other terms in the collection.
      Returns:
      ontology terms
    • getAllParents

      Set<OntologyTerm> getAllParents(Collection<OntologyTerm> entries, boolean includePartOf)
    • getResource

      @Nullable OntologyResource getResource(String goId)
      Retrieve a GO resource by ID or URI.
      Specified by:
      getResource in interface OntologyService
    • getTerm

      @Nullable OntologyTerm getTerm(String goId)
      Retrieve a GO term by ID or URI.
      Specified by:
      getTerm in interface OntologyService
    • getTermIndividuals

      Collection<OntologyIndividual> getTermIndividuals(String goId)
      Retrieve a GO individuals by ID or URI.
      Specified by:
      getTermIndividuals in interface OntologyService
    • getGenes

      Collection<Gene> getGenes(OntologyTerm goTerm, @Nullable Taxon taxon)
      Find genes for a given of GO term.
      Returns:
      Collection of all genes in the given taxon that are annotated with the given id, including its child terms in the hierarchy, or null if the GO term is not found
    • getGenes

      Collection<Gene> getGenes(String goId, @Nullable Taxon taxon)
      Find genes for a given GO term by GO ID.
      Parameters:
      goId - a GO ID (i.e. GO:000001) or URI
      See Also:
    • getGOTerms

      Collection<OntologyTerm> getGOTerms(Gene gene)
      Parameters:
      gene - Take a gene and return a set of all GO terms including the parents of each GO term
      Returns:
      ontology terms
    • getGOTerms

      Collection<OntologyTerm> getGOTerms(Gene gene, boolean includePartOf, @Nullable GeneOntologyServiceImpl.GOAspect goAspect)
      Get all GO terms for a gene, including parents of terms via is-a relationships; and optionally also parents via part-of relationships.
      Parameters:
      gene - gene
      includePartOf - include part of
      goAspect - limit only to the given aspect (pass null to use all)
      Returns:
      ontology terms
    • getTermAspect

    • getTermAspect

      Parameters:
      goId - GO ID e.g. GO:0038128 or URI
      Returns:
      aspect if found, null otherwise
    • getTermDefinition

      @Nullable String getTermDefinition(String goId)
      Return a definition for a GO ID.
      Parameters:
      goId - e.g. GO:0094491 or URI
      Returns:
      Definition or null if there is no definition.
    • getValueObject

      Converts the given Ontology Term to a Gene Ontology Value Object.
      Parameters:
      term - the term to be converted.
      Returns:
      value object representing the given term.
    • getValueObjects

      Converts the given collection of Ontology Terms to Gene Ontology Value Objects.
      Parameters:
      terms - the terms to be converted.
      Returns:
      collection of value objects representing the given terms.
    • getValueObjects

      List<GeneOntologyTermValueObject> getValueObjects(Gene gene)
      Returns GO Terms VOs for the given Gene.
      Parameters:
      gene - the Gene to retrieve GO Terms for and convert them to VOs.
      Returns:
      Gene Ontology VOs representing all GO Terms associated with the given gene.
    • isBiologicalProcess

      boolean isBiologicalProcess(OntologyTerm term)
    • clearCaches

      void clearCaches()
      Primarily here for testing, to recover memory.