csuite
Comprehensive documentation for all API exposed by csuite
main
- csuite.main.create_main_parser()[source]
Create the main CLI parser.
Defines the root csuite CLI, and defines the subparsers for each workflow.
- Returns:
Parser object with every subcommand registered and defined.
- Return type:
parser (argparse.ArgumentParser)
Note
Subcommand parsers are defined in the cli_parsers module.
workflows
- csuite.workflows.run_derep_workflow(parsed_args: dict) None[source]
Run the dereplication workflow.
Distributes the ready-to-use arguments over the appropriate tools and runs them in the right order.
- Parameters:
parsed_args (dict) – dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Returns:
None
- csuite.workflows.run_local_extract_workflow(parsed_args: dict) None[source]
Run the local cluster extraction workflow.
Distributes the ready-to-use arguments over the appropriate tools and runs them in the right order.
- Parameters:
parsed_args (dict) – dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Returns:
None
- csuite.workflows.run_local_seq_derep_workflow(parsed_args: dict) None[source]
Run the local sequence search with dereplication workflow.
Distributes the ready-to-use arguments over the appropriate tools and runs them in the right order.
- Parameters:
parsed_args (dict) – dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Returns:
None
- csuite.workflows.run_local_seq_workflow(parsed_args: dict) None[source]
Run the local sequence search workflow.
Distributes the ready-to-use arguments over the appropriate tools and runs them in the right order.
- Parameters:
parsed_args (dict) – dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Returns:
None
- csuite.workflows.run_local_struc_derep_workflow(parsed_args: dict) None[source]
Run the local structure search with dereplication workflow.
Distributes the ready-to-use arguments over the appropriate tools and runs them in the right order.
- Parameters:
parsed_args (dict) – dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Returns:
None
- csuite.workflows.run_local_struc_workflow(parsed_args: dict) None[source]
Run the local structure search workflow.
Distributes the ready-to-use arguments over the appropriate tools and runs them in the right order.
- Parameters:
parsed_args (dict) – dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Returns:
None
- csuite.workflows.run_remote_extract_workflow(parsed_args: dict) None[source]
Run the remote cluster extraction workflow.
Distributes the ready-to-use arguments over the appropriate tools and runs them in the right order.
- Parameters:
parsed_args (dict) – dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Returns:
None
- csuite.workflows.run_remote_seq_derep_workflow(parsed_args: dict) None[source]
Run the remote sequence search with dereplication workflow.
Distributes the ready-to-use arguments over the appropriate tools and runs them in the right order.
- Parameters:
parsed_args (dict) – dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Returns:
None
- csuite.workflows.run_remote_seq_workflow(parsed_args: dict) None[source]
Run the remote sequence search workflow.
Distributes the ready-to-use arguments over the appropriate tools and runs them in the right order.
- Parameters:
parsed_args (dict) – dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Returns:
None
- csuite.workflows.run_remote_struc_derep_workflow(parsed_args: dict) None[source]
Run the remote structure search with dereplication workflow.
Distributes the ready-to-use arguments over the appropriate tools and runs them in the right order.
- Parameters:
parsed_args (dict) – dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Returns:
None
- csuite.workflows.run_remote_struc_workflow(parsed_args: dict) None[source]
Run the remote structure search workflow.
Distributes the ready-to-use arguments over the appropriate tools and runs them in the right order.
- Parameters:
parsed_args (dict) – dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Returns:
None
- csuite.workflows.run_report_workflow(parsed_args: dict) None[source]
Run the report generation workflow.
Distributes the ready-to-use arguments over the appropriate tools and runs them in the right order.
- Parameters:
parsed_args (dict) – dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Returns:
None
- csuite.workflows.run_workflow(workflow_name: str, parsed_args: dict) None[source]
Run the workflow using the prepared arguments.
Main workflow runner function that calls the runner selected from the workflow keyword.
- Parameters:
workflow_name (str) – Name of the selected workflow.
parsed_args (dict) – dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Returns:
None
- csuite.workflows.setup_derep(categorised_args: dict[Namespace]) dict[source]
Set up a dereplication workflow.
Sets shared arguments, and connects input and output file paths passed on by the different tools of the workflow.
- Parameters:
categorised_args (dict[argparse.Namespace]) – dictionary of unparsed argument namespaces per tool involved in the workflow. Typical output of categorise_args() of the argument_parsers module.
- Returns:
dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Return type:
parsed_args (dict)
- Mutates:
categorised_args: Argument values are updated to connect the several inputs and outputs between tools.
- csuite.workflows.setup_local_extract(categorised_args: dict[Namespace]) dict[source]
Set up a local cluster extraction workflow.
Sets shared arguments, and connects input and output file paths passed on by the different tools of the workflow.
- Parameters:
categorised_args (dict[argparse.Namespace]) – dictionary of unparsed argument namespaces per tool involved in the workflow. Typical output of categorise_args() of the argument_parsers module.
- Returns:
dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Return type:
parsed_args (dict)
- Mutates:
categorised_args: Argument values are updated to connect the several inputs and outputs between tools.
- csuite.workflows.setup_local_seq(categorised_args: dict[Namespace]) dict[source]
Set up a local sequence search workflow.
Sets shared arguments, and connects input and output file paths passed on by the different tools of the workflow.
- Parameters:
categorised_args (dict[argparse.Namespace]) – dictionary of unparsed argument namespaces per tool involved in the workflow. Typical output of categorise_args() of the argument_parsers module.
- Returns:
dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Return type:
parsed_args (dict)
- Mutates:
categorised_args: Argument values are updated to connect the several inputs and outputs between tools.
- csuite.workflows.setup_local_seq_derep(categorised_args: dict[Namespace]) dict[source]
Set up a local sequence search with dereplication workflow.
Sets shared arguments, and connects input and output file paths passed on by the different tools of the workflow.
- Parameters:
categorised_args (dict[argparse.Namespace]) – dictionary of unparsed argument namespaces per tool involved in the workflow. Typical output of categorise_args() of the argument_parsers module.
- Returns:
dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Return type:
parsed_args (dict)
- Mutates:
categorised_args: Argument values are updated to connect the several inputs and outputs between tools.
- csuite.workflows.setup_local_struc(categorised_args: dict[Namespace]) dict[source]
Set up a local structure search workflow.
Sets shared arguments, and connects input and output file paths passed on by the different tools of the workflow.
- Parameters:
categorised_args (dict[argparse.Namespace]) – dictionary of unparsed argument namespaces per tool involved in the workflow. Typical output of categorise_args() of the argument_parsers module.
- Returns:
dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Return type:
parsed_args (dict)
- Mutates:
categorised_args: Argument values are updated to connect the several inputs and outputs between tools.
- csuite.workflows.setup_local_struc_derep(categorised_args: dict[Namespace]) dict[source]
Set up a local structure search with dereplication workflow.
Sets shared arguments, and connects input and output file paths passed on by the different tools of the workflow.
- Parameters:
categorised_args (dict[argparse.Namespace]) – dictionary of unparsed argument namespaces per tool involved in the workflow. Typical output of categorise_args() of the argument_parsers module.
- Returns:
dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Return type:
parsed_args (dict)
- Mutates:
categorised_args: Argument values are updated to connect the several inputs and outputs between tools.
- csuite.workflows.setup_remote_extract(categorised_args: dict[Namespace]) dict[source]
Set up a remote cluster extraction workflow.
Sets shared arguments, and connects input and output file paths passed on by the different tools of the workflow.
- Parameters:
categorised_args (dict[argparse.Namespace]) – dictionary of unparsed argument namespaces per tool involved in the workflow. Typical output of categorise_args() of the argument_parsers module.
- Returns:
dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Return type:
parsed_args (dict)
- Mutates:
categorised_args: Argument values are updated to connect the several inputs and outputs between tools.
- csuite.workflows.setup_remote_seq(categorised_args: dict[Namespace]) dict[source]
Set up a remote sequence search workflow.
Sets shared arguments, and connects input and output file paths passed on by the different tools of the workflow.
- Parameters:
categorised_args (dict[argparse.Namespace]) – dictionary of unparsed argument namespaces per tool involved in the workflow. Typical output of categorise_args() of the argument_parsers module.
- Returns:
dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Return type:
parsed_args (dict)
- Mutates:
categorised_args: Argument values are updated to connect the several inputs and outputs between tools.
- csuite.workflows.setup_remote_seq_derep(categorised_args: dict[Namespace]) dict[source]
Set up a remote sequence search with dereplication workflow.
Sets shared arguments, and connects input and output file paths passed on by the different tools of the workflow.
- Parameters:
categorised_args (dict[argparse.Namespace]) – dictionary of unparsed argument namespaces per tool involved in the workflow. Typical output of categorise_args() of the argument_parsers module.
- Returns:
dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Return type:
parsed_args (dict)
- Mutates:
categorised_args: Argument values are updated to connect the several inputs and outputs between tools.
- csuite.workflows.setup_remote_struc(categorised_args: dict[Namespace]) dict[source]
Set up a remote structure search workflow.
Sets shared arguments, and connects input and output file paths passed on by the different tools of the workflow.
- Parameters:
categorised_args (dict[argparse.Namespace]) – dictionary of unparsed argument namespaces per tool involved in the workflow. Typical output of categorise_args() of the argument_parsers module.
- Returns:
dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Return type:
parsed_args (dict)
- Mutates:
categorised_args: Argument values are updated to connect the several inputs and outputs between tools.
- csuite.workflows.setup_remote_struc_derep(categorised_args: dict[Namespace]) dict[source]
Set up a remote structure search with dereplication workflow.
Sets shared arguments, and connects input and output file paths passed on by the different tools of the workflow.
- Parameters:
categorised_args (dict[argparse.Namespace]) – dictionary of unparsed argument namespaces per tool involved in the workflow. Typical output of categorise_args() of the argument_parsers module.
- Returns:
dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Return type:
parsed_args (dict)
- Mutates:
categorised_args: Argument values are updated to connect the several inputs and outputs between tools.
- csuite.workflows.setup_report(categorised_args: dict[Namespace]) dict[source]
Set up a report generation workflow.
Sets shared arguments, and connects input and output file paths passed on by the different tools of the workflow.
- Parameters:
categorised_args (dict[argparse.Namespace]) – dictionary of unparsed argument namespaces per tool involved in the workflow. Typical output of categorise_args() of the argument_parsers module.
- Returns:
dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Return type:
parsed_args (dict)
- Mutates:
categorised_args: Argument values are updated to connect the several inputs and outputs between tools.
- csuite.workflows.setup_workflow(workflow_name: str, categorised_args: dict[Namespace]) dict[source]
Setup the selected workflow.
Main workflow setup function that selects the right workflow setup function from the workflow keyword, and runs it to get parsed and validated argument values ready to pass on the workflow runner.
- Parameters:
workflow_name (str) – name of the selected workflow
categorised_args (dict[argparse.Namespace]) – dictionary of unparsed argument namespaces per tool involved in the workflow. Typical output of categorise_args() of the argument_parsers module.
- Returns:
dictionary of dictionaries of argument name-value pairs, grouped by tool involved in a workflow.
- Return type:
parsed_args (dict)
- Mutates:
categorised_args: Argument values are updated to connect the several inputs and outputs between tools.
cli_parsers
- csuite.cli_parsers.register_derep_subparser(subparsers)[source]
Register the subparser for the dereplication workflow.
- Parameters:
subparsers (argparse.add_subparsers) – Argparse action object that will register the new subparser upon calling.
- Returns:
None
Note
Argument names are prefixed with the codenames of the tools that require them, using $ as delimiter.
- csuite.cli_parsers.register_local_extract_subparser(subparsers)[source]
Register the subparser for the local cluster extraction workflow.
- Parameters:
subparsers (argparse.add_subparsers) – Argparse action object that will register the new subparser upon calling.
- Returns:
None
Note
Argument names are prefixed with the codenames of the tools that require them, using $ as delimiter.
- csuite.cli_parsers.register_local_seq_derep_subparser(subparsers)[source]
Register the subparser for the local sequence search with dereplication workflow.
- Parameters:
subparsers (argparse.add_subparsers) – Argparse action object that will register the new subparser upon calling.
- Returns:
None
Note
Argument names are prefixed with the codenames of the tools that require them, using $ as delimiter.
- csuite.cli_parsers.register_local_seq_subparser(subparsers)[source]
Register the subparser for the local sequence search workflow.
- Parameters:
subparsers (argparse.add_subparsers) – Argparse action object that will register the new subparser upon calling.
- Returns:
None
Note
Argument names are prefixed with the codenames of the tools that require them, using $ as delimiter.
- csuite.cli_parsers.register_local_struc_derep_subparser(subparsers)[source]
Register the subparser for the local structure search with dereplication workflow.
- Parameters:
subparsers (argparse.add_subparsers) – Argparse action object that will register the new subparser upon calling.
- Returns:
None
Note
Argument names are prefixed with the codenames of the tools that require them, using $ as delimiter.
- csuite.cli_parsers.register_local_struc_subparser(subparsers)[source]
Register the subparser for the local structure search workflow.
- Parameters:
subparsers (argparse.add_subparsers) – Argparse action object that will register the new subparser upon calling.
- Returns:
None
Note
Argument names are prefixed with the codenames of the tools that require them, using $ as delimiter.
- csuite.cli_parsers.register_remote_extract_subparser(subparsers)[source]
Register the subparser for the remote cluster extraction workflow.
- Parameters:
subparsers (argparse.add_subparsers) – Argparse action object that will register the new subparser upon calling.
- Returns:
None
Note
Argument names are prefixed with the codenames of the tools that require them, using $ as delimiter.
- csuite.cli_parsers.register_remote_seq_derep_subparser(subparsers)[source]
Register the subparser for the remote sequence search with dereplication workflow.
- Parameters:
subparsers (argparse.add_subparsers) – Argparse action object that will register the new subparser upon calling.
- Returns:
None
Note
Argument names are prefixed with the codenames of the tools that require them, using $ as delimiter.
- csuite.cli_parsers.register_remote_seq_subparser(subparsers)[source]
Register the subparser for the remote sequence search workflow.
- Parameters:
subparsers (argparse.add_subparsers) – Argparse action object that will register the new subparser upon calling.
- Returns:
None
Note
Argument names are prefixed with the codenames of the tools that require them, using $ as delimiter.
- csuite.cli_parsers.register_remote_struc_derep_subparser(subparsers)[source]
Register the subparser for the remote structure search with dereplication workflow.
- Parameters:
subparsers (argparse.add_subparsers) – Argparse action object that will register the new subparser upon calling.
- Returns:
None
Note
Argument names are prefixed with the codenames of the tools that require them, using $ as delimiter.
- csuite.cli_parsers.register_remote_struc_subparser(subparsers)[source]
Register the subparser for the remote structure search workflow.
- Parameters:
subparsers (argparse.add_subparsers) – Argparse action object that will register the new subparser upon calling.
- Returns:
None
Note
Argument names are prefixed with the codenames of the tools that require them, using $ as delimiter.
- csuite.cli_parsers.register_report_subparser(subparsers)[source]
Register the subparser for the report generation workflow.
- Parameters:
subparsers (argparse.add_subparsers) – Argparse action object that will register the new subparser upon calling.
- Returns:
None
Note
Argument names are prefixed with the codenames of the tools that require them, using $ as delimiter.
argument_parsers
- csuite.argument_parsers.categorise_args(args: Namespace) dict[slice(<class 'str'>, <class 'argparse.Namespace'>, None)][source]
Categorise the argument namespace by workflow.
The arguments collected through the CLI are grouped by the tool that requires them, as indicated through the CLI argument labels. Missing argument values are imputed from the default tool configurations.
The argument labels are prefixed by the codename of the tool that requires them. For example, an argument par1 required by tools tool1 and tool2 will be encoded as tool1_tool2$par1.
- Parameters:
args (argparse.Namespace) – Unparsed CLI argument namespace
- Returns:
- dictionary of unparsed argument namespaces per tool
involved in the workflow, supplemented with default argument values.
- Return type:
categorised_args (dict[argparse.Namespace])
Note
Categorising arguments is facilitated by toolname prefixes in the argument names (see CLI subparsers.)
- csuite.argument_parsers.parse_and_validate_args(categorised_args: dict[slice(<class 'str'>, <class 'argparse.Namespace'>, None)]) dict[source]
Parse and validate the argument namespace for each tool.
Parses the arguments for each tool, and validates them using their associated validator functions.
- Parameters:
categorised_args (dict[argparse.Namespace]) – dictionary of unparsed argument namespaces per tool involved in the workflow.
- Returns:
- dictionary of dictionaries of argument name-value pairs,
grouped by tool involved in a workflow.
- Return type:
parsed_categorised_args (dict)
validators
- csuite.validators.validate_cblaster_makedb_args(args: Namespace) dict[source]
Validate the arguments of the cblaster makedb module.
- Parameters:
args (argparse.Namespace) – Argument namespace to be validated and parsed.
- Returns:
dictionary of argument name-value pairs
- Return type:
parsed_args (dict)
- csuite.validators.validate_cblaster_search_args(args: Namespace) dict[source]
Validate the arguments of the cblaster search module.
- Parameters:
args (argparse.Namespace) – Argument namespace to be validated and parsed.
- Returns:
dictionary of argument name-value pairs
- Return type:
parsed_args (dict)
- csuite.validators.validate_remote_extract_args(args: Namespace) dict[source]
Validate the arguments of the remote cluster extraction module.
- Parameters:
args (argparse.Namespace) – Argument namespace to be validated and parsed.
- Returns:
dictionary of argument name-value pairs
- Return type:
parsed_args (dict)
defaults
- class csuite.defaults.CAGEcleanerDefaultConfiguration[source]
Bases:
objectData class for the default argument values of CAGEcleaner.
- class csuite.defaults.cblasterMakedbDefaultConfiguration[source]
Bases:
objectData class for the default argument values of cblaster-makedb.
- class csuite.defaults.cblasterSearchDefaultConfiguration[source]
Bases:
objectData class for the default argument values of cblaster-search.
- class csuite.defaults.cfoldseekerCDSDefaultConfiguration[source]
Bases:
objectData class for the default argument values of cfoldseeker-cds.
- class csuite.defaults.cfoldseekerDefaultConfiguration[source]
Bases:
objectData class for the default argument values of cfoldseeker.
- class csuite.defaults.extractDefaultConfiguration[source]
Bases:
objectData class for the default argument values of cluster extraction workflows.