public class Settings extends SettingsHolder
SettingsHolder.GeneScoreMethod, SettingsHolder.Method, SettingsHolder.MultiProbeHandling, SettingsHolder.MultiTestCorrMethod
Modifier and Type | Field and Description |
---|---|
protected static String[] |
ANALYSIS_SETTINGS
Settings that we need to write to analysis results files.
|
protected static String |
HEADER
Header for the config file.
|
protected static String |
USERGUI_DEFAULT_PROPERTIES
Part of the distribution, where defaults can be read from.
|
protected static String |
USERGUI_PROPERTIES
Filename for settings.
|
ALWAYS_USE_EMPIRICAL, ANNOT_FILE, ANNOT_FORMAT, BIG_IS_BETTER, CLASS_FILE, CLASS_SCORE_METHOD, config, CUSTOM_GENE_SET_DIRECTORY_PROPERTY, CUSTOM_GENESET_FILES, DATA_COL, DATA_DIRECTORY, DEFAULT_CUSTOM_GENE_SET_DIR_NAME, DEFAULT_USER_DATA_DIR_NAME, defaults, DO_LOG, FILTER_NONSPECIFIC, GEMMA_URL_BASE, GENE_REP_TREATMENT, GENE_SCORE_THRESHOLD_KEY, GENE_SCORE_THRESHOLD_LEGACY_KEY, GENE_SET_RESAMPLING_SCORE_METHOD, GENE_URL_BASE, GOLD_STANDARD_FILE, IS_TESTER, ITERATIONS, MAX_CLASS_SIZE, MIN_CLASS_SIZE, MTC_CONFIG_NAME, OUTPUT_FILE, PREFERENCES_FILE_NAME, QUANTILE_CONFIG_NAME, RAW_FILE_CONFIG_NAME, SAVE_ALL_GENES_IN_OUTPUT, SCORE_COL, SCORE_FILE, SELECTED_CUSTOM_GENESETS, USE_BIOL_PROC, USE_CELL_COMP, USE_MOL_FUNC, USE_MULTIFUNCTIONALITY_CORRECTION, USE_USER_DEFINED_GROUPS
Constructor and Description |
---|
Settings()
Create the settings, reading them from a file to be determined by the constructor.
|
Settings(boolean readFromFile) |
Settings(SettingsHolder settingsToCopy)
Creates settings object from a copy.
|
Settings(String configurationFile)
Create a Settings object from the header of a results file or from a regular configuration file - autosave will
not be set so they cannot be changed.
|
Settings(URL resource)
Autosave will not be set.
|
Modifier and Type | Method and Description |
---|---|
GeneAnnotationParser.Format |
getAnnotFormat() |
SettingsHolder.Method |
getClassScoreMethod() |
org.apache.commons.configuration.PropertiesConfiguration |
getConfig() |
SettingsHolder.MultiProbeHandling |
getGeneRepTreatment() |
double |
getGeneScoreThreshold()
Value used for ORA
|
SettingsHolder.GeneScoreMethod |
getGeneSetResamplingScoreMethod() |
File |
getLogFile()
Determine where to put the log file.
|
SettingsHolder |
getSettingsHolder() |
boolean |
isAutoSaving() |
void |
setAlwaysUseEmpirical(boolean b) |
void |
setAnnotFile(String val) |
void |
setAnnotFormat(GeneAnnotationParser.Format arg) |
void |
setBigIsBetter(boolean b) |
void |
setClassFile(String val) |
void |
setClassScoreMethod(SettingsHolder.Method val) |
void |
setCustomGeneSetDirectory(String val) |
void |
setDataCol(int val) |
void |
setDataDirectory(String val) |
void |
setDoLog(boolean val) |
void |
setFilterNonSpecific(boolean val) |
void |
setGeneRepTreatment(SettingsHolder.MultiProbeHandling val) |
void |
setGeneScoreThreshold(double val)
Only applies to ORA
|
void |
setGeneSetResamplingScoreMethod(SettingsHolder.GeneScoreMethod val)
Set the method used to compute how values are combined (GSR method only).
|
void |
setGeneUrlBase(String url) |
void |
setGoldStandardFile(String goldStandardFile)
Mostly used for testing
|
void |
setIterations(int val) |
void |
setMaxClassSize(int val) |
void |
setMinClassSize(int val) |
void |
setMtc(SettingsHolder.MultiTestCorrMethod mtc) |
void |
setOutputFile(String outputFile)
Mostly used for testing
|
void |
setPrefFile(String val) |
void |
setProperty(String key,
Object value)
Set an arbitrary property.
|
void |
setQuantile(int val) |
void |
setSaveAllGenesInOutput(boolean saveAllGenes) |
void |
setScoreCol(int val)
Which column of the input score file has the scores.
|
void |
setSelectedCustomGeneSets(Collection<GeneSetTerm> addedClasses) |
void |
setTester(boolean isTester) |
void |
setUseBiologicalProcess(boolean useBiologicalProcess) |
void |
setUseCellularComponent(boolean useCellularComponent) |
void |
setUseMolecularFunction(boolean useMolecularFunction) |
void |
setUseMultifunctionalityCorrection(boolean b) |
void |
setUserGeneSetDirectory(String dir) |
String |
toString() |
static void |
writeAnalysisSettings(SettingsHolder settings,
String fileName)
Write a configuration to the given file - but just settings relevant to analysis (not window locations, for
example).
|
static void |
writeAnalysisSettings(SettingsHolder settings,
Writer out)
Write a configuration to the given output - but just settings relevant to analysis (not window locations, for
example).
|
void |
writeAnalysisSettings(String fileName)
Intended to be used for saving results to the header of an output file.
|
void |
writePrefs()
Save the preferences to disk, if necessary, to the DEFAULT location (e.g.
|
getAlwaysUseEmpirical, getAnnotFile, getBigIsBetter, getClassFile, getClassScoreMethodName, getCustomGeneSetDirectory, getCustomGeneSetFiles, getDataCol, getDataDirectory, getDefaultGeneUrl, getDefaultSettingsValue, getDefaultUserClassesDirPath, getDefaultUserDataDirPath, getDoLog, getFilterNonSpecific, getGeneScoreFileDirectory, getGeneUrlBase, getGoldStandardFile, getHelpUrl, getIterations, getMaxClassSize, getMinClassSize, getMtc, getProperty, getQuantile, getRawDataFileDirectory, getRawDataFileName, getSaveAllGenesInOutput, getScoreCol, getScoreFile, getSelectedCustomGeneSets, getStringProperty, getUseBiologicalProcess, getUseCellularComponent, getUseLog, getUseMolecularFunction, getUserGeneSetDirectory, getUseUserDefined, isTester, loadUserDefined, setCustomGeneSetFiles, setLoadUserDefined, setRawFile, setScoreFile, setUseUserDefined, upperTail, useMultifunctionalityCorrection
protected static final String[] ANALYSIS_SETTINGS
protected static final String USERGUI_DEFAULT_PROPERTIES
protected static final String USERGUI_PROPERTIES
protected static final String HEADER
public Settings() throws IOException
IOException
- if there are problems setting up the configuration.public Settings(boolean readFromFile) throws IOException
readFromFile
- if true, the user's config will be read in. If false, a blank (default) configuration will be
initialized.IOException
public Settings(SettingsHolder settingsToCopy)
settings
- - settings object to copypublic Settings(String configurationFile) throws org.apache.commons.configuration.ConfigurationException, IOException
configurationFile
- IOException
org.apache.commons.configuration.ConfigurationException
public Settings(URL resource) throws org.apache.commons.configuration.ConfigurationException, IOException
resource
- IOException
org.apache.commons.configuration.ConfigurationException
public static void writeAnalysisSettings(SettingsHolder settings, String fileName) throws IOException
settings
- fileName
- IOException
public static void writeAnalysisSettings(SettingsHolder settings, Writer out) throws IOException
settings
- out
- IOException
public GeneAnnotationParser.Format getAnnotFormat()
getAnnotFormat
in class SettingsHolder
public double getGeneScoreThreshold()
SettingsHolder
getGeneScoreThreshold
in class SettingsHolder
public SettingsHolder.Method getClassScoreMethod()
getClassScoreMethod
in class SettingsHolder
public org.apache.commons.configuration.PropertiesConfiguration getConfig()
getConfig
in class SettingsHolder
public SettingsHolder.MultiProbeHandling getGeneRepTreatment()
getGeneRepTreatment
in class SettingsHolder
public SettingsHolder.GeneScoreMethod getGeneSetResamplingScoreMethod()
getGeneSetResamplingScoreMethod
in class SettingsHolder
public File getLogFile()
public SettingsHolder getSettingsHolder()
public boolean isAutoSaving()
public void setAlwaysUseEmpirical(boolean b)
b
- public void setAnnotFile(String val)
public void setAnnotFormat(GeneAnnotationParser.Format arg)
arg
- public void setBigIsBetter(boolean b)
b
- public void setClassFile(String val)
val
- This is the GO XML file.public void setClassScoreMethod(SettingsHolder.Method val)
public void setCustomGeneSetDirectory(String val)
public void setDataCol(int val)
public void setDataDirectory(String val)
public void setDoLog(boolean val)
public void setFilterNonSpecific(boolean val)
public void setGeneRepTreatment(SettingsHolder.MultiProbeHandling val)
public void setGeneScoreThreshold(double val)
val
- public void setGeneSetResamplingScoreMethod(SettingsHolder.GeneScoreMethod val)
val
- public void setGeneUrlBase(String url)
url
- public void setGoldStandardFile(String goldStandardFile)
goldStandardFile
- public void setIterations(int val)
public void setMaxClassSize(int val)
public void setMinClassSize(int val)
public void setMtc(SettingsHolder.MultiTestCorrMethod mtc)
mtc
- The mtc to set.public void setOutputFile(String outputFile)
outputFile
- public void setPrefFile(String val)
public void setProperty(String key, Object value)
key
- value
- public void setQuantile(int val)
public void setSaveAllGenesInOutput(boolean saveAllGenes)
public void setScoreCol(int val)
val
- public void setSelectedCustomGeneSets(Collection<GeneSetTerm> addedClasses)
public void setTester(boolean isTester)
public void setUseBiologicalProcess(boolean useBiologicalProcess)
useBiologicalProcess
- The useBiologicalProcess to set.public void setUseCellularComponent(boolean useCellularComponent)
useCellularComponent
- The useCellularComponent to set.public void setUseMolecularFunction(boolean useMolecularFunction)
useMolecularFunction
- The useMolecularFunction to set.public void setUseMultifunctionalityCorrection(boolean b)
b
- public void setUserGeneSetDirectory(String dir)
dir
- The dir to set.public void writeAnalysisSettings(String fileName) throws IOException
fileName
- IOException
public void writePrefs()
Copyright © 2002-2013 UBC Centre for High-Throughput Biology. All Rights Reserved.