Interface GeneOntologyService
-
- All Superinterfaces:
OntologyService
- All Known Implementing Classes:
GeneOntologyServiceImpl
public interface GeneOntologyService extends OntologyService
- Author:
- paul
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ubic.basecode.ontology.providers.OntologyService
OntologyService.InferenceMode, OntologyService.LanguageLevel
-
-
Field Summary
Fields Modifier and Type Field Description static String
BASE_GO_URI
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<Long,Collection<OntologyTerm>>
calculateGoTermOverlap(Long queryGene, Collection<Long> geneIds)
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.Collection<OntologyTerm>
calculateGoTermOverlap(Gene queryGene1, Gene queryGene2)
void
clearCaches()
Primarily here for testing, to recover memory.Collection<OntologyTerm>
computeOverlap(Collection<OntologyTerm> masterOntos, Collection<OntologyTerm> comparisonOntos)
Collection<OntologyTerm>
findTerm(String queryString)
Search by inexact stringSet<OntologyTerm>
getAllParents(Collection<OntologyTerm> entries)
Set<OntologyTerm>
getAllParents(Collection<OntologyTerm> entries, boolean includePartOf)
Collection<Gene>
getGenes(String goId, Taxon taxon)
Collection<OntologyTerm>
getGOTerms(Gene gene)
Collection<OntologyTerm>
getGOTerms(Gene gene, boolean includePartOf, 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.OntologyTerm
getTerm(String uri)
GeneOntologyServiceImpl.GOAspect
getTermAspect(String goId)
GeneOntologyServiceImpl.GOAspect
getTermAspect(Characteristic goId)
String
getTermDefinition(String goId)
Return a definition for a GO Id.OntologyTerm
getTermForId(String value)
String
getTermName(String goId)
Return human-readable term ("protein kinase") for a GO Id.GeneOntologyTermValueObject
getValueObject(OntologyTerm term)
Converts the given Ontology Term to a Gene Ontology Value Object.Collection<GeneOntologyTermValueObject>
getValueObjects(Collection<OntologyTerm> terms)
Converts the given collection of Ontology Terms to Gene Ontology Value Objects.List<GeneOntologyTermValueObject>
getValueObjects(Gene gene)
Returns GO Terms VOs for the given Gene.boolean
isBiologicalProcess(OntologyTerm term)
-
Methods inherited from interface ubic.basecode.ontology.providers.OntologyService
cancelInitializationThread, findIndividuals, findIndividuals, findResources, findResources, findTerm, findUsingAlternativeId, getAdditionalPropertyUris, getAllURIs, getChildren, getChildren, getDescription, getInferenceMode, getLanguageLevel, getName, getParents, getParents, getProcessImports, getResource, getTermIndividuals, index, initialize, initialize, isEnabled, isInitializationThreadAlive, isInitializationThreadCancelled, isOntologyLoaded, isSearchEnabled, loadTermsInNameSpace, setAdditionalPropertyUris, setInferenceMode, setLanguageLevel, setProcessImports, setSearchEnabled, startInitializationThread, waitForInitializationThread
-
-
-
-
Field Detail
-
BASE_GO_URI
static final String BASE_GO_URI
- See Also:
- Constant Field Values
-
-
Method Detail
-
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 genegeneIds
- 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 1queryGene2
- 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)
-
findTerm
Collection<OntologyTerm> findTerm(String queryString) throws OntologySearchException
Search by inexact string- Specified by:
findTerm
in interfaceOntologyService
- Parameters:
queryString
- query string- Returns:
- ontology terms
- Throws:
OntologySearchException
-
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)
-
getGenes
@Nullable Collection<Gene> getGenes(String goId, Taxon taxon)
- Parameters:
taxon
- taxongoId
- go id- 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
-
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
- geneincludePartOf
- include part ofgoAspect
- limit only to the given aspect (pass null to use all)- Returns:
- ontology terms
-
getTerm
@Nullable OntologyTerm getTerm(String uri)
- Specified by:
getTerm
in interfaceOntologyService
- Parameters:
uri
- of the term- Returns:
- term if found or null otherwise.
-
getTermAspect
@Nullable GeneOntologyServiceImpl.GOAspect getTermAspect(Characteristic goId)
-
getTermAspect
@Nullable GeneOntologyServiceImpl.GOAspect getTermAspect(String goId)
- Parameters:
goId
- GO ID e.g. GO:0038128 (not 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- Returns:
- Definition or null if there is no definition.
-
getTermForId
@Nullable OntologyTerm getTermForId(String value)
- Parameters:
value
- e.g. GO:0038128- Returns:
- term or null if not found
-
getTermName
String getTermName(String goId)
Return human-readable term ("protein kinase") for a GO Id.- Parameters:
goId
- go id- Returns:
- term name
-
getValueObject
GeneOntologyTermValueObject getValueObject(OntologyTerm term)
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
Collection<GeneOntologyTermValueObject> getValueObjects(Collection<OntologyTerm> terms)
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.
-
-