autometa.config packageο
Submodulesο
autometa.config.databases moduleο
autometa.config.environ moduleο
# License: GNU Affero General Public License v3 or later # A copy of GNU AGPL v3 should have been included in this software package in LICENSE.txt.
Configuration handling for Autometa environment.
- autometa.config.environ.bedtools()ο
Get bedtools version.
- Returns
version of bedtools
- Return type
str
- autometa.config.environ.bowtie2()ο
Get bowtie2 version.
- Returns
version of bowtie2
- Return type
str
- autometa.config.environ.configure(config: configparser.ConfigParser) Tuple[configparser.ConfigParser, bool] ο
Checks executable dependencies necessary to run autometa. Will update config with executable dependencies with details: 1. presence/absence of dependency and its location 2. versions
- Parameters
config (configparser.ConfigParser) β Description of parameter config.
- Returns
(config, satisfied) config updated with executables details Details: 1. location of executable 2. version of executable config : configparser.ConfigParser satisfied : bool
- Return type
2-tuple
- autometa.config.environ.diamond()ο
Get diamond version.
- Returns
version of diamond
- Return type
str
- autometa.config.environ.find_executables()ο
Retrieves executable file paths by looking in Autometa dependent executables.
- Returns
{executable:</path/to/executable>, β¦}
- Return type
dict
- autometa.config.environ.get_versions(program: Optional[str] = None) Union[Dict[str, str], str] ο
Retrieve versions from all required executable dependencies. If program is provided will only return version for program.
See: https://stackoverflow.com/a/834451/12671809
- Parameters
program (str, optional) β the program to retrieve the version, by default None
- Returns
if program is None: dict - {program:version, β¦} if program: str - version
- Return type
dict or str
- Raises
ValueError β program is not a string
KeyError β program is not an executable dependency.
- autometa.config.environ.hmmpress()ο
Get hmmpress version.
- Returns
version of hmmpress
- Return type
str
- autometa.config.environ.hmmscan()ο
Get hmmscan version.
- Returns
version of hmmscan
- Return type
str
- autometa.config.environ.hmmsearch()ο
Get hmmsearch version.
- Returns
version of hmmsearch
- Return type
str
- autometa.config.environ.prodigal()ο
Get prodigal version.
- Returns
version of prodigal
- Return type
str
- autometa.config.environ.samtools()ο
Get samtools version.
- Returns
version of samtools
- Return type
str
autometa.config.utilities moduleο
- autometa.config.utilities.get_config(fpath: str) configparser.ConfigParser ο
Load the config provided at fpath.
- Parameters
fpath (str) β </path/to/file.config>
- Returns
interpolated config object parsed from fpath.
- Return type
config.ConfigParser
- Raises
FileNotFoundError β Provided fpath does not exist.
- autometa.config.utilities.main()ο
- autometa.config.utilities.parse_args(fpath: Optional[str] = None) argparse.Namespace ο
Generate argparse namespace (args) from config file.
- Parameters
fpath (str) β </path/to/file.config> (default is DEFAULT_CONFIG in autometa.config)
- Returns
namespace typical to parser.parse_args() method from argparse
- Return type
argparse.Namespace
- Raises
FileNotFoundError β provided fpath does not exist.
- autometa.config.utilities.put_config(config: configparser.ConfigParser, out: str) None ο
Writes config to out and updates checkpoints checksum.
- Parameters
config (config.ConfigParser) β configuration containing user provided parameters and files information.
out (str) β </path/to/output/file.config>
- Returns
- Return type
NoneType
- autometa.config.utilities.set_home_dir() str ο
Set the home_dir in autometaβs default configuration (default.config) based on autometaβs current location. If the home_dir variable is already set, then this will be used as the home_dir location.
- Returns
</path/to/package/autometa>
- Return type
str
- autometa.config.utilities.update_config(section: str, option: str, value: str, fpath: str = '/home/docs/checkouts/readthedocs.org/user_builds/autometa/checkouts/2.0.3/autometa/config/default.config') None ο
Update fpath in section for option with value.
- Parameters
fpath (str) β </path/to/file.config>
section (str) β section header to update within fpath.
option (str) β option to update within section.
value (str) β value to update option.
- Returns
- Return type
NoneType