Class GoDomains
java.lang.Object
com.compomics.util.experiment.biology.genes.go.GoDomains
public class GoDomains extends Object
Class parsing go domains and storing them in a map.
- Author:
- Marc Vaudel, Harald Barsnes
-
Field Summary
-
Constructor Summary
Constructors Constructor Description GoDomains()
Constructor. -
Method Summary
Modifier and Type Method Description void
addDomain(String goAccession, String goDomain)
Adds a go domain to the mapping.String
getTermDomain(String goAccession)
Returns the description of a GO term.void
laodMappingFromFile(File file, WaitingHandler waitingHandler)
Reads go mappings from a file.void
saveMapping(File destinationFile)
Saves the mapping to the given file.
-
Field Details
-
SEPARATOR
The separator used to separate line contents.- See Also:
- Constant Field Values
-
-
Constructor Details
-
GoDomains
public GoDomains()Constructor.
-
-
Method Details
-
laodMappingFromFile
Reads go mappings from a file. The structure of the file should 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
-
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
-