Skip to main content

MARADONER

MARADONER: Motif Activity Response Analysis Done Right

MARADONER is a tool for analyzing motif activities using promoter expression data. It provides a streamlined workflow to estimate parameters, predict deviations, and export results in a tabular form.

Installation

MARADONER needs Python 3.11 or newer:

pip install maradoner

Input files

All tables are plain text (.tsv or .csv, optionally gzipped) with named rows and named columns: the first line holds the column names and the first column holds the row names.

  • Promoter expression (p promoters x s samples), in log scale. Rows are promoters, columns are samples.
  • Motif loadings (p promoters x m motifs): how strongly each motif is associated with each promoter. Rows must use the same promoter names as the expression table; promoters that are missing from either table are dropped. Several loading matrices can be supplied at once (see --loading-postfix).
  • (Optional) Sample groups: which samples are replicates of the same condition. Either a JSON dictionary
    {"control": ["sample_1", "sample_2"], "treated": ["sample_3", "sample_4"]}
    
    or a text file with one group per line: the group name followed by its sample names. Without it every sample is a group of its own.
  • (Optional) Covariates (--covariates): a table with sample names in the first column and one column per covariate (e.g. sex, age). Numeric covariates are z-scored, categorical ones are one-hot encoded.

Basic Workflow

A typical MARADONER analysis session involves running commands sequentially for a given project:

  1. create: Initialize the project. This step parses your input files (promoter expression, motif loadings, optional motif expression, and sample groupings), performs initial filtering, and sets up the project's internal data structures.

    # Example: Initialize a project named 'my_project'
    maradoner create my_project path/to/expression.tsv path/to/loadings.tsv --sample-groups path/to/groups.json [other options...]
    
    • Input files are typically tabular (.tsv, .csv), potentially compressed.
    • You only need to provide input data files at this stage.
    • Read the warnings: create reports promoters, samples and motifs that it had to drop.
  2. fit: Estimate the model's variance parameters and mean motif activities using the data prepared by create.

    maradoner fit my_project [options...]
    
  3. predict: Estimate the deviations of motif activities from their means for each sample or group, based on the parameters estimated by fit.

    maradoner predict my_project [options...]
    
  4. export: Save the final results, including estimated motif activities (mean + deviations), parameter estimates, goodness-of-fit statistics, and potentially statistical test results (like ANOVA) to a specified output folder.

    maradoner export my_project path/to/output_folder [options...]
    

The commands depend on each other: fit needs create, predict needs fit, and the commands that report results (export, gof, anova, contrast, grn) need predict. Re-running an earlier step invalidates the later ones: after a new fit run predict again (results of the outdated later steps are removed automatically).

What export writes

Path Content
README.md Generated description of every file in the folder and of its columns. contrast, anova, grn, select-motifs, bayes_linreg and mara export add their files to it when they write into the same folder.
activities/activity_group_raw.tsv, activity_group_raw_std.tsv Predicted deviations of motif activities per group (motifs x groups) and their posterior standard deviations.
activities/activity.tsv The two tables above divided by each other, i.e. standardized activities.
activities/z_score.tsv Absolute z-scores per group and an overall score per motif.
activities/activity_raw.tsv Predicted deviations per sample.
params/motif_means.tsv Mean activity of each motif and its standard error (params/covariates/ holds the same for every covariate).
params/motif_variances.tsv, params/group_variances.tsv Variance parameters with standard errors: tau per motif; error variance sigma and activity variance nu per group. filtered_motif_variances.tsv lists the motifs that predict left out because their variance is negligible.
params/promoter_means.tsv, params/sample_means.tsv Promoter-wise and sample-wise intercepts.
params/correlations/ Correlations between the parameter estimates.
tests/asymptotics_based/sign.tsv Is the mean activity of a motif positive or negative? z statistic, one-sided p-values (pvalue_pos, pvalue_neg) and their FDR.
tests/asymptotics_based/anova.tsv Does the activity of a motif vary across samples at all (tau > 0)? stat, p-value, FDR are a likelihood-ratio test; the wald_* columns hold the older, much less powerful Wald test.
tests/prediction_based/anova.tsv Does the activity of a motif differ between groups? Based on the predicted deviations.
fov/ Goodness-of-fit statistics, if gof was run.

Motifs appear in the activity and test tables only if predict kept them (see predict --filter-motifs).

Other Useful Commands

  • gof: After predict, calculate Goodness-of-Fit statistics (like Fraction of Variance Explained or Correlation) to evaluate how well the model components explain the observed expression data.
    maradoner gof my_project [options...]
    
    To evaluate the model on promoters it has not seen, hold some of them out at the fit stage and estimate their promoter-specific means before gof:
    maradoner fit my_project --test-chromosomes 3 --test-chromosomes X   # or --test-promoters-filename names.txt
    maradoner predict my_project
    maradoner estimate-promoter-mean my_project
    maradoner gof my_project
    
    The held-out promoters take no part in fit. Note, however, that the low-expression filter of create has already seen all promoters; use create --filter-lowexp-w 1 if the testing set must not influence anything at all.
  • anova: Test whether motif activities differ between the listed groups.
    maradoner anova my_project anova.tsv control treated_6h treated_24h
    
  • contrast: Test a linear combination of group activities, written as an algebraic expression of group names.
    maradoner contrast my_project "treated - control" path/to/output_folder
    maradoner contrast my_project "(a + b + c) / 3 - d" path/to/output_folder
    
  • grn: Test each promoter against each motif in each group ("gene regulatory network"). The output is large: one promoters x motifs table per group.
    maradoner grn my_project path/to/output_folder
    
  • select-motifs: If you provided multiple loading matrices in create (e.g., from different databases) with unique postfixes, this command helps select the single "best" variant for each motif based on statistical criteria. The output is a list of motif names intended to be used with the --motif-filename option in a subsequent create run.
    maradoner select-motifs my_project best_motifs.txt
    # Then, potentially re-run create using the generated list:
    # maradoner create my_project_filtered ... --motif-filename best_motifs.txt
    
  • bayes_linreg: A different, single-sample model for data without replication across samples (fit needs at least two samples). It goes straight from a project to result files.
    maradoner bayes_linreg my_project path/to/output_folder
    
  • generate: Create a synthetic dataset with known properties for testing or demonstration purposes.
    maradoner generate path/to/synthetic_data_output [options...]
    
  • mara: The classical (IS)MARA model, for comparison purposes (maradoner mara --help).

Model extensions

  • create --covariates covariates.tsv: mean motif activities depend on sample covariates.
  • fit --error-lowrank k / fit --activity-lowrank k: low-rank corrections for correlated noise / correlated activities across samples.
  • fit --clustering KMeans|NMF --num-clusters k: replace motifs by clusters of motifs with similar loadings (useful when there are more motifs than the data can tell apart); all later commands then report clusters.
  • fit --no-motif-variance: one common variance for all motifs, closer to the classical (IS)MARA.
  • fit --promoter-variance (experimental): heuristic reweighting of promoters by their noise level.

Performance

MARADONER uses one thread for linear algebra by default: it mostly works with many small matrices, where the usual one-thread-per-core setting makes it considerably slower. Use maradoner --threads N <command> ... (or the MARADONER_THREADS environment variable) to change it; if OMP_NUM_THREADS and the like are already set in your environment they are respected.

On small and medium datasets a large part of the run time is spent compiling numerical code, the same code on every run. Set the environment variable MARADONER_JAX_CACHE to a folder (e.g. export MARADONER_JAX_CACHE=~/.cache/maradoner) to keep the compiled code between runs; repeated runs then start several times faster.

When something goes wrong

Problems with the input (a malformed table, sample names that do not match, a step that was skipped) are reported as a short Error: ... message that says what to fix. A long traceback, on the other hand, means an unexpected internal error: please report it via the issue tracker. Set the environment variable MARADONER_DEBUG=1 to get a traceback for every error.

Getting Help

Each command has various options for customization. To see the full list of commands and their detailed options, use the --help flag:

maradoner --help
maradoner create --help
maradoner fit --help
# and so on for each command

Cite

For the time being, you can cite our technical arXiv paper that explains MARADONER's inner clockworks in a great detail:

@misc{meshcheryakov2026,
      title={MARADONER: Motif Activity Response Analysis Done Right}, 
      author={Georgy Meshcheryakov and Andrey I. Buyan},
      year={2026},
      eprint={2602.03343},
      archivePrefix={arXiv},
      primaryClass={stat.CO},
      url={https://arxiv.org/abs/2602.03343}, 
}

Metadata

Release files for maradoner 0.31.1

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

Source distribution (sdist)

Source distribution for maradoner 0.31.1
File Size Uploaded
maradoner-0.31.1.tar.gz 163.4 kB Details

Built distribution (wheel)

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

Total release size: 334.0 kB

Release files / maradoner-0.31.1.tar.gz

Download URL maradoner-0.31.1.tar.gz
Size 163.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c784bc832a8c5d9627236fb3059317abe69dff496a332b3a5f223cc2a70f5a3c
BLAKE2b-256 checksum
How to use checksums
c4ddc5d9afd5812528c6ac01e4098341f63f95bef3e1e87d84332287e41ad946
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / maradoner-0.31.1-py3-none-any.whl

Download URL maradoner-0.31.1-py3-none-any.whl
Size 170.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
88a901bb9de291f517c174781adaa42f391c8727e2ec1ecb0dc60940e251db41
BLAKE2b-256 checksum
How to use checksums
4d08943469cec804941e72cd0b64070b1706d959174f0dbae56dc87f8de6b877
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

0.33.0

2 release files

0.32.0

2 release files

0.31.2

2 release files

This release

0.31.1 This release

2 release files

0.30.3

2 release files

0.30.1

1 release file

0.30.0

1 release file

0.29.3

1 release file

0.29.2

1 release file

0.29.1

1 release file

0.29.0

1 release file

0.28.0

1 release file

0.27.1

1 release file

0.27.0

1 release file

0.26.1

1 release file

0.26.0

1 release file

0.25.7

1 release file

0.25.6

1 release file

0.25.5

1 release file

0.25.4

1 release file

0.25.3

1 release file

0.25.2

1 release file

0.25.1

1 release file

0.25.0

1 release file

0.24.8

1 release file

0.24.7

1 release file

0.24.6

1 release file

0.24.5

1 release file

0.24.4

1 release file

0.24.3

1 release file

0.24.2

1 release file

0.24.1

1 release file

0.24.0

1 release file

0.23.0

1 release file

0.22.0

1 release file

0.21.0

1 release file

0.20.0

1 release file

0.19.0

1 release file

0.18.2

1 release file

0.18.1

1 release file

0.18.0

1 release file

0.17.0

1 release file

0.16.0

1 release file

0.15.0

1 release file

0.14.3

1 release file

0.14.2

1 release file

0.14.1

1 release file

0.14

1 release file

0.13

1 release file

0.12

1 release file

0.11

1 release file

0.10

1 release file

0.9

1 release file

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