Typical Workflows

The two typical workflows in NOTICS are a bulk upload from a CSV to an empty Graph Data Base and getting a python object with a query result. We hope that these diagrams will help to understand what is happening behind the curtains.

Graph Database Creation Workflow

This diagram outlines the process when a user wants to create a Graph Database from scratch using a CSV file containing reaction strings. The workflow begins with the instantiation of a Preprocessor and a GraphSchema objects, followed by the ingestion of the initial CSV file. The data is then transformed into a Neo4j-compatible CSV format, where each row is expanded into a set of nodes and relationships. Finally, a Neo4jRepository object is instantiated and a query is executed to upload the formatted data into the Graph Database.

        ---
config:
  layout: fixed
---
flowchart TD
 subgraph data_transformation["data_transformation"]
        B["Preprocessor"]
        BB["CSVPreprocessor"]
        C["GraphExpander"]
  end
 subgraph repository["repository"]
        F["Neo4jRepository"]
        G["Neo4jQuery"]
        H["neo4j_functions"]
  end
 subgraph data_architecture["data_architecture"]
        L["GraphSchema"]
  end
    A["Start: CSV File"] --> B
    B --> BB & E["Neo4j-ready CSV"]
    BB --> C & B
    C --> BB
    E --> F
    F --> G & J["Submit to Graph DB"]
    G --> F & H
    H --> G
    J --> K["End: Data in Graph DB"]
    AA["Start: Input for GraphSchema"] --> L
    L --> B
    M["User Input: CSV Path for Neo4jRepository"] --> E

    

Graph Database to PythonObject Workflow

The second diagram depicts the sequence of events when a user queries the graph database and requests a Python object as the output. This workflow illustrates how the user’s query is processed, the interaction between NOCTIS and the Graph Database through Neo4jRepository object, the transformation of the query results into a Python object using the classes of data transformation module, and the return of the object to the user.

        ---
config:
  layout: fixed
---
flowchart TD
 subgraph repository["repository"]
        B["Neo4jRepository"]
        D["Neo4jQuery"]
  end
 subgraph datacontainer["datacontainer"]
        J["DataContainer"]
  end
 subgraph data_architecture["data_architecture"]
        datacontainer
  end
 subgraph postprocessing["postprocessing"]
        K["ChemDataGeneratorFactory"]
        L["Concrete ChemDataGenerator"]
  end
 subgraph neo4j["neo4j"]
        H["Neo4jFormatter"]
  end
 subgraph data_transformation["data_transformation"]
        postprocessing
        neo4j
  end
    A["Start: User Request"] --> B
    B --> D
    D --> F["Execute Cypher Query in Neo4j"]
    F --> G["Raw Neo4j Result"]
    G --> H
    H --> J
    JJ["User Input: Selected Transformation"] --> J
-->K
    K --> L
    L --> M["Python Object"]
    M --> Z["End: Result Returned to User"]