Class UniprotTaxonomy
java.lang.Object
com.compomics.util.experiment.biology.taxonomy.mappings.UniprotTaxonomy
Mapping of the UniProt species taken from
https://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/docs/speclist.txt.
- Author:
- Marc Vaudel, Harald Barsnes
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCommonName(Integer id) Returns the common name corresponding to the given NCBI taxon.Returns the NCBI taxon corresponding to the given species name.getLatinName(Integer id) Returns the Latin name corresponding to the given NCBI taxon.getSynonym(String scientificName) Returns the synonym corresponding to the scientific name.voidloadMapping(File speciesFile) Loads the species mapping from a file.
-
Field Details
-
SEPARATOR
The separator used to separate line contents.- See Also:
-
-
Constructor Details
-
UniprotTaxonomy
public UniprotTaxonomy()Constructor.
-
-
Method Details
-
loadMapping
Loads the species mapping from a file. Previous mapping will be overwritten.- Parameters:
speciesFile- the species file- Throws:
IOException- exception thrown whenever an error occurred while reading the file.
-
getId
public Integer getId(String name) throws MalformedURLException, org.apache.commons.httpclient.URIException, IOException Returns the NCBI taxon corresponding to the given species name. Null if not found.- Parameters:
name- the species name- Returns:
- the taxon
- Throws:
MalformedURLException- exception thrown whenever the query URL is malformedorg.apache.commons.httpclient.URIException- exception thrown whenever an error occurred while downloading the mappingIOException- exception thrown whenever an error occurred while downloading the mapping
-
getLatinName
Returns the Latin name corresponding to the given NCBI taxon.- Parameters:
id- the NCBI taxon- Returns:
- the Latin name
-
getCommonName
Returns the common name corresponding to the given NCBI taxon.- Parameters:
id- the NCBI taxon- Returns:
- the common name
-
getSynonym
Returns the synonym corresponding to the scientific name. E.g. 'Ajellomyces capsulatus (strain H143)' returns 'Histoplasma capsulatum'.- Parameters:
scientificName- the scientific name- Returns:
- the synonym
-