public class GeneFactory extends Object
Modifier and Type | Field and Description |
---|---|
static String |
separator
The separator used to separate line contents.
|
Modifier and Type | Method and Description |
---|---|
void |
clearFactory()
Clears the mappings.
|
void |
closeFiles()
Closes files.
|
String |
getChromosomeForGeneName(String geneName)
Returns the chromosome for a given gene.
|
String |
getChromosomeFromGeneId(String geneID)
Returns the chromosome where a gene can be located, null if not found.
|
String |
getChromosomeFromGeneName(String geneName)
Returns the chromosome where a gene can be located, null if not found.
|
Integer |
getCurrentEnsemblVersion(String ensemblType)
Returns the current Ensembl version number.
|
String |
getEnsemblDbName(int speciesTypeIndex)
Returns the name of the Ensembl database for BioMart queries.
|
String |
getGeneEnsemblId(String geneName)
Returns the Ensembl ID of a gene, null if not found.
|
String |
getGeneEnsemblIdForUniProtProtein(String proteinAccession)
Returns the Ensembl gene Id for a given Uniprot protein.
|
String |
getGeneName(String geneID)
Returns the name of a gene, null if not found.
|
String |
getGeneNameForUniProtProtein(String proteinAccession)
Returns the gene name attached to a protein.
|
static GeneFactory |
getInstance()
Static method returning the instance of the factory.
|
ArrayList<String> |
getMappedGeneNames()
Returns a list of the mapped genes indexed by their gene names.
|
ArrayList<String> |
getMappedGenes()
Returns a list of the mapped genes indexed by their Ensembl Gene ID.
|
void |
initialize(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 String separator
public static GeneFactory getInstance()
public void initialize(File file, WaitingHandler waitingHandler) throws IOException
file
- the file containing the mappingwaitingHandler
- a waiting handler allowing display of the progress
and canceling of the process.IOException
public String getChromosomeForGeneName(String geneName)
geneName
- the gene namepublic ArrayList<String> getMappedGenes()
public ArrayList<String> getMappedGeneNames()
public String getGeneName(String geneID) throws IOException
geneID
- the Ensembl ID of the gene of interestIOException
public String getGeneEnsemblId(String geneName) throws IOException
geneName
- the gene name of the gene of interestIOException
public String getGeneEnsemblIdForUniProtProtein(String proteinAccession) throws IOException, InterruptedException, FileNotFoundException, ClassNotFoundException
proteinAccession
- the accession of the uniprot proteinIOException
InterruptedException
FileNotFoundException
ClassNotFoundException
public String getChromosomeFromGeneId(String geneID) throws IOException
geneID
- the Ensembl ID of the gene of interestIOException
public String getChromosomeFromGeneName(String geneName) throws IOException
geneName
- the gene name of the gene of interestIOException
public String getGeneNameForUniProtProtein(String proteinAccession) throws IOException, IllegalArgumentException, InterruptedException, FileNotFoundException, ClassNotFoundException
proteinAccession
- the accession of the protein of interestIOException
IllegalArgumentException
InterruptedException
FileNotFoundException
ClassNotFoundException
- REpublic void closeFiles() throws IOException
IOException
public void clearFactory()
public boolean isMappingFileOpen()
public Integer getCurrentEnsemblVersion(String ensemblType)
ensemblType
- the Ensembl type, e.g., ensembl or plantspublic String getEnsemblDbName(int speciesTypeIndex)
speciesTypeIndex
- the species type index: 1: fungi, 2: plants, 3:
protist, 4: metazoa or 5: default.Copyright © 2014. All rights reserved.