Library API

Input validation

insilico.validate_input.validate_input(input_file: str) → Dict[source]

Read the input_file in YAML format, validate it against the corresponding schema and return a nested dictionary with the input.

Parameters:input_file (str) – path to the input
Returns:Input as dictionary
Raises:SchemaError – If the input is not valid

Tasks

insilico.filters.apply_filter(filters: Dict, molecules: pandas.core.frame.DataFrame, dependencies: Dict = None) → pandas.core.frame.DataFrame[source]

Apply a different set of filters to a molecular set.

Parameters:
  • filters (dict) – Set of predicates to filter the molecules
  • molecules – Pandas DataFrame containing the properties
  • dependencies (dict) – Current task parent
Returns:

Pandas Dataframe

insilico.properties.compute_property(molecular_properties: Dict, molecules: pandas.core.frame.DataFrame, dependencies: Dict = None) → pandas.core.frame.DataFrame[source]

Calculate a set of molecular_properties.

Parameters:
  • molecular_properties (dict) – Properties to compute
  • molecules – Pandas DataFrame containing the properties
  • dependencies (dict) – Current task parent
Returns:

Pandas Dataframe

insilico.properties.search_property(molecular_properties: List, molecules: pandas.core.frame.DataFrame, dependencies: Dict = None) → pandas.core.frame.DataFrame[source]

Search for a set of molecular_properties in the pubchem database.

Parameters:
  • molecular_properties (dict) – Properties to look at
  • molecules – Pandas DataFrame containing the properties
  • dependencies (dict) – Current task parent
Returns:

Pandas Dataframe

Graph of Dependecies

insilico.runner.build_graph(steps: Dict, state: pandas.core.frame.DataFrame) → Dict[source]

Create a Direct Acyclic Graph containing all the dependencies between the filters and the properties to compute.

Parameters:
  • steps (dict) – Task to perform
  • state – Current DataFrame used as state
Returns:

Dictionary representing the graph of dependencies

Raises:

DependencyError – if the dependencies are incongruent

insilico.runner.runner(dag: object) → pandas.core.frame.DataFrame[source]

Run the Direct Acyclic Graph containing all the filters and properties.

Returns:Pandas DataFrame containing the results
class insilico.runner.DependencyError[source]