Class HomologeneServiceImpl
- java.lang.Object
-
- ubic.gemma.core.loader.genome.gene.ncbi.homology.HomologeneServiceImpl
-
- All Implemented Interfaces:
HomologeneService
public class HomologeneServiceImpl extends Object implements HomologeneService
Reads in the homologene list as specified in the Gemmea.properties file. Loads the list at startup and keeps a mapping off.You almost certainly want to call
refresh()
before using this service. This is done automatically if you use theHomologeneServiceFactory
to lazy-load this service.- Author:
- kelsey
- See Also:
HomologeneServiceFactory
-
-
Constructor Summary
Constructors Constructor Description HomologeneServiceImpl(GeneService geneService, TaxonService taxonService, org.springframework.core.io.Resource homologeneFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Gene
getHomologue(Gene gene, Taxon taxon)
Collection<Long>
getHomologues(Long ncbiId)
Collection<Gene>
getHomologues(Gene gene)
GeneValueObject
getHomologueValueObject(Long geneId, String taxonCommonName)
Collection<Long>
getNCBIGeneIdsInGroup(long homologeneGroupId)
Given an NCBI Homologene Group ID returns a list of all the NCBI Gene Ids in the given groupvoid
refresh()
Refresh homologene data.
-
-
-
Constructor Detail
-
HomologeneServiceImpl
public HomologeneServiceImpl(GeneService geneService, TaxonService taxonService, org.springframework.core.io.Resource homologeneFile)
-
-
Method Detail
-
getHomologue
public Gene getHomologue(Gene gene, Taxon taxon)
- Specified by:
getHomologue
in interfaceHomologeneService
- Parameters:
gene
- genetaxon
- desired taxon to find homologue in- Returns:
- Finds the homologue of the given gene for the taxon specified, or null if there is no homologue
-
getHomologues
public Collection<Gene> getHomologues(Gene gene)
- Specified by:
getHomologues
in interfaceHomologeneService
- Parameters:
gene
- gene- Returns:
- Collection of genes found in Gemma that are homologous with the given gene. Empty if no homologues or gene lacks homologue information, or null if not ready.
-
getHomologues
public Collection<Long> getHomologues(Long ncbiId)
- Specified by:
getHomologues
in interfaceHomologeneService
- Parameters:
ncbiId
- gene ncbi id- Returns:
- A collection of NCBI gene ids that are homologous with the given NCBI Gene Id
-
refresh
public void refresh() throws IOException
Description copied from interface:HomologeneService
Refresh homologene data.- Specified by:
refresh
in interfaceHomologeneService
- Throws:
IOException
-
getHomologueValueObject
public GeneValueObject getHomologueValueObject(Long geneId, String taxonCommonName)
- Specified by:
getHomologueValueObject
in interfaceHomologeneService
- Parameters:
geneId
- gene idtaxonCommonName
- desired taxon to find homologue in- Returns:
- Finds the homologue of the given gene for the taxon specified, or null if there is no homologue
-
getNCBIGeneIdsInGroup
public Collection<Long> getNCBIGeneIdsInGroup(long homologeneGroupId)
Given an NCBI Homologene Group ID returns a list of all the NCBI Gene Ids in the given group- Specified by:
getNCBIGeneIdsInGroup
in interfaceHomologeneService
- Returns:
- Collection of NCBI Gene Ids, or null if not ready.
-
-