SnakEcdysis
- class snakecdysis.snake_wrapper.SnakEcdysis(dico_tool=None, workflow=None, config=None, **kargs)[source]
Bases:
SnakeInstallertest generic wrapper class
- Parameters:
soft_path (str) – The path of wrapped workflow installation
url (str) – Url of versioning repository (GitHub or GitLab)
docs (str) – Url of documentation
description_tool (str) – The header print on terminal when run programme. Please add string values ‘VERSION’, ‘GIT_URL’ and ‘DOCS’ and wrapper automatically replace by th good values
apptainer_ur_files (list(tuple()) – List of tuple with downloaded url and install destination with INSTALL_PATH. like INSTALL_PATH/containers/Apptainer.CulebrONT_tools.sif
datatest_url_files (tuple) – Tuple with 2 values, first the url of datatest, second download name.
Attributes Summary
List of tuple with downloaded url and install destination with INSTALL_PATH.
Tuple with 2 values, first the url of datatest, second download name.
Path to the directory of config.yaml default profile.
The header print on terminal when run programme
Url of documentation
Use to print a dump config.yaml with corrected parameters
return the Path to current profile config
return the active path of tools config
Path to the directory of default configfile.yaml file.
Path to the directory of default tools_path.yaml file.
Url of versioning repository (GitHub or GitLab)
Detect install mode of the soft, can be 'No install', 'local' or 'cluster'
The path of wrapped workflow installation.
The latest workflow version, read on repository
The current workflow version, read on VERSION file
Path to the main snakemake file.
Path to the scripts used on snakemake rules.
The wrapped workflow name.
return command line for rule graph
Detect install mode of the tools soft, can be 'env-modules', 'apptainer', 'conda' or 'env-modules, conda'
Path to the user profile config path setting.
Path to the user tools path setting.
The current workflow version, read on VERSION file
Methods Summary
Download apptainer/apptainer files if provided
check_dir_or_string(level1, level2[, ...])Check if the specified directory or string exists and is valid in the configuration.
check_file_or_string(level1, level2[, ...])Check if path is a file if not empty :return absolute path file
Reset home's parameters of previous installation
Add bash completion for version > 4.4
fail()If installation fail, reset already install files
get_config_value(level1[, level2, level3])get value on config_file
Function for know the last version of program (can be GitHub or GitLab repository)
Function for know the last version of program (can be GitHub or GitLab repository)
Test path of tools_path.yaml on default install path, home or argument
set_config_value(level1[, level2, value, level3])Set config value on config_file
tools_version_to_df([csv_file, ...])check how tools install and get version to save on file
write_config(path)Write the corrected config file to path
Check if file is created and then write with modification of apptainer path
Attributes Documentation
- apptainer_url_files
List of tuple with downloaded url and install destination with INSTALL_PATH. like INSTALL_PATH/containers/Apptainer.CulebrONT_tools.sif
- datatest_url_files
Tuple with 2 values, first the url of datatest, second download name.
- default_profile
Path to the directory of config.yaml default profile. install on INSTALL_PATH/default_profile
- description_tool
The header print on terminal when run programme
Please add string values ‘VERSION’, ‘GIT_URL’ and ‘DOCS’ and wrapper automatically replace by the good values
- docs
Url of documentation
- export_use_yaml
Use to print a dump config.yaml with corrected parameters
- get_active_profile
return the Path to current profile config
- get_active_tools_path
return the active path of tools config
- git_configfile_path
Path to the directory of default configfile.yaml file. default to INSTALL_PATH/install_files/configfile.yaml
- git_tools_path
Path to the directory of default tools_path.yaml file. default to INSTALL_PATH/install_files/tools_path.yaml
- git_url
Url of versioning repository (GitHub or GitLab)
- install_mode
Detect install mode of the soft, can be ‘No install’, ‘local’ or ‘cluster’
- install_path
The path of wrapped workflow installation.
- latest_version
The latest workflow version, read on repository
- snakecdysis_version
The current workflow version, read on VERSION file
- snakefile
Path to the main snakemake file. Search on INSTALL_PATH/snakefiles/snakefile
- snakemake_scripts
Path to the scripts used on snakemake rules. Search on INSTALL_PATH/snakemake_scripts
- soft_name
The wrapped workflow name.
- string_to_dag
return command line for rule graph
- tools_mode
Detect install mode of the tools soft, can be ‘env-modules’, ‘apptainer’, ‘conda’ or ‘env-modules, conda’
- user_profile_config
Path to the user profile config path setting. default to ~/.config/SOFTNAME/config.yaml
- user_tools_path
Path to the user tools path setting. default to ~/.config/SOFTNAME/tools_path.yaml
- version
The current workflow version, read on VERSION file
Methods Documentation
- check_and_download_apptainer()
Download apptainer/apptainer files if provided
- check_dir_or_string(level1, level2, mandatory=(), level3=None, check_string=False)[source]
Check if the specified directory or string exists and is valid in the configuration.
Parameters: - level1 (str): First level in the configuration hierarchy. - level2 (str): Second level in the configuration hierarchy. - mandatory (tuple): Tuple of mandatory items for the tool. - level3 (str): Optional third level in the configuration hierarchy. - check_string (bool): Flag to indicate whether to check for a string value.
Raises: - NotADirectoryError: If the specified path does not exist or is not a valid directory. - ValueError: If the path is empty when it is expected to be a string.
- check_file_or_string(level1, level2, mandatory=(), level3=None, check_string=False)[source]
Check if path is a file if not empty :return absolute path file
- clean_home()
Reset home’s parameters of previous installation
- create_bash_completion()
Add bash completion for version > 4.4
- fail()
If installation fail, reset already install files
- get_epilog() str
- Function for know the last version of program (can be GitHub or GitLab repository)
check every 30 days to skip request of if no internet connection
Return: epilogTool print at the end of header
- get_last_version() str
Function for know the last version of program (can be GitHub or GitLab repository)
- get_tool_configfile()
Test path of tools_path.yaml on default install path, home or argument
- set_config_value(level1, level2=None, value=None, level3=None)[source]
Set config value on config_file
- tools_version_to_df(csv_file=None, active_tools_list=None, output_file=None)
check how tools install and get version to save on file
- write_user_tools_path()
Check if file is created and then write with modification of apptainer path