cytosnake.guards package#
Submodules#
cytosnake.guards.ext_guards module#
module: ext_guards.py
Checks if the correct extensions are provided
- cytosnake.guards.ext_guards.has_parquet_ext(file_name: str | Path) TypeGuard[str]#
Checks if the provided file path contains parquet file extension . :param file_name: path to file :type file_name: str | pathlib.Path
- Returns:
return True if it is a parquet file, else False
- Return type:
TypeGuard[str]
- cytosnake.guards.ext_guards.has_sqlite_ext(file_name: str | Path) TypeGuard[str]#
Checks if the provided file path contains parquet file extension .
- Parameters:
file_name (str | pathlib.Path) – path to file
- Returns:
return True if it is a parquet file, else False
- Return type:
TypeGuard[str]
cytosnake.guards.input_guards module#
module: input_guards.py
This module will handle the CytoSnake’s CLI logic mostly interacting with user defined parameters from CytoSnake’s CLI.
There the logic establishes some rules of what inputs are required or what functionality is or not allowed.
- cytosnake.guards.input_guards.check_init_parameter_inputs(user_params: NameSpace) bool#
Main wrapper to check init mode parameter logic.
- Parameters:
user_params (NameSpace) – Argparse.NameSpace object that contains all user provided parameters.
- Returns:
True if all logic checks passed
- Return type:
bool
- Raises:
BarcodeMissingError – Raised if a multiple platemaps are found but no barcode file was provided
- cytosnake.guards.input_guards.is_barcode_required(user_params: NameSpace) bool#
- user_params: NameSpace
Argparse.NameSpace object that contains all user provided parameters
- Returns:
With the given parameter inputs, True if barcodes are required else False
- Return type:
bool
cytosnake.guards.path_guards module#
Module: path_guards.py
Functions for checking paths.
- This includes:
existing paths
valid path strings
- cytosnake.guards.path_guards.is_valid_path(val: object) TypeGuard[Path]#
checks if provided value is a valid path
- Returns:
True if the path exists, else false
- Return type:
bool