scATrans Documentation#
What scATrans does#
Differential expression tells you which genes change. With nascent or unspliced layers, scATrans asks how those changes sit on a transcription-versus-stabilization axis.
Per-gene labels are exploratory.
Report mechanism at the program level when you can.
DE still defines the gene list.
No nascent layers? You can still run DE, enrichment, and plotting.
spliced + unspliced AnnData
│
▼
┌──────────────────┐
│ 1. DE │ selects the gene list (Wilcoxon / PyDESeq2 / …)
│ (defines it) │
└──────────────────┘
│ DE-selected genes only
▼
┌──────────────────┐
│ 2. Mechanism │ unspliced-excess residual →
│ (annotates it) │ transcription- vs stabilization-driven (soft, per gene)
└──────────────────┘
│ optional: gene_sets={program: [genes]}
▼
┌──────────────────┐
│ 3. Program table │ pooled, induction-matched / permutation-calibrated
│ (report here) │ → the level to report, not single genes
└──────────────────┘
Step 1 decides which genes; steps 2–3 decide how — never the reverse.
Where to go#
Goal |
Page |
|---|---|
Install and run a first analysis |
|
Pick an API or program test |
FAQ / Troubleshooting and the table below |
Full workflow, enrichment, plots |
|
What each column means for a paper |
|
Math and formal API |
Method: Nascent residual and mechanism annotation · API Reference |
A sensible path#
Install:
pip install "scatrans[pseudobulk]"(add[gsea]if you need GSEA).Follow Quickstart.
Work through a real notebook (Partition DE by mechanism — transcription vs stabilization or Partition by mechanism — GA vs Ctrl).
Enrich the DE gene list; keep mechanism claims at the program level when you can.
Default call#
No data yet? scat.datasets.load_toy() returns a synthetic AnnData with
spliced/unspliced layers already in place, so the block below runs as-is,
no download needed. Swap in your own AnnData once it works; if it lacks
nascent layers, see Preparing spliced/unspliced data.
import scatrans as scat
adata = scat.datasets.load_toy() # or your own AnnData
result = scat.partition_de_by_mechanism(
adata,
groupby="condition",
target_group="Disease",
reference_group="Control",
organism="mouse", # or "human"
de="builtin",
sample_col="sample", # set when you have biological replicates
# gene_sets=my_pathways,
# induction_matched=True,
)
print(result.regime) # capture quality
print(result.selected.head()) # DE genes + mechanism labels
print(result.summary()) # cutoffs and counts used for this run
Which tool for which job#
Goal |
Use |
|---|---|
DE + mechanism (usual case) |
|
DE / enrichment only (no velocity layers) |
|
Program vs genome-wide background |
|
Program with induction controlled |
|
Absolute program placement |
|
Optional nascent detection score |
|
Enrichment |
On |
Practical habits: define membership with DE, treat per-gene classes as soft,
prefer programs for claims, and pass sample_col when you have replicates.
See FAQ / Troubleshooting.
Note
scATrans is 0.10.x (Beta). Prefer import scatrans as scat and the public
names in scatrans.__all__, scat.pl, and scat.qc. Details:
API Stability.
pip, Bioconda, optional extras.
First run after install.
Worked notebooks (read online or re-run).
Workflow, enrichment, plots, advanced options.
API choice and common errors.
What each column is for.
Residual and calibration math.
Functions and parameters.
Source and issues.