Class GoDomains
java.lang.Object
com.compomics.util.experiment.biology.genes.go.GoDomains
Class parsing GO domains and storing them in a map.
- Author:
- Marc Vaudel, Harald Barsnes
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a go domain to the mapping.getTermDomain(String goAccession) Returns the description of a GO term.voidloadMappingFromFile(File file, WaitingHandler waitingHandler) Reads GO mappings from a file.voidsaveMapping(File destinationFile) Saves the mapping to the given file.
-
Field Details
-
SEPARATOR
The separator used to separate line contents.- See Also:
-
-
Constructor Details
-
GoDomains
public GoDomains()Constructor.
-
-
Method Details
-
loadMappingFromFile
Reads GO mappings from a file. The structure of the file should be accession\tGO 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
-
getTermDomain
Returns the description of a GO term.- Parameters:
goAccession- the accession number of the GO term of interest- Returns:
- the first description found, null if not found
-
addDomain
Adds a go domain to the mapping.- Parameters:
goAccession- the accession of the GO termgoDomain- the domain of the GO term
-
saveMapping
Saves the mapping to the given file.- Parameters:
destinationFile- the destination file- Throws:
IOException- exception thrown whenever an error occurred while writing the file
-