Massively parallel reporter assay (MPRA) analysis pipeline and downstream analysis code for a study of Alzheimer's-disease-associated regulatory variants across multiple cell types and tissues (HEK293T, HMC3 microglia, THP1 monocyte/macrophage under stimulation, iPSC-derived neurons, brain, and gut).
This repository accompanies the preprint "Context-dependent regulatory variants in Alzheimer's disease" (Chen et al., bioRxiv 2025; citation below) — the citation will be updated to the peer-reviewed version upon journal acceptance.
src/mpra/ Core Python package: read mapping, count-table construction,
RNA/DNA barcode matching, annotation expansion, MPRAnalyze R helpers
scripts/ Pipeline scripts (step01-step09) from raw reads to allele-level count
tables, plus R scripts that run MPRAnalyze differential/MAD testing
notebooks/ Downstream analysis notebooks, organized by stage (see notebooks/README.md)
annotation_barcodes/ Per-cell-type barcode-to-element annotation tables
annotation_enhancer/ Enhancer annotation tables
indexing/ REF/ALT lookup tables, RNA/DNA barcode match tables, negative controls
machinelearning_prepost_processing/
Sequence-based model data prep, prediction, and DeepSHAP/interpretation
notebooks for MPRA-tested elements, plus per-condition training configs
See DATA.md for exactly what is and isn't tracked in this repository, and why
(raw fastq and large intermediate result tables are excluded — see that file for where they
will be deposited).
conda env create -f environment.yml
conda activate ad-mpra
pip install -e .This installs the Python dependencies (numpy, pandas, scipy, matplotlib, Biopython, Jupyter)
plus R with the Bioconductor MPRAnalyze and BiocParallel packages used by the differential
activity and MAD-score analyses.
- Read mapping & count tables (
scripts/step01_map_reads_make_table*.py,scripts/step01_map_neuron_reads_make_table_streaming.py) — map raw fastq reads to barcodes/enhancers and build raw count tables. Usessrc/mpra/map_reads.pyandsrc/mpra/make_count_table.py. - Tissue separation & barcode matching (
step02_separate_tissues_20231205.py,step03_make_rna_dna_matched_barcodes_with_neuron_v4.py) — split by tissue/cell type and match RNA counts to DNA counts per barcode (src/mpra/matching.py). - Count table conversion & pseudobarcodes (
step04_convert_count_table.py,step04_make_neuron_pseudobarcodes.py,step05_convert_many_matched_barcodes_to_noSV40.py). - Annotation & allele-level counts (
step06_make_annotations_split_counts.py,step07_make_alleleonly_counts.py,step08_convert_neuron_reshaped_to_altref.py,add_controls_to_altref.py) — usessrc/mpra/expand_annotation.pyandsrc/mpra/reshape_noSV40.py. - MAD-score QC (
step09_analyze_mad_pseudobarcode_R1R2_nguyen_fdr.py). - MPRAnalyze differential/MAD testing (R):
run_mpranalyze_mad_one.R/batch_run_mpranalyze_mad.sh(batched viamad_jobs.csv) andmpranalyze_comparative_analysis_alleleonly.R, built onsrc/mpra/mpranalyze_utils.Randsrc/mpra/mpranalyze_mad_utils.R. - Downstream analysis & figures: notebooks in
notebooks/, run in the stage order described innotebooks/README.md(annotation → MPRAnalyze → plotting → ML/motif benchmarking → risk allele/GWAS). The ML/motif benchmarking stage consumes sequence-model predictions and DeepSHAP attributions produced bymachinelearning_prepost_processing/.
Raw sequencing data and large intermediate result tables are not stored in this repository —
see DATA.md for what's included, what's excluded, and where excluded data will be
deposited (SRA/GEO for raw reads; Zenodo for large intermediate tables — accessions to be
added).
If you use this code, please cite:
Chen Z, Liu Y, Brown AR, Sestili H, Ramamurthy E, Xiong X, Prokopenko D, Phan BN, Gadey L, Hu P, Tsai LH, Bertram L, Hide W, Tanzi RE, Kellis M, Pfenning AR. Context-dependent regulatory variants in Alzheimer's disease. bioRxiv 2025. https://doi.org/10.1101/2025.07.11.659973
MIT — see LICENSE.