Class Settings
java.lang.Object
fr.ens.biologie.genomique.eoulsan.Settings
- All Implemented Interfaces:
Serializable
This class define a settings class.
- Since:
- 1.0
- Author:
- Laurent Jourdren
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionGet the additional annotation hypertext links path.Get the additional annotation storage path.Get the AWS access key.Get the AWS secret key.booleangetBooleanSetting(String settingName) Get the value of the setting as a boolean value.Get the name of the cluster scheduler.static StringGet the configuration file path.Get the format paths.intGet the default memory required for the steps in cluster mode.fr.ens.biologie.genomique.kenetre.bio.FastqFormatGet the default fastq format.Get the Docker backend name.Get the Docker connection string.Get the Docker connection URI.Get the Docker singularity storage path.doublegetDoubleSetting(String settingName) Get the value of the setting as a double value.Get the temporary directory for executables.Get the temporary directory File for executables.Get the Galaxy tool path.Get the genome description storage path.Get the genome mapper index storage path.Get the genome storage path.Get the GFF storage path.Get the GTF storage path.Get the Hadoop log level.intgetIntSetting(String settingName) Get the value of the setting as a integer value.Create a property object for javamail smtp configuration from the settings.intGet the number of threads to use in Steps computation in local mode.Get the output tree type.Get the mail address for eoulsan results.Get the RServe server name.getSetting(String settingName) Get a setting value.Get a set with the names of the settings to obfuscate.Get a set of settings names.Get the name of the SMTP server host.Get the temporary directory.Get the temporary directory File.Get the UI name.Get the working directory for executables.Get the ZooKeeper connect string.intGet the ZooKeeper default port.intGet the ZooKeeper session timeout.booleanTest if the platform checking must be avoided at Eoulsan startup.booleanisDebug()Test is the debug mode is enabled.booleanIs Docker features are enabled using singularity.booleanTest if a Docker connection has been set.booleanTest if when use Docker, NFS roots must been mounted instead of file paths.booleanTest if save.r.keep.files is truebooleanTest if design must be obfuscatedbooleanTest if replicate information must be removed from design.booleanTest is the debug mode is enabled.booleanTest if RServe is enabled.booleanTest if save.r.script is truebooleanTest if an image of the workflow must be saved.booleanTest if an email must be sent at the end of the analysis.booleanTest if a setting key exists.booleanTest if Eoulsan result files must be written using the old format.booleanTest if the temporary directory File has been defined by user.booleanTest if standard external modules must be used.voidLoad application options.voidloadSettings(File file) Load application options.voidloadSettings(Path file) Load application options.voidAdd all the settings to the log.voidSave application options.voidsaveSettings(File file) Save application options.voidsaveSettings(Path file) Save application options.voidsetAdditionalAnnotationHypertextLinksPath(String additionalAnnotationHypertextLinksPath) Set the additional annotation hypertext links path.voidsetAdditionalAnnotationStoragePath(String additionalAnnotationStoragePath) Set the additional annotation storage path.voidsetAWSAccessKey(String value) Set the AWS access key.voidsetAWSSecretKey(String value) Set the AWS secret key.voidsetBypassPlatformChecking(boolean bypass) Set if the platform checking must be avoided.voidsetClusterSchedulerName(String schedulerName) Set the name of the cluster scheduler.voidsetDataFormatPath(String path) Set the format path.voidsetDataFormatPaths(List<String> paths) Set the data format pathsvoidsetDebug(boolean debug) Set the debug setting.voidsetDefaultClusterMemoryRequired(int memory) Set the default memory required for the steps in cluster mode.voidsetDefaultFastqFormat(fr.ens.biologie.genomique.kenetre.bio.FastqFormat format) Set the Fastq format default value.voidsetDockerBackEnd(String backend) Set the Docker URI.voidsetDockerBySingularityEnabled(boolean enabled) Enable Docker features using SingularityvoidSet the Docker URI.voidsetDockerMountNFSRoots(boolean enable) Set if when use Docker, NFS roots must been mounted instead of file paths.voidsetDockerSingularityStoragePath(String storagePath) Set the Docker singularity storage path.voidsetExecutablesTempDirectory(String executablesTempDirectory) Set the temporary directory for executables.voidsetGalaxyToolPath(String path) Set the Galaxy tool path.voidsetGalaxyToolsPaths(List<String> paths) Set the Galaxy tools pathsvoidsetGenomeDescStoragePath(String genomeDescStoragePath) Set the genome description storage path.voidsetGenomeMapperIndexStoragePath(String genomeMapperIndexStoragePath) Set the genome index storage path.voidsetGenomeStoragePath(String genomeStoragePath) Set the genome storage path.voidsetGFFStoragePath(String gffStoragePath) Set the GFF storage path.voidsetGTFStoragePath(String gtfStoragePath) Set the GTF storage path.voidsetHadoopLogLevel(String value) Set the Hadoop log level.voidsetKeepRServeFiles(boolean keepRServeFiles) Set if save Rscripts is truevoidsetLocalThreadsNumber(int threadsNumber) Set the number of threads to use in local mode.voidsetObfuscateDesign(boolean obfuscate) Set if the design must be obfuscatedvoidsetObfuscateRemoveDesignInfo(boolean remove) Set if the replicate information must be removed from the design.voidsetOutputTreeType(String outputTreeType) Set the output tree type.voidsetPrintStackTrace(boolean printStackTrace) Set the print stack trace setting.voidsetResultMail(String mail) Set the mail address for eoulsan results.voidsetRServeServerEnabled(boolean enable) Set if RServe is enabled.voidsetRServeServerName(String serverName) Set the RServe server name.voidsetSaveRscript(boolean krs) Set if save Rscripts is truevoidsetSaveWorkflowImage(boolean save) Set if an image of the workflow must be saved.voidsetSendResultMail(boolean enableSendResultMail) Set if an email must be sent at the end of the analysis.voidsetSetting(String settingName, String settingValue) Set a setting value.voidsetSetting(String settingName, String settingValue, boolean logChange) Set a setting value.voidsetSettings(Settings settings) Set the values of the settings with another Settings object.voidsetSMTPHost(String smtpHost) Set the SMTP server host.voidsetTempDirectory(String tempDirectory) Set the temporary directory.voidSet the UI name.voidsetUseOldEoulsanResultFormat(boolean useOldEoulsanResultFormat) Set if Eoulsan result files must be written using the old format.voidsetUseStandardExternalModules(boolean enable) Set if standard external modules must be used.voidsetWorkingDirectory(String workingDirectory) Set the working directory.voidsetZooKeeperConnectString(String connectString) Set the ZooKeeper connect string.voidsetZooKeeperDefaultPort(int port) Set the ZooKeeper default port.voidsetZooKeeperSessionTimeout(int timeout) Set the ZooKeeper session timeout.toString()
-
Field Details
-
DATA_FORMAT_PATH_KEY
- See Also:
-
GALAXY_TOOL_PATH_KEY
- See Also:
-
STANDARD_EXTERNAL_MODULES_ENABLED_KEY
- See Also:
-
-
Method Details
-
isSetting
Test if a setting key exists.- Parameters:
key- key to test- Returns:
- true if the setting exist
-
isDebug
public boolean isDebug()Test is the debug mode is enabled.- Returns:
- true if the debug mode is enable
-
isPrintStackTrace
public boolean isPrintStackTrace()Test is the debug mode is enabled.- Returns:
- true if the debug mode is enable
-
getAWSAccessKey
Get the AWS access key.- Returns:
- the AWS access key
-
getAWSSecretKey
Get the AWS secret key.- Returns:
- the AWS secret key
-
getHadoopLogLevel
Get the Hadoop log level.- Returns:
- the Hadoop log level
-
getClusterSchedulerName
Get the name of the cluster scheduler.- Returns:
- the name of the cluster scheduler
-
getDefaultClusterMemoryRequired
public int getDefaultClusterMemoryRequired()Get the default memory required for the steps in cluster mode.- Returns:
- the default memory required for the cluster mode
-
isRServeServerEnabled
public boolean isRServeServerEnabled()Test if RServe is enabled.- Returns:
- true if the RServe server is enabled
-
isSaveRscripts
public boolean isSaveRscripts()Test if save.r.script is true- Returns:
- boolean with keep Rscripts values
-
getRServeServerName
Get the RServe server name.- Returns:
- The name of the RServe to use
-
isKeepRServeFiles
public boolean isKeepRServeFiles()Test if save.r.keep.files is true- Returns:
- boolean if the RServe files must be kept
-
getTempDirectory
Get the temporary directory.- Returns:
- The temporary directory
-
getTempDirectoryFile
Get the temporary directory File.- Returns:
- The temporary directory as a File object
-
isUserDefinedTempDirectory
public boolean isUserDefinedTempDirectory()Test if the temporary directory File has been defined by user.- Returns:
- true id the temporary directory has defined by user
-
getExecutablesTempDirectory
Get the temporary directory for executables.- Returns:
- The temporary directory for executables
-
getWorkingDirectory
Get the working directory for executables.- Returns:
- The working directory for executables
-
getExecutablesTempDirectoryFile
Get the temporary directory File for executables.- Returns:
- The temporary directory for executables as a File object
-
isObfuscateDesign
public boolean isObfuscateDesign()Test if design must be obfuscated- Returns:
- true if design must be obfuscated
-
isObfuscateDesignRemoveReplicateInfo
public boolean isObfuscateDesignRemoveReplicateInfo()Test if replicate information must be removed from design.- Returns:
- true if replicate information must be removed
-
getLocalThreadsNumber
public int getLocalThreadsNumber()Get the number of threads to use in Steps computation in local mode.- Returns:
- the number of threads to use
-
getDefaultFastqFormat
public fr.ens.biologie.genomique.kenetre.bio.FastqFormat getDefaultFastqFormat()Get the default fastq format.- Returns:
- the default fastq format
-
isBypassPlatformChecking
public boolean isBypassPlatformChecking()Test if the platform checking must be avoided at Eoulsan startup.- Returns:
- true if the platform checking must be avoided
-
getGenomeMapperIndexStoragePath
Get the genome mapper index storage path.- Returns:
- the path to genome mapper index storage path
-
getGenomeDescStoragePath
Get the genome description storage path.- Returns:
- the path to genome description storage path
-
getGenomeStoragePath
Get the genome storage path.- Returns:
- the path to genome storage path
-
getGFFStoragePath
Get the GFF storage path.- Returns:
- the path to GFF storage path
-
getGTFStoragePath
Get the GTF storage path.- Returns:
- the path to GTF storage path
-
getAdditionalAnnotationStoragePath
Get the additional annotation storage path.- Returns:
- the path to the additional annotation storage path
-
getAdditionalAnnotationHypertextLinksPath
Get the additional annotation hypertext links path.- Returns:
- the additional annotation hypertext links path
-
isSendResultMail
public boolean isSendResultMail()Test if an email must be sent at the end of the analysis.- Returns:
- true if an email must be sent at the end of the analysis
-
getResultMail
Get the mail address for eoulsan results.- Returns:
- the mail address as a string
-
getSMTPHost
Get the name of the SMTP server host.- Returns:
- the name of the SMTP server host
-
getZooKeeperConnectString
Get the ZooKeeper connect string.- Returns:
- the ZooKeeper connect string
-
getZooKeeperDefaultPort
public int getZooKeeperDefaultPort()Get the ZooKeeper default port.- Returns:
- the ZooKeeper default port
-
getZooKeeperSessionTimeout
public int getZooKeeperSessionTimeout()Get the ZooKeeper session timeout.- Returns:
- the ZooKeeper session timeout
-
isUseOldEoulsanResultFormat
public boolean isUseOldEoulsanResultFormat()Test if Eoulsan result files must be written using the old format.- Returns:
- true if Eoulsan result files must be written using the old format
-
getUIName
Get the UI name.- Returns:
- the UI name
-
getDockerBackend
Get the Docker backend name.- Returns:
- the docker connection string
-
getDockerConnection
Get the Docker connection string.- Returns:
- the docker connection string
-
isDockerBySingularityEnabled
public boolean isDockerBySingularityEnabled()Is Docker features are enabled using singularity.- Returns:
- true if the Docker features are enabled using Singularity
-
getDockerSingularityStoragePath
Get the Docker singularity storage path.- Returns:
- the path to GFF storage path
-
isDockerConnectionDefined
public boolean isDockerConnectionDefined()Test if a Docker connection has been set.- Returns:
- true if a Docker connection has been set
-
isDockerMountNFSRoots
public boolean isDockerMountNFSRoots()Test if when use Docker, NFS roots must been mounted instead of file paths.- Returns:
- true if if when use Docker, NFS roots must been mounted instead of file paths
-
getDockerConnectionURI
Get the Docker connection URI.- Returns:
- the docker connection URI
-
getDataFormatPaths
Get the format paths.- Returns:
- the format path
-
getGalaxyToolPaths
Get the Galaxy tool path.- Returns:
- the Galaxy tool path
-
getOutputTreeType
Get the output tree type.- Returns:
- the output tree type
-
isSaveWorkflowImage
public boolean isSaveWorkflowImage()Test if an image of the workflow must be saved.- Returns:
- true if an image of the workflow must be saved
-
isUseStandardExternalModules
public boolean isUseStandardExternalModules()Test if standard external modules must be used.- Returns:
- true if standard external modules must be used
-
getSetting
Get a setting value.- Parameters:
settingName- setting name- Returns:
- settingName value as a String
-
getIntSetting
Get the value of the setting as a integer value.- Parameters:
settingName- setting name- Returns:
- the value of the setting as an integer
- Throws:
EoulsanException- if the value is not an integer
-
getDoubleSetting
Get the value of the setting as a double value.- Parameters:
settingName- setting name- Returns:
- the value of the setting as an double
- Throws:
EoulsanException- if the value is not an double
-
getBooleanSetting
Get the value of the setting as a boolean value.- Parameters:
settingName- setting name- Returns:
- the value of the setting as an integer
-
getSettingsNames
Get a set of settings names.- Returns:
- a set with all the name of the settings
-
setDebug
public void setDebug(boolean debug) Set the debug setting.- Parameters:
debug- value of the debug setting
-
setPrintStackTrace
public void setPrintStackTrace(boolean printStackTrace) Set the print stack trace setting.- Parameters:
printStackTrace- value of the print stack trace setting
-
setAWSAccessKey
Set the AWS access key.- Parameters:
value- the AWS access key
-
setAWSSecretKey
Set the AWS secret key.- Parameters:
value- the AWS secret key
-
setHadoopLogLevel
Set the Hadoop log level.- Parameters:
value- the HAdoop log level
-
setClusterSchedulerName
Set the name of the cluster scheduler.- Parameters:
schedulerName- the name of the cluster scheduler
-
setDefaultClusterMemoryRequired
public void setDefaultClusterMemoryRequired(int memory) Set the default memory required for the steps in cluster mode.- Parameters:
memory- the required memory
-
setRServeServerEnabled
public void setRServeServerEnabled(boolean enable) Set if RServe is enabled.- Parameters:
enable- true if the RServe server is enable
-
setSaveRscript
public void setSaveRscript(boolean krs) Set if save Rscripts is true- Parameters:
krs- boolean
-
setKeepRServeFiles
public void setKeepRServeFiles(boolean keepRServeFiles) Set if save Rscripts is true- Parameters:
keepRServeFiles- true if Rserve file must be kept
-
setRServeServerName
Set the RServe server name.- Parameters:
serverName- The name of the RServe to use
-
setTempDirectory
Set the temporary directory.- Parameters:
tempDirectory- The path to the temporary directory
-
setExecutablesTempDirectory
Set the temporary directory for executables.- Parameters:
executablesTempDirectory- The path to the temporary directory for executables
-
setWorkingDirectory
Set the working directory.- Parameters:
workingDirectory- The path to the working directory
-
setObfuscateDesign
public void setObfuscateDesign(boolean obfuscate) Set if the design must be obfuscated- Parameters:
obfuscate- true if the design must be obfuscated
-
setObfuscateRemoveDesignInfo
public void setObfuscateRemoveDesignInfo(boolean remove) Set if the replicate information must be removed from the design.- Parameters:
remove- true if the replicate information must be remove
-
setLocalThreadsNumber
public void setLocalThreadsNumber(int threadsNumber) Set the number of threads to use in local mode.- Parameters:
threadsNumber- the number of threads to use in local mode
-
setDefaultFastqFormat
public void setDefaultFastqFormat(fr.ens.biologie.genomique.kenetre.bio.FastqFormat format) Set the Fastq format default value.- Parameters:
format- the value to set
-
setBypassPlatformChecking
public void setBypassPlatformChecking(boolean bypass) Set if the platform checking must be avoided.- Parameters:
bypass- true to bypass the platform checking
-
setGenomeMapperIndexStoragePath
Set the genome index storage path.- Parameters:
genomeMapperIndexStoragePath- the path to genome index storage path
-
setGenomeDescStoragePath
Set the genome description storage path.- Parameters:
genomeDescStoragePath- the path to genome index storage path
-
setGenomeStoragePath
Set the genome storage path.- Parameters:
genomeStoragePath- the path to genome index storage path
-
setGFFStoragePath
Set the GFF storage path.- Parameters:
gffStoragePath- the path to GFF index storage path
-
setGTFStoragePath
Set the GTF storage path.- Parameters:
gtfStoragePath- the path to GTF index storage path
-
setAdditionalAnnotationStoragePath
Set the additional annotation storage path.- Parameters:
additionalAnnotationStoragePath- the path to the additional annotation index storage path
-
setAdditionalAnnotationHypertextLinksPath
public void setAdditionalAnnotationHypertextLinksPath(String additionalAnnotationHypertextLinksPath) Set the additional annotation hypertext links path.- Parameters:
additionalAnnotationHypertextLinksPath- the path to the additional annotation hypertext links path
-
setSendResultMail
public void setSendResultMail(boolean enableSendResultMail) Set if an email must be sent at the end of the analysis.- Parameters:
enableSendResultMail- true if an email must be sent at the end of the analysis
-
setResultMail
Set the mail address for eoulsan results.- Parameters:
mail- the mail address as a string
-
setSMTPHost
Set the SMTP server host.- Parameters:
smtpHost- the name of the SMTP server host
-
setZooKeeperConnectString
Set the ZooKeeper connect string.- Parameters:
connectString- the ZooKeeper connect string
-
setZooKeeperDefaultPort
public void setZooKeeperDefaultPort(int port) Set the ZooKeeper default port.- Parameters:
port- the ZooKeeper default port
-
setZooKeeperSessionTimeout
public void setZooKeeperSessionTimeout(int timeout) Set the ZooKeeper session timeout.- Parameters:
timeout- the ZooKeeper session timeout
-
setUseOldEoulsanResultFormat
public void setUseOldEoulsanResultFormat(boolean useOldEoulsanResultFormat) Set if Eoulsan result files must be written using the old format.- Parameters:
useOldEoulsanResultFormat- true if Eoulsan result files must be written using the old format
-
setUIName
Set the UI name.- Parameters:
uiName- the UI name
-
setDockerBackEnd
Set the Docker URI.- Parameters:
backend- the Docker back-end
-
setDockerConnectionURI
Set the Docker URI.- Parameters:
uri- the Docker URI
-
setDockerBySingularityEnabled
public void setDockerBySingularityEnabled(boolean enabled) Enable Docker features using Singularity- Parameters:
enabled- true to enable the feature
-
setDockerSingularityStoragePath
Set the Docker singularity storage path.- Parameters:
storagePath- the path to Docker singularity storage path
-
setDockerMountNFSRoots
public void setDockerMountNFSRoots(boolean enable) Set if when use Docker, NFS roots must been mounted instead of file paths.- Parameters:
enable- the value of the parameter
-
setDataFormatPath
Set the format path.- Parameters:
path- the format
-
setDataFormatPaths
Set the data format paths- Parameters:
paths- the path to set
-
setGalaxyToolPath
Set the Galaxy tool path.- Parameters:
path- the format
-
setGalaxyToolsPaths
Set the Galaxy tools paths- Parameters:
paths- the path to set
-
setOutputTreeType
Set the output tree type.- Parameters:
outputTreeType- the output tree type
-
setSaveWorkflowImage
public void setSaveWorkflowImage(boolean save) Set if an image of the workflow must be saved.- Parameters:
save- the value
-
setUseStandardExternalModules
public void setUseStandardExternalModules(boolean enable) Set if standard external modules must be used.- Parameters:
enable- the value
-
setSetting
Set a setting value.- Parameters:
settingName- name of the setting to setsettingValue- value of the setting to set
-
setSetting
Set a setting value.- Parameters:
settingName- name of the setting to setsettingValue- value of the setting to setlogChange- if true the change will be logged
-
getConfigurationFilePath
Get the configuration file path.- Returns:
- the configuration file path
-
getJavaMailSMTPProperties
Create a property object for javamail smtp configuration from the settings.- Returns:
- a property object
-
saveSettings
Save application options.- Throws:
IOException- if an error occurs while writing results
-
saveSettings
Save application options.- Parameters:
file- File to save- Throws:
IOException- if an error occurs while writing settings
-
saveSettings
Save application options.- Parameters:
file- File to save- Throws:
IOException- if an error occurs while writing settings
-
loadSettings
Load application options.- Throws:
IOException- if an error occurs while reading settingsEoulsanException- if an invalid key is found in configuration file
-
loadSettings
Load application options.- Parameters:
file- file to save- Throws:
IOException- if an error occurs while reading the fileEoulsanException- if an invalid key is found in configuration file
-
loadSettings
Load application options.- Parameters:
file- file to save- Throws:
IOException- if an error occurs while reading the fileEoulsanException- if an invalid key is found in configuration file
-
setSettings
Set the values of the settings with another Settings object.- Parameters:
settings- Settings object which values must be set in the current object
-
logSettings
public void logSettings()Add all the settings to the log. -
getSettingsKeyToObfuscated
Get a set with the names of the settings to obfuscate.- Returns:
- a set of strings with the name of the settings to obfuscate
-
toString
-