syndirella.check_inputs ======================= .. py:module:: syndirella.check_inputs .. autoapi-nested-parse:: syndirella.check_inputs.py This module contains the functions used to check the inputs for running the pipeline. Attributes ---------- .. autoapisummary:: syndirella.check_inputs.logger Functions --------- .. autoapisummary:: syndirella.check_inputs.check_csv syndirella.check_inputs.metadata_dict syndirella.check_inputs.check_template_paths syndirella.check_inputs.fill_in_product syndirella.check_inputs.check_route syndirella.check_inputs.check_manual syndirella.check_inputs.check_hit_names syndirella.check_inputs.check_apo_template syndirella.check_inputs.format_additional_info syndirella.check_inputs.get_exact_hit_names syndirella.check_inputs.get_template_path syndirella.check_inputs.check_additional_columns syndirella.check_inputs.format_manual_route syndirella.check_inputs.check_pipeline_inputs Module Contents --------------- .. py:data:: logger .. py:function:: check_csv(csv_path: str) -> None Make sure that the csv path exists, can be read, and contains the required columns. .. py:function:: metadata_dict(metadata_path: str, long_code_column: str = 'Long code') -> Dict Get the metadata dictionary from the metadata file, checking that it contains the required columns. .. py:function:: check_template_paths(template_dir: str, csv_path: str, metadata_path: str) -> Set[str] Get the exact template paths, checking that they exist in the template directory. .. py:function:: fill_in_product(row: pandas.Series, step: int) -> None Fill in the scaffold for the given step. .. py:function:: check_route(i: int, row: pandas.Series) -> None Checks that the route is in the correct format and fills in missing products if needed. .. py:function:: check_manual(csv_path: str) -> None Check that the manual dataframe is in the correct format, otherwise raise errors. .. py:function:: check_hit_names(csv_path: str, hits_path: str, metadata_path: str, long_code_column: str) -> None Check that the hit names are found within SDF. .. py:function:: check_apo_template(template_path: str) -> None Check that the template is actually apo (containing no LIG). .. py:function:: format_additional_info(row: pandas.Series, additional_columns: List[str]) -> Dict[str, Any] This function is used to format the additional info from the dataframe into a dictionary. .. py:function:: get_exact_hit_names(row: pandas.Series, metadata_path: str, hits_path: str) -> List[str] Get the exact hit name to use for placement. .. py:function:: get_template_path(template_dir: str, template: str, metadata_path: str) -> str Get the exact template path to use for placement. .. py:function:: check_additional_columns(csv_path: str, additional_columns: List[str]) -> None Check that the additional columns are in the csv. .. py:function:: format_manual_route(row: pandas.Series) -> Tuple[List[Tuple[Any, Any]], List[Any], int] Format route to output reactants, reaction names, and products. .. py:function:: check_pipeline_inputs(*, csv_path: str, template_dir: str, hits_path: str, metadata_path: str, additional_columns: List[str], manual_routes: bool, long_code_column: str) -> None Check the inputs for the pipeline.