public class GeneFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
separator
The separator used to separate line contents.
|
Modifier and Type | Method and Description |
---|---|
void |
clearFactory()
Clears the mappings.
|
void |
closeFiles()
Closes files.
|
java.lang.String |
getChromosomeForGeneName(java.lang.String geneName)
Returns the chromosome for a given gene.
|
java.lang.String |
getChromosomeFromGeneId(java.lang.String geneID)
Returns the chromosome where a gene can be located, null if not found.
|
java.lang.String |
getChromosomeFromGeneName(java.lang.String geneName)
Returns the chromosome where a gene can be located, null if not found.
|
java.lang.Integer |
getCurrentEnsemblVersion(java.lang.String ensemblType)
Returns the current Ensembl version number.
|
java.lang.String |
getGeneEnsemblId(java.lang.String geneName)
Returns the Ensembl ID of a gene, null if not found.
|
java.lang.String |
getGeneName(java.lang.String geneID)
Returns the name of a gene, null if not found.
|
java.lang.String |
getGeneNameForUniProtProtein(java.lang.String proteinAccession)
Returns the gene name attached to a protein.
|
static GeneFactory |
getInstance()
Static method returning the instance of the factory.
|
java.util.ArrayList<java.lang.String> |
getMappedGeneNames()
Returns a list of the mapped genes indexed by their gene names.
|
java.util.ArrayList<java.lang.String> |
getMappedGenes()
Returns a list of the mapped genes indexed by their Ensembl Gene ID.
|
void |
initialize(java.io.File file,
WaitingHandler waitingHandler)
Initializes the factory on the given file.
|
boolean |
isMappingFileOpen()
Returns true of the mapping file is currently open.
|
public static final java.lang.String separator
public static GeneFactory getInstance()
public void initialize(java.io.File file, WaitingHandler waitingHandler) throws java.io.IOException
file
- the file containing the mappingwaitingHandler
- a waiting handler allowing display of the progress
and canceling of the process.java.io.IOException
public java.lang.String getChromosomeForGeneName(java.lang.String geneName)
geneName
- the gene namepublic java.util.ArrayList<java.lang.String> getMappedGenes()
public java.util.ArrayList<java.lang.String> getMappedGeneNames()
public java.lang.String getGeneName(java.lang.String geneID) throws java.io.IOException
geneID
- the Ensembl ID of the gene of interestjava.io.IOException
public java.lang.String getGeneEnsemblId(java.lang.String geneName) throws java.io.IOException
geneName
- the gene name of the gene of interestjava.io.IOException
public java.lang.String getChromosomeFromGeneId(java.lang.String geneID) throws java.io.IOException
geneID
- the Ensembl ID of the gene of interestjava.io.IOException
public java.lang.String getChromosomeFromGeneName(java.lang.String geneName) throws java.io.IOException
geneName
- the gene name of the gene of interestjava.io.IOException
public java.lang.String getGeneNameForUniProtProtein(java.lang.String proteinAccession) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.InterruptedException, java.io.FileNotFoundException, java.lang.ClassNotFoundException
proteinAccession
- the accession of the protein of interestjava.io.IOException
java.lang.IllegalArgumentException
java.lang.InterruptedException
java.io.FileNotFoundException
java.lang.ClassNotFoundException
- REpublic void closeFiles() throws java.io.IOException
java.io.IOException
public void clearFactory()
public boolean isMappingFileOpen()
public java.lang.Integer getCurrentEnsemblVersion(java.lang.String ensemblType)
ensemblType
- the Ensembl type, e.g., ensembl or plantsCopyright © 2013. All Rights Reserved.