Class GeneMapping
java.lang.Object
com.compomics.util.experiment.biology.genes.ensembl.GeneMapping
public class GeneMapping extends Object
Class for the handling of gene mappings.
- Author:
- Marc Vaudel, Harald Barsnes
-
Field Summary
-
Constructor Summary
Constructors Constructor Description GeneMapping()
Constructor. -
Method Summary
Modifier and Type Method Description String
getChromosome(String geneName)
Returns the chromosome for a given gene.String
getEnsemblAccession(String geneName)
Returns the Ensembl accession for a given gene.HashMap<String,String>
getGeneNameToAccession()
Returns the gene name to protein accession map.HashMap<String,String>
getGeneNameToChromosome()
Returns the gene name to chromosome map.void
importFromFile(File file, WaitingHandler waitingHandler)
Reads go mappings from a BioMart file.
-
Field Details
-
SEPARATOR
The separator used to separate line contents.- See Also:
- Constant Field Values
-
-
Constructor Details
-
GeneMapping
public GeneMapping()Constructor.
-
-
Method Details
-
importFromFile
Reads go mappings from a BioMart file. The structure of the file should be Ensembl Accession Gene name Chromosome name. Previous mappings are silently overwritten.- Parameters:
file
- the file containing the mappingwaitingHandler
- a waiting handler allowing display of the progress and canceling of the process.- Throws:
IOException
- if an exception occurs while reading the file
-
getChromosome
Returns the chromosome for a given gene.- Parameters:
geneName
- the gene name- Returns:
- the chromosome for a given gene
-
getEnsemblAccession
Returns the Ensembl accession for a given gene.- Parameters:
geneName
- the gene name- Returns:
- the Ensembl accession for a given gene
-
getGeneNameToChromosome
Returns the gene name to chromosome map.- Returns:
- the gene name to chromosome map
-
getGeneNameToAccession
Returns the gene name to protein accession map.- Returns:
- the gene name to protein accession map
-