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 the HomologeneServiceFactory to lazy-load this service.

Author:
kelsey
See Also:
  • Constructor Details

    • HomologeneServiceImpl

      public HomologeneServiceImpl(GeneService geneService, TaxonService taxonService, org.springframework.core.io.Resource homologeneFile)
  • Method Details

    • getHomologue

      public Gene getHomologue(Gene gene, Taxon taxon)
      Specified by:
      getHomologue in interface HomologeneService
      Parameters:
      gene - gene
      taxon - 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 interface HomologeneService
      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 interface HomologeneService
      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 interface HomologeneService
      Throws:
      IOException
    • getHomologueValueObject

      public GeneValueObject getHomologueValueObject(Long geneId, String taxonCommonName)
      Specified by:
      getHomologueValueObject in interface HomologeneService
      Parameters:
      geneId - gene id
      taxonCommonName - 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 interface HomologeneService
      Returns:
      Collection of NCBI Gene Ids, or null if not ready.