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 Summary
Fields Modifier and Type Field Description static String
BIOMART_ENSEMBL_FILENAME
The name of the Ensembl BioMart datasets file.static String
BIOMART_ENSEMBL_GENOME_FILENAME
The name of the Ensembl Genome BioMart datasets file.static String
ENSEMBL_GENOME_SPECIES
The names of the Ensembl genome species files.static String
ENSEMBL_SPECIES
The names of the Ensembl species files.static String
UNIPROT_TAXONOMY_FILENAME
The name of the UniProt taxonomy file.static String
UNKNOWN
Tag for unknown species. -
Method Summary
Modifier and Type Method Description static File
getBiomartEnsemblGenomeMappingFile(String jarFilePath)
Returns the Ensembl Genome BioMart file.static File
getBiomartEnsemblMappingFile(String jarFilePath)
Returns the Ensembl BioMart file.BiomartMapping
getBiomartMapping()
Returns the BioMart mapping.String
getEnsemblAssembly(Integer taxon)
Returns the Ensembl assembly to use for the given taxon.String
getEnsemblDataset(Integer taxon)
Returns the Ensembl dataset to use for the given taxon.HashMap<String,HashSet<Integer>>
getEnsembleSpecies()
Returns a map of the species in Ensembl.EnsemblGenomesSpecies
getEnsemblGenomesSpecies()
Returns the Ensembl genome species mapping.static File
getEnsemblGenomesSpeciesFile(String jarFilePath)
Returns the Ensembl genome species file.EnsemblSpecies
getEnsemblSpecies()
Returns the Ensembl species mapping.static File
getEnsemblSpeciesFile(String jarFilePath)
Returns the Ensembl species file.static SpeciesFactory
getInstance()
Static method returning the instance of the factory.String
getLatinName(Integer taxon)
Returns the Latin name of the species corresponding to the given taxon according to the UniProt mapping.String
getName(Integer taxon)
Returns the name of the species corresponding to the given taxon according to the UniProt mapping.static String
getSpeciesDescription(TreeMap<String,Integer> speciesOccurrence)
Returns a listing of the species occurrence map provided.UniprotTaxonomy
getUniprotTaxonomy()
Returns the UniProt taxonomy mapping.static File
getUniprotTaxonomyFile(String jarFilePath)
Returns the UniProt taxonomy file.void
initiate(String jarFilePath)
Initiates the factory using the files of the static fields.
-
Field Details
-
UNKNOWN
Tag for unknown species.- See Also:
- Constant Field Values
-
UNIPROT_TAXONOMY_FILENAME
The name of the UniProt taxonomy file.- See Also:
- Constant Field Values
-
ENSEMBL_SPECIES
The names of the Ensembl species files.- See Also:
- Constant Field Values
-
ENSEMBL_GENOME_SPECIES
The names of the Ensembl genome species files.- See Also:
- Constant Field Values
-
BIOMART_ENSEMBL_FILENAME
The name of the Ensembl BioMart datasets file.- See Also:
- Constant Field Values
-
BIOMART_ENSEMBL_GENOME_FILENAME
The name of the Ensembl Genome BioMart datasets file.- See Also:
- Constant Field Values
-
-
Method Details
-
getInstance
Static method returning the instance of the factory.- Returns:
- the instance of the factory
-
initiate
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
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
Returns the Ensembl species file.- Parameters:
jarFilePath
- the path to the jar file- Returns:
- the Ensembl species file
-
getEnsemblGenomesSpeciesFile
Returns the Ensembl genome species file.- Parameters:
jarFilePath
- the path to the jar file- Returns:
- the Ensembl genome species file
-
getUniprotTaxonomyFile
Returns the UniProt taxonomy file.- Parameters:
jarFilePath
- the path to the jar file- Returns:
- the UniProt taxonomy species file
-
getBiomartEnsemblMappingFile
Returns the Ensembl BioMart file.- Parameters:
jarFilePath
- the path to the jar file- Returns:
- the Ensembl BioMart file
-
getBiomartEnsemblGenomeMappingFile
Returns the Ensembl Genome BioMart file.- Parameters:
jarFilePath
- the path to the jar file- Returns:
- the Ensembl Genome BioMart file
-
getLatinName
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
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
Returns the Ensembl assembly to use for the given taxon.- Parameters:
taxon
- the taxon number- Returns:
- the Ensembl assembly to use
-
getEnsemblDataset
Returns the Ensembl dataset to use for the given taxon.- Parameters:
taxon
- the taxon number- Returns:
- the Ensembl dataset to use
-
getEnsemblSpecies
Returns the Ensembl species mapping.- Returns:
- the Ensembl species mapping
-
getEnsemblGenomesSpecies
Returns the Ensembl genome species mapping.- Returns:
- the Ensembl genome species mapping
-
getUniprotTaxonomy
Returns the UniProt taxonomy mapping.- Returns:
- the UniProt taxonomy mapping
-
getBiomartMapping
Returns the BioMart mapping.- Returns:
- the BioMart mapping
-
getEnsembleSpecies
Returns a map of the species in Ensembl.- Returns:
- a map of the species in Ensembl
-