public class GeneMaps extends Object implements Serializable
Constructor and Description |
---|
GeneMaps()
Creates new maps.
|
Modifier and Type | Method and Description |
---|---|
String |
getChromosome(String geneName)
Returns the chromosome corresponding to a given gene name.
|
String |
getEnsemblId(String geneName)
Returns the Ensembl ID corresponding to the given gene name.
|
HashMap<String,String> |
getEnsemblVersionsMap()
Returns the Ensembl version map.
|
String |
getGeneNameForProtein(String accession)
Returns the gene name for a given protein accession.
|
HashMap<String,String> |
getGeneNameToChromosomeMap()
Returns the gene name to chromosome map.
|
HashMap<String,String> |
getGeneNameToEnsemblIdMap()
Returns the gene name to Ensembl ID map.
|
String |
getGoAccession(String goName)
Returns the GO Term accession corresponding to the given name.
|
HashMap<String,HashSet<String>> |
getGoAccessionToProteinMap()
Returns the GO to protein accession map.
|
HashSet<String> |
getGoNamesForProtein(String proteinAccession)
Returns the go terms names for a protein accession.
|
HashMap<String,String> |
getGoNamesMap()
Returns the GO accession to names map.
|
HashSet<String> |
getGoTermsForProtein(String proteinAccession)
Returns the go terms accessions for a protein accession.
|
String |
getNameForGoTerm(String goAccession)
Returns the name of a GO term.
|
HashSet<String> |
getProteinsForGoTerm(String goAccession)
Returns the protein accessions for a GO accession.
|
HashMap<String,HashSet<String>> |
getProteinToGoMap()
Returns the protein to GO terms accession map.
|
boolean |
hasGoMappings()
Indicates whether the GO maps are populated.
|
void |
importMaps(GeneMapping geneMapping)
Imports the gene maps from a gene Mapping.
|
void |
setEnsemblVersionsMap(HashMap<String,String> ensemblVersionsMap)
Sets the Ensembl version map.
|
void |
setGeneNameToChromosomeMap(HashMap<String,String> geneNameToChromosomeMap)
Sets the gene name to chromosome map.
|
void |
setGeneNameToEnsemblIdMap(HashMap<String,String> geneNameToEnsemblIdMap)
Sets the gene name to Ensembl ID map.
|
void |
setGoAccessionToProteinMap(HashMap<String,HashSet<String>> goAccessionToProteinMap)
Sets the GO to protein accession map.
|
void |
setGoNamesMap(HashMap<String,String> goNamesMap)
Sets the GO accession to names map.
|
void |
setMaps(GoMapping goMapping)
Imports the GO maps from a GO mapping.
|
void |
setProteinToGoMap(HashMap<String,HashSet<String>> proteinToGoMap)
Sets the protein to GO terms accession map.
|
public void importMaps(GeneMapping geneMapping)
geneMapping
- a gene mappingpublic void setMaps(GoMapping goMapping)
goMapping
- a go mappingpublic HashMap<String,String> getEnsemblVersionsMap()
public void setEnsemblVersionsMap(HashMap<String,String> ensemblVersionsMap)
ensemblVersionsMap
- the Ensembl version mappublic HashMap<String,String> getGeneNameToEnsemblIdMap()
public void setGeneNameToEnsemblIdMap(HashMap<String,String> geneNameToEnsemblIdMap)
geneNameToEnsemblIdMap
- the gene name to Ensembl ID mappublic HashMap<String,String> getGeneNameToChromosomeMap()
public void setGeneNameToChromosomeMap(HashMap<String,String> geneNameToChromosomeMap)
geneNameToChromosomeMap
- the gene name to chromosome mappublic HashMap<String,HashSet<String>> getProteinToGoMap()
public void setProteinToGoMap(HashMap<String,HashSet<String>> proteinToGoMap)
proteinToGoMap
- the protein to GO terms accession mappublic HashMap<String,HashSet<String>> getGoAccessionToProteinMap()
public void setGoAccessionToProteinMap(HashMap<String,HashSet<String>> goAccessionToProteinMap)
goAccessionToProteinMap
- the GO to protein accession mappublic HashMap<String,String> getGoNamesMap()
public void setGoNamesMap(HashMap<String,String> goNamesMap)
goNamesMap
- the GO accession to names mappublic String getGeneNameForProtein(String accession) throws IOException, InterruptedException
accession
- the protein accessionIOException
- exception thrown whenever an error occurred
while reading the fasta file.InterruptedException
- exception thrown whenever an error
occurred while waiting for the connection to the fasta file to recover.public String getEnsemblId(String geneName)
geneName
- a gene namepublic String getChromosome(String geneName)
geneName
- the gene namepublic HashSet<String> getGoTermsForProtein(String proteinAccession)
proteinAccession
- a protein accessionpublic HashSet<String> getProteinsForGoTerm(String goAccession)
goAccession
- a GO term accessionpublic String getNameForGoTerm(String goAccession)
goAccession
- the accession of the GO term.public String getGoAccession(String goName)
goName
- the GO namepublic HashSet<String> getGoNamesForProtein(String proteinAccession) throws IOException, InterruptedException
proteinAccession
- a protein accessionIOException
- exception thrown whenever an error occurred
while reading the FASTA file.InterruptedException
- exception thrown whenever an error
occurred while waiting for the connection to the FASTA file to recover.public boolean hasGoMappings()
Copyright © 2016. All rights reserved.