Skip to main content

DIENR

PyPI Tests Coverage PyPI Downloads

Deconvolution of Isoform Expression from Nascent RNAs.

A Python reimplementation of DENR (Zhao & Dukler, Bioinformatics 2021). Nascent RNA sequencing (PRO-seq, GRO-seq) measures where RNA polymerase is, not which isoform it's making. dienr explains the signal at each locus as a nonnegative mixture of pre-RNA isoform models and estimates each model's abundance.

By default it reproduces R DENR exactly, with its bugs fixed. What it adds around the method:

  • Bug fixes. DENR's shape profile reads minus-strand genes from the plus-strand file, inverts negative minus-strand values and crashes at its own defaults on count data; an unknown contig aborts a whole run. All are fixed (differences from DENR).
  • Explicit failures. Every fit has a status, and failed fits are NaN, never zero.
  • Identifiability as an output. Indistinguishable transcripts are collapsed into one model and mapped, never given duplicated estimates.
  • Reusable, versioned designs. Annotation geometry is built once and fitted against many samples.
  • Input checks. Swapped plus/minus BigWigs and mismatched contig names are caught before counting, and contigs can be renamed explicitly.
  • Speed. About 14.5× faster than R DENR on the benchmarks, with 8–9× less memory, and parallel fitting.

Quick start

uv tool install dienr
dienr build-design --gtf genes.gtf --output design/
dienr count        --design design/ --samples samples.csv --output counts/
dienr fit          --design design/ --counts counts/ --output results/
dienr validate     --results results/

The defaults are DENR's, and they are the recommended configuration.

Experimental options

dienr also implements extensions to the method. They're available, tested and documented, but none is recommended: tested against K562 long-read isoform data, none improved isoform calls enough to justify departing from DENR (plan §18.20–18.26).

option what it does evidence
fit --log-offset C changes the 0.001 in DENR's log(y + 0.001) C = 1 called dominant isoforms 3–4 points more often (one cell line)
fit --likelihood poisson / quasi_poisson count likelihoods; quasi-Poisson adds standard errors fits held-out signal better; calls dominant isoforms worse
build-design --runon-tail models read-through past each PAS fits signal better; makes isoform calls worse
build-design --shape-profile reweights models by polymerase density no gain in simulation; worse on real data
fit --penalty ridge / lasso / elastic net never validated

Getting started has the details.

Documentation

User guide (docs/):

  • Getting started: install, inputs, the four-step workflow, recommended settings.
  • Preparing input BigWigs: what the files must contain, chemistries, converting single-end PRO-seq, the strand check.
  • Concepts: pre-RNA models, loci, equivalence classes, masking, fit statuses, what an abundance means.
  • Choosing a likelihood: legacy vs Poisson vs quasi-Poisson, and penalties.
  • Run-on tails: modelling read-through past the PAS.
  • Shape profiles: measuring polymerase density along genes, the defects in the R implementation, and why reweighting with a profile isn't recommended.
  • Outputs: every output table and file.
  • Differences from R DENR.

To contribute, see CONTRIBUTING.md. For developers (notes/): the implementation plan is the binding design spec and the record of every validation experiment. See notes/README.md.

Status

The DENR pipeline is complete, with R parity in its default mode; the experimental options above are implemented and tested. Input is BigWig only, by design (input data). Not yet written: normalization factors, multi-sample group penalties. Validation so far is the DENR authors' simulator plus one real dataset (K562 PRO-seq).

Citing

If you use dienr, cite it (CITATION.cff; GitHub's "Cite this repository" reads it) and the DENR paper, whose method it reimplements:

Zhao Y, Dukler N, Barshad G, Toneyan S, Danko CG, Siepel A. Deconvolution of expression for nascent RNA-sequencing data (DENR) highlights pre-RNA isoform diversity in human cells. Bioinformatics 37(24):4727–4736 (2021). doi:10.1093/bioinformatics/btab582

License

MIT © 2026 Adam Youlin He. Implemented from the DENR paper and the R package's observed behaviour, not its source (its license metadata conflicts; see differences).

Metadata

Release files for dienr 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dienr 0.1.0
File Size Uploaded Provenance Actions
dienr-0.1.0.tar.gz 433.2 kB With provenance Details for dienr-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dienr 0.1.0
File Interpreter ABI Platform Actions
dienr-0.1.0-py3-none-any.whl Python 3 none any Details for dienr-0.1.0-py3-none-any.whl

Total release size: 535.0 kB

Release files / dienr-0.1.0.tar.gz

Download URL dienr-0.1.0.tar.gz
Size 433.2 kB
Tags Source
SHA-256 checksum
How to use checksums
30eacba87369e20bd4948955e5e4f8c0eef1ec46a5c0ec02a35fb709dbfa65c0
BLAKE2b-256 checksum
How to use checksums
10712bd57227cb695d105e02e2b4e6a669bfa0fb3ef75201e692e6e3f8d92c46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / dienr-0.1.0-py3-none-any.whl

Download URL dienr-0.1.0-py3-none-any.whl
Size 101.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
625515e10c6efbe969648f94400ea24fd0d1253433a16c71100d99ded38300e2
BLAKE2b-256 checksum
How to use checksums
7e5216160a1e429825836cf72a536ed41704335611e497a6403e2a8b42e9eaf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for dienr 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for dienr-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page