Skip to content

LiliGasser/pytcpl

Repository files navigation

Welcome to the GitHub repository for the pytcpl package.

pytcpl is a streamlined Python package that incorporates the mc4, mc5 and mc6 levels of tcpl, providing concentration-response curve fitting and hitcalling based on tcplfit2. It utilizes the Invitrodb version 4.1 release as its backend database.

Pytcpl is at a development stage. If you use it, please contact Eliza Harris (eliza.harris@sdsc.ethz.ch) for assistance and discission. Note that to use pytcpl you will need to install the invitroDB.


(Optional) Use conda environment

conda create --name pytcpl
conda activate pytcpl
conda install pip

Install dependencies

pip install -r requirements.txt

Running pipeline:

Notes:

  • Download & Install invitroDBv4.1 on you local machine or server
  • Goto config_db.yaml to add/set your own MySQL database connection parameters
  • Goto config.yaml to customize pipeline behaviour
  • Goto DDL to set Data Definition Language (DDL) statements, used to create new MySQL database schema objects
  • Automate list generation aeid_list.in suited for balanced workloads for distributed compute instances
  • Goto aeid_list.in to set assay endpoint ids (aeids) to be processed by the pipeline (only has effect if aeid_list_manual: 1 in config_db.yaml)

Run pipeline (on single machine)

python src/pipeline/pipeline_main.py --instance_id 0 --instances_total 1
  • Replace python with python3 or py depending on your python version
  • Goto logs to see the redirected terminal logs and check in the error logs what went wrong for which assay endpoint id
  • Note: Parameters instance_id and instances_total are used for distributing workload onto multiple compute engine instances (e.g. gcloud VMs).
  • Example: Distribute workload onto 2 VM instances. Run:
    • python src/pipeline/pipeline_main.py --instance_id 0 --instances_total 2 on one machine and
    • python src/pipeline/pipeline_main.py --instance_id 1 --instances_total 2 on another machine

ICE annotation and cytotoxicity estimation

  • Generate per-chemical-results from all processed assay endpoints
    • python src/pipeline/pipeline_wrapup.py --instance_id 0 --instances_total 1

Note: Cytotoxicity estimates are made for all assays, but only make sense for non-cell-based target assays. Use hitcall or hitcall_c product (without and with cytotoxicity correction respectively) as needed.

Further automation steps

Curve surfer: Inspect fitted curves, hitcall labels and potency estimates

streamlit run src/app/curve_surfer_app.py --server.address="localhost"
  • If you run the command, the Curve Surfer web app should open as a new browser tab
  • Curve Surfer only works for assay endpoints already processed by pipeline
  • Or goto online version https://pytcpl.streamlit.app/
streamlit-curve_surfer-2023-08-09-22-08-26.webm

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published