|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.compomics.util.preferences.GenePreferences
public class GenePreferences
Contains methods for downloading gene and GO mappings.
Field Summary | |
---|---|
static String |
GENE_MAPPING_FILE_SUFFIX
The suffix to use for files containing gene mappings. |
static String |
GENE_MAPPING_FOLDER
The folder where gene mapping related info is stored. |
static String |
GO_MAPPING_FILE_SUFFIX
The suffix to use for files containing GO mappings. |
Constructor Summary | |
---|---|
GenePreferences()
Create a new GenePreferences object. |
|
GenePreferences(GenePreferences genePreferences)
Creates new gene preferences based on a GenePreferences object. |
Method Summary | |
---|---|
void |
createDefaultGeneMappingFiles(File aEnsemblVersionsFile,
File aGoDomainsFile,
File aSpeciesFile,
File aDefaultSpeciesGoMappingsFile,
File aDefaultSpeciesGeneMappingFile)
Insert the default gene mappings files. |
void |
downloadGeneMappings(String ensemblType,
String ensemblSchemaName,
String selectedSpecies,
String ensemblVersion,
WaitingHandler waitingHandler)
Download the gene mappings. |
boolean |
downloadGoMappings(String ensemblType,
String ensemblSchemaName,
String selectedSpecies,
WaitingHandler waitingHandler)
Download the GO mappings. |
HashMap<String,ArrayList<String>> |
getAllSpecies()
Return the species lists. |
HashMap<String,HashMap<String,String>> |
getAllSpeciesMap()
Returns the species map. |
String |
getCurrentSpecies()
Returns the current species. |
String |
getCurrentSpeciesType()
Returns the current species type. |
String |
getEnsemblDatabaseName(String speciesName)
Deprecated. use the one with the Ensembl type parameter instead |
String |
getEnsemblDatabaseName(String ensemblType,
String speciesName)
Returns the Ensembl database name corresponding to a species name according to the speciesMap. |
String |
getEnsemblSpeciesVersion(String speciesName)
Deprecated. use getEnsemblSpeciesVersion(String ensemblType, String speciesName) instead |
String |
getEnsemblSpeciesVersion(String ensemblType,
String speciesName)
Returns the Ensembl version for the given species name. |
String |
getEnsemblVersion(String ensemblDatabase)
Returns the Ensembl version corresponding to the given Ensembl database according to the ensemblVersionsMap. |
HashMap<String,String> |
getEnsemblVersionsMap()
Returns the Ensembl versions map. |
File |
getGeneMappingFolder()
Returns the path to the folder containing the gene mapping files. |
HashMap<String,String> |
getGoDomainMap()
Returns the GO domain map, e.g., key: GO term: GO:0007568, element: biological_process. |
static String |
getProteinEvidencAsString(Integer type)
Return the protein evidence type as text. |
ArrayList<String> |
getSpecies()
Deprecated. use getAllSpecies instead |
HashMap<String,String> |
getSpeciesMap()
Deprecated. use getAllSpeciesMap instead |
void |
loadEnsemblSpeciesVersions(File ensemblVersionsFile)
Loads the given Ensembl species file. |
boolean |
loadGeneMappings(String jarFilePath,
WaitingHandler waitingHandler)
Imports the gene mappings. |
void |
loadSpeciesAndGoDomains()
Load the mapping files. |
void |
setCurrentSpecies(String currentSpecies)
Set the current species. |
void |
setCurrentSpeciesType(String currentSpeciesType)
Set the current species type. |
void |
updateEnsemblVersion(String selectedSpecies,
String ensemblVersion)
Update the Ensembl version for the given species. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String GENE_MAPPING_FOLDER
public static final String GENE_MAPPING_FILE_SUFFIX
public static final String GO_MAPPING_FILE_SUFFIX
Constructor Detail |
---|
public GenePreferences()
public GenePreferences(GenePreferences genePreferences)
genePreferences
- Method Detail |
---|
public static String getProteinEvidencAsString(Integer type)
type
- the type of evidence
public boolean downloadGoMappings(String ensemblType, String ensemblSchemaName, String selectedSpecies, WaitingHandler waitingHandler) throws MalformedURLException, IOException
ensemblType
- the Ensembl type, e.g., default or plantsensemblSchemaName
- the Ensembl schema name, e.g., default or
plants_mart_18selectedSpecies
- waitingHandler
-
MalformedURLException
IOException
public void downloadGeneMappings(String ensemblType, String ensemblSchemaName, String selectedSpecies, String ensemblVersion, WaitingHandler waitingHandler) throws MalformedURLException, IOException, IllegalArgumentException
ensemblType
- the Ensembl type, e.g., default or plantsensemblSchemaName
- the Ensembl schema name, e.g., default or
plants_mart_18selectedSpecies
- ensemblVersion
- waitingHandler
-
MalformedURLException
IOException
IllegalArgumentException
public File getGeneMappingFolder()
public String getCurrentSpecies()
public void setCurrentSpecies(String currentSpecies)
currentSpecies
- the currentSpecies to setpublic String getCurrentSpeciesType()
public void setCurrentSpeciesType(String currentSpeciesType)
currentSpeciesType
- the currentSpeciesType to setpublic void createDefaultGeneMappingFiles(File aEnsemblVersionsFile, File aGoDomainsFile, File aSpeciesFile, File aDefaultSpeciesGoMappingsFile, File aDefaultSpeciesGeneMappingFile)
aEnsemblVersionsFile
- aGoDomainsFile
- aSpeciesFile
- aDefaultSpeciesGoMappingsFile
- aDefaultSpeciesGeneMappingFile
- public void loadSpeciesAndGoDomains() throws IOException, IllegalArgumentException
IOException
IllegalArgumentException
public HashMap<String,String> getGoDomainMap()
public HashMap<String,String> getSpeciesMap()
public HashMap<String,HashMap<String,String>> getAllSpeciesMap()
public String getEnsemblDatabaseName(String speciesName)
speciesName
- the species name as available in the species list
public String getEnsemblDatabaseName(String ensemblType, String speciesName)
ensemblType
- the Ensembl type, e.g., Vertebrates or PlantsspeciesName
- the species name as available in the species list
public HashMap<String,String> getEnsemblVersionsMap()
public String getEnsemblVersion(String ensemblDatabase)
ensemblDatabase
- the Ensembl database
public String getEnsemblSpeciesVersion(String speciesName)
speciesName
- the species name as available in the species list
public String getEnsemblSpeciesVersion(String ensemblType, String speciesName)
ensemblType
- the Ensembl type, e.g., Vertebrates or PlantsspeciesName
- the species name as available in the species list
public ArrayList<String> getSpecies()
public HashMap<String,ArrayList<String>> getAllSpecies()
public void updateEnsemblVersion(String selectedSpecies, String ensemblVersion) throws IOException
selectedSpecies
- the database name of the species to update, e.g.,
hsapiens_gene_ensemblensemblVersion
- the new Ensembl version
IOException
public void loadEnsemblSpeciesVersions(File ensemblVersionsFile) throws FileNotFoundException, IOException
ensemblVersionsFile
- the Ensembl species file to load
FileNotFoundException
IOException
public boolean loadGeneMappings(String jarFilePath, WaitingHandler waitingHandler)
jarFilePath
- the jar file pathwaitingHandler
- the waiting handler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |