cytosnake.cli package#

Subpackages#

Submodules#

cytosnake.cli.args module#

Documentation

args.py Module

Responsible for centralizing and handling all user inputted parameters for cytosnake.

Contains different modes with their respected parameters

class cytosnake.cli.args.CliControlPanel(param_list: list[str], exec_path: None | str = None, mode: None | str = None, data_type: tuple[str] = ('cell_profiler', 'deep_profiler'), workflow: None | str = None, modes: tuple[str] = ('init', 'run', 'test', 'help'), _CliControlPanel__exec_name: str = 'cytosnake')#

Bases: object

Returns:

CliControlPanel Class contains all the parameters stored in the instances. The instance contains states of the provided parameters a user provides and provides easy logic flow for the CLI to work with.

Return type:

class CliControlPanel

Raises:
cli_help = False#
data_type: tuple[str] = ('cell_profiler', 'deep_profiler')#
exec_path: None | str = None#
mode: None | str = None#
mode_check = False#
mode_help = False#
modes: tuple[str] = ('init', 'run', 'test', 'help')#
param_list: list[str]#
parse_init_args() Namespace#

Parses user inputs for setting up files

Parameters:

params (list) – User defined input parameters

Returns:

  • argparse.Namespace – parsed cli parameters

  • Attributes

  • ———–

  • mode (str) – name of the mode used

  • data (list[str]) – list of plate data paths

  • metadata (str) – Path to meta data directory

  • barcode (str) – Path to barcode file

  • platemaps (str) – Path to platemap file

parse_workflow_args() Namespace#

Wrapper for parsing workflow parameters

Returns:

returns parsed parameters based on workflow

Return type:

argparse.Namespace

workflow: None | str = None#
class cytosnake.cli.args.WorkflowSearchPath(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)#

Bases: Action

This class provides more functionality

User provided workflow names are checked to see if they exist. If found, the parameter will return the absolute path to the workflow. If the name does not exist, raise an error indicating that the provided workflow name does not exist within cytosnake

cytosnake.cli.args.supported_workflows() tuple[str]#

Returns a tuple of supported workflows that run supports.

Returns:

tuple containing the names of the workflow names

Return type:

tuple[str]

cytosnake.cli.cli_checker module#

Documentation#

cli_checker.py Module

Argument checking module that checks and validates user input arguments from CytoSnake’s cli interface,

class cytosnake.cli.cli_checker.CliProperties(modes: tuple[str] = ('init', 'run', 'test', 'help'), workflows: tuple[str] = ('cp_process', 'dp_process'))#

Bases: object

Struct object that contains information of all arguments in CytoSnake’s cli interface

modes#

Supported modes in CytoSnake’s CLI

Type:

tuple[str]

workflows#

Available CytoSnake workflows

Type:

tuple[str]

modes: tuple[str] = ('init', 'run', 'test', 'help')#
workflows: tuple[str] = ('cp_process', 'dp_process')#
cytosnake.cli.cli_checker.cli_check(args_list: list[Union[str, int, bool]]) bool#

Checks arguments

Parameters:
  • mode (str) – CytoSnake mode

  • args_list (list[Union[str, int, bool]]) – list of user inputted arguments

Returns:

Passed the checking system, Raises errors if invalid arguments are passed.

Return type:

None

Raises:

cytosnake.cli.cli_docs module#

cytosnake.cli.cmd module#

Documentation

cmd.py Module

Generates CLI interface in order to interact with CytoSnake.

cytosnake.cli.cmd.run_cmd() None#

obtains all parameters and executes workflows

Parameters:

params (list) – list of user provided parametersCytoSnake

Return type:

None

cytosnake.cli.setup_init module#

setup_init.py

Contains functions for initializing different data structures for processing

cytosnake.cli.setup_init.init_cp_data(data_fp: list[str] | str, metadata_fp: str, barcode_fp: str)#

Sets up directory for CellProfiler datasets. Symlinks are created by taking the path of the inputs files and storing them into the “data” directory.

Parameters:
  • data_fp (Union[list[str], str]) – Plate data files

  • metadata_fp (str) – metadata directory associated with plate data

  • barcodes_fp (str) – barcode file associated with plate data

cytosnake.cli.setup_init.init_dp_data(data_fp: list[str] | str, metadata_fp: str)#

Sets up directory for CellProfiler datasets. Symlinks are created by taking the path of the inputs files and storing them into the “data” directory.

Parameters:
  • data_fp (Union[list[str], str]) – directory containing extracted DeepProfiler features

  • metadata_fp (str) – metadata directory associated with DeepProfiler data

Returns:

Generates a directory containing DeepProfiler Datasets

Return type:

None

Module contents#