syndirella.check_inputs

syndirella.check_inputs.py

This module contains the functions used to check the inputs for running the pipeline.

Attributes

logger

Functions

check_csv(→ None)

Make sure that the csv path exists, can be read, and contains the required columns.

metadata_dict(→ Dict)

Get the metadata dictionary from the metadata file, checking that it contains the required columns.

check_template_paths(→ Set[str])

Get the exact template paths, checking that they exist in the template directory.

fill_in_product(→ None)

Fill in the scaffold for the given step.

check_route(→ None)

Checks that the route is in the correct format and fills in missing products if needed.

check_manual(→ None)

Check that the manual dataframe is in the correct format, otherwise raise errors.

check_hit_names(→ None)

Check that the hit names are found within SDF.

check_apo_template(→ None)

Check that the template is actually apo (containing no LIG).

format_additional_info(→ Dict[str, Any])

This function is used to format the additional info from the dataframe into a dictionary.

get_exact_hit_names(→ List[str])

Get the exact hit name to use for placement.

get_template_path(→ str)

Get the exact template path to use for placement.

check_additional_columns(→ None)

Check that the additional columns are in the csv.

format_manual_route(→ Tuple[List[Tuple[Any, Any]], ...)

Format route to output reactants, reaction names, and products.

check_pipeline_inputs(→ None)

Check the inputs for the pipeline.

Module Contents

syndirella.check_inputs.logger[source]
syndirella.check_inputs.check_csv(csv_path: str) None[source]

Make sure that the csv path exists, can be read, and contains the required columns.

syndirella.check_inputs.metadata_dict(metadata_path: str, long_code_column: str = 'Long code') Dict[source]

Get the metadata dictionary from the metadata file, checking that it contains the required columns.

syndirella.check_inputs.check_template_paths(template_dir: str, csv_path: str, metadata_path: str) Set[str][source]

Get the exact template paths, checking that they exist in the template directory.

syndirella.check_inputs.fill_in_product(row: pandas.Series, step: int) None[source]

Fill in the scaffold for the given step.

syndirella.check_inputs.check_route(i: int, row: pandas.Series) None[source]

Checks that the route is in the correct format and fills in missing products if needed.

syndirella.check_inputs.check_manual(csv_path: str) None[source]

Check that the manual dataframe is in the correct format, otherwise raise errors.

syndirella.check_inputs.check_hit_names(csv_path: str, hits_path: str, metadata_path: str, long_code_column: str) None[source]

Check that the hit names are found within SDF.

syndirella.check_inputs.check_apo_template(template_path: str) None[source]

Check that the template is actually apo (containing no LIG).

syndirella.check_inputs.format_additional_info(row: pandas.Series, additional_columns: List[str]) Dict[str, Any][source]

This function is used to format the additional info from the dataframe into a dictionary.

syndirella.check_inputs.get_exact_hit_names(row: pandas.Series, metadata_path: str, hits_path: str) List[str][source]

Get the exact hit name to use for placement.

syndirella.check_inputs.get_template_path(template_dir: str, template: str, metadata_path: str) str[source]

Get the exact template path to use for placement.

syndirella.check_inputs.check_additional_columns(csv_path: str, additional_columns: List[str]) None[source]

Check that the additional columns are in the csv.

syndirella.check_inputs.format_manual_route(row: pandas.Series) Tuple[List[Tuple[Any, Any]], List[Any], int][source]

Format route to output reactants, reaction names, and products.

syndirella.check_inputs.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[source]

Check the inputs for the pipeline.