Class SpeciesFactory
java.lang.Object
com.compomics.util.experiment.biology.taxonomy.SpeciesFactory
Class related to the handling of species.
- Author:
- Marc Vaudel, Harald Barsnes
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic FilegetBiomartEnsemblMappingFile(File configFolder) Returns the Ensembl BioMart file.Returns the BioMart mapping.getEnsemblAssembly(String latinName) Returns the Ensembl assembly to use for the given Latin name.getEnsemblDataset(String latinName) Returns the Ensembl dataset to use for the given Latin name.getEnsemblDatasetName(String latinName, EnsemblSpecies.EnsemblDivision ensemblDivision) Returns the Ensemble dataset name.Returns a map of the species in Ensembl.Returns the Ensembl species mapping.static FilegetEnsemblSpeciesFile(File configFolder) Returns the Ensembl species file.static SpeciesFactoryStatic method returning the instance of the factory.getLatinName(Integer taxon) Returns the Latin name of the species corresponding to the given taxon according to the UniProt mapping.static StringgetSpeciesDescription(TreeMap<String, Integer> speciesOccurrence) Returns a listing of the species occurrence map provided.Returns the UniProt taxonomy mapping.static FilegetUniprotTaxonomyFile(File configFolder) Returns the UniProt taxonomy file.voidInitiates the factory using the files of the static fields.
-
Field Details
-
UNKNOWN
Tag for unknown species.- See Also:
-
UNIPROT_TAXONOMY_FILENAME
The name of the UniProt taxonomy file.- See Also:
-
ENSEMBL_SPECIES
The names of the Ensembl species files.- See Also:
-
BIOMART_ENSEMBL_FILENAME
The name of the Ensembl BioMart datasets file.- See Also:
-
-
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:
configFolder- the config folder- 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:
configFolder- the config folder- Returns:
- the Ensembl species file
-
getUniprotTaxonomyFile
Returns the UniProt taxonomy file.- Parameters:
configFolder- the config folder- Returns:
- the UniProt taxonomy species file
-
getBiomartEnsemblMappingFile
Returns the Ensembl BioMart file.- Parameters:
configFolder- the config folder- Returns:
- the Ensembl 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
-
getEnsemblAssembly
Returns the Ensembl assembly to use for the given Latin name.- Parameters:
latinName- the Latin name, e.g. 'homo_sapiens'.- Returns:
- the Ensembl assembly to use
-
getEnsemblDataset
Returns the Ensembl dataset to use for the given Latin name.- Parameters:
latinName- the Latin name, e.g. 'homo_sapiens'.- Returns:
- the Ensembl dataset to use
-
getEnsemblDatasetName
public String getEnsemblDatasetName(String latinName, EnsemblSpecies.EnsemblDivision ensemblDivision) Returns the Ensemble dataset name. E.g. 'hsapiens_gene_ensembl'.- Parameters:
latinName- the Latin nameensemblDivision- the Ensembl division- Returns:
- the Ensemble dataset name
-
getEnsemblSpecies
Returns the Ensembl species mapping.- Returns:
- the Ensembl 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
-