Skip to content

Quick Start

This page covers the one-time setup — a short primer on the model, credentials, and install. For the full hands-on flow (data prep → DEGs → target validation → causal mechanism), follow the tutorial.

How TwinCell works

Most AI models in biology attempt the forward problem: given a perturbation, predict what happens to the cell. TwinCell solves the inverse problem — given an observed state change between two conditions, it reasons about the upstream protein regulators driving it. At its core the model performs target identification: scoring how causally each protein in a curated multi-omics interactome influences a transcriptomic state change.

You bring a target and one or two cell states, and TwinCell exposes that capability as two workflows:

Use case Input Output Status
Target validation A target + one or two cell states (with DEGs) Target efficacy — % of DEGs the target causally covers, plus the supporting causal paths / mechanism Available
Simulation A target + a control state The predicted DEGs from perturbing the target Coming soon

Setup

Get your credentials

Sign in to the TwinCell console to create an account and generate an API key (keys start with dl_).

Open the TwinCell console to get your API key

Then set it in your environment (notebooks fall back to a getpass prompt, so your key is never echoed):

export DEEPLIFE_API_KEY="dl_your_key_here"

Install

Python 3.12+ is required.

pip install deeplife

Network access

The TwinCell API is public. The SDK defaults to https://open-deeplife-api.deeplife.co, reachable over the Internet. Pass base_url= only if you are pointed at a different environment.

Check connectivity before anything else:

curl -i https://open-deeplife-api.deeplife.co/health

Interactive REST docs live at /docs, the machine-readable schema at /openapi.json.

Authentication

The API authenticates with the X-API-Key header — not Authorization: Bearer, which returns 401. The SDK sets this for you from api_key= / DEEPLIFE_API_KEY; you only need it when calling the REST routes directly:

curl -H "X-API-Key: $DEEPLIFE_API_KEY" \
  https://open-deeplife-api.deeplife.co/v1/usage/predictions/quota

Next steps

You're set up. The target-validation tutorial walks through the full flow end to end — load data, build pseudo-bulk profiles, compute the disease signature with PyDESeq2, then validate a target and inspect its causal mechanism.