Class GoMapping
java.lang.Object
com.compomics.util.experiment.biology.genes.go.GoMapping
Class parsing BioMart protein GO mappings and storing them in maps.
- Author:
- Marc Vaudel, Harald Barsnes
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetGoAccessions(String proteinAccession) Returns the GO accessions linked to a given protein accession.Returns the GO accession to name map.Returns the GO to protein accession map.getProteinAccessions(String goTermAccession) Returns the protein accessions linked to a given GO term.Returns the protein to GO accession map.Returns a sorted list of all GO Terms names linked to proteins in the proteinToGoMap.getTermAccession(String goName) Returns the accession of a GO term.getTermName(String goAccession) Returns the name of a GO term.voidloadMappingsFromFile(File file, WaitingHandler waitingHandler) Reads go mappings from a BioMart file.
-
Field Details
-
SEPARATOR
The separator used to separate line contents.- See Also:
-
-
Constructor Details
-
GoMapping
public GoMapping()Constructor.
-
-
Method Details
-
loadMappingsFromFile
Reads go mappings from a BioMart file. The structure of the file should be protein accession go accession go name. Previous mappings are silently overwritten.- Parameters:
file- the file containing the GO mappingwaitingHandler- a waiting handler allowing canceling of the process.- Throws:
IOException- if an exception occurs while reading the file
-
getGoAccessions
Returns the GO accessions linked to a given protein accession. Null if not found.- Parameters:
proteinAccession- the accession of the protein of interest- Returns:
- a list of GO accession numbers, an empty list if no mapping is found
-
getProteinAccessions
Returns the protein accessions linked to a given GO term. Null if not found.- Parameters:
goTermAccession- the accession of the GO term- Returns:
- a list of GO accession numbers, an empty list if no mapping is found
-
getTermName
Returns the name of a GO term.- Parameters:
goAccession- the accession number of the GO term of interest- Returns:
- the name, null if not found
-
getTermAccession
Returns the accession of a GO term.- Parameters:
goName- the name of the GO term of interest- Returns:
- the accession, null if not found
-
getGoNamesMap
Returns the GO accession to name map.- Returns:
- the GO accession to name map
-
getProteinToGoMap
Returns the protein to GO accession map.- Returns:
- the protein to GO accession map
-
getGoToProteinMap
Returns the GO to protein accession map.- Returns:
- the GO to protein accession map
-
getSortedTermNames
Returns a sorted list of all GO Terms names linked to proteins in the proteinToGoMap.- Returns:
- a sorted list of all GO Terms names
-