Class SpeciesFactory

java.lang.Object
com.compomics.util.experiment.biology.taxonomy.SpeciesFactory

public class SpeciesFactory
extends Object
Class related to the handling of species.
Author:
Marc Vaudel, Harald Barsnes
  • Field Details

  • Method Details

    • getInstance

      public static SpeciesFactory getInstance()
      Static method returning the instance of the factory.
      Returns:
      the instance of the factory
    • initiate

      public void initiate​(String jarFilePath) throws IOException
      Initiates the factory using the files of the static fields.
      Parameters:
      jarFilePath - path to the jar file
      Throws:
      IOException - Exception thrown whenever an error occurred while reading a mapping file.
    • getSpeciesDescription

      public static String getSpeciesDescription​(TreeMap<String,​Integer> speciesOccurrence)
      Returns a listing of the species occurrence map provided.
      Parameters:
      speciesOccurrence - a map containing the occurrence of different species
      Returns:
      a listing of the species occurrence map provided
    • getEnsemblSpeciesFile

      public static File getEnsemblSpeciesFile​(String jarFilePath)
      Returns the Ensembl species file.
      Parameters:
      jarFilePath - the path to the jar file
      Returns:
      the Ensembl species file
    • getEnsemblGenomesSpeciesFile

      public static File getEnsemblGenomesSpeciesFile​(String jarFilePath)
      Returns the Ensembl genome species file.
      Parameters:
      jarFilePath - the path to the jar file
      Returns:
      the Ensembl genome species file
    • getUniprotTaxonomyFile

      public static File getUniprotTaxonomyFile​(String jarFilePath)
      Returns the UniProt taxonomy file.
      Parameters:
      jarFilePath - the path to the jar file
      Returns:
      the UniProt taxonomy species file
    • getBiomartEnsemblMappingFile

      public static File getBiomartEnsemblMappingFile​(String jarFilePath)
      Returns the Ensembl BioMart file.
      Parameters:
      jarFilePath - the path to the jar file
      Returns:
      the Ensembl BioMart file
    • getBiomartEnsemblGenomeMappingFile

      public static File getBiomartEnsemblGenomeMappingFile​(String jarFilePath)
      Returns the Ensembl Genome BioMart file.
      Parameters:
      jarFilePath - the path to the jar file
      Returns:
      the Ensembl Genome BioMart file
    • getLatinName

      public String getLatinName​(Integer taxon)
      Returns the Latin name of the species corresponding to the given taxon according to the UniProt mapping. Null if not found.
      Parameters:
      taxon - the NCBI taxon ID
      Returns:
      the Latin name of the species
    • getName

      public String getName​(Integer taxon)
      Returns the name of the species corresponding to the given taxon according to the UniProt mapping. Null if not found. For species mapping to plants in the Ensembl genome mapping, the name is Latin name (common name); common name (Latin Name) for the other species. If no common name is present the Latin name is used.
      Parameters:
      taxon - the NCBI taxon ID
      Returns:
      the Latin name of the species
    • getEnsemblAssembly

      public String getEnsemblAssembly​(Integer taxon)
      Returns the Ensembl assembly to use for the given taxon.
      Parameters:
      taxon - the taxon number
      Returns:
      the Ensembl assembly to use
    • getEnsemblDataset

      public String getEnsemblDataset​(Integer taxon)
      Returns the Ensembl dataset to use for the given taxon.
      Parameters:
      taxon - the taxon number
      Returns:
      the Ensembl dataset to use
    • getEnsemblSpecies

      public EnsemblSpecies getEnsemblSpecies()
      Returns the Ensembl species mapping.
      Returns:
      the Ensembl species mapping
    • getEnsemblGenomesSpecies

      public EnsemblGenomesSpecies getEnsemblGenomesSpecies()
      Returns the Ensembl genome species mapping.
      Returns:
      the Ensembl genome species mapping
    • getUniprotTaxonomy

      public UniprotTaxonomy getUniprotTaxonomy()
      Returns the UniProt taxonomy mapping.
      Returns:
      the UniProt taxonomy mapping
    • getBiomartMapping

      public BiomartMapping getBiomartMapping()
      Returns the BioMart mapping.
      Returns:
      the BioMart mapping
    • getEnsembleSpecies

      public HashMap<String,​HashSet<Integer>> getEnsembleSpecies()
      Returns a map of the species in Ensembl.
      Returns:
      a map of the species in Ensembl