Plasmid maps, amplicon maps, and scripts for: Locus-Scale Massively Parallel Reporter Assays (LAMPRAs).
Note: scripts contained herein do not currently constitute streamlined pipelines and are shared for transparency. Iterations and improvements will be made in the near future.
Scripts are separated in subdirectories organized by categories as detailed below with short descriptive of contents.
Plasmid maps can be found in "plasmid_maps" (refer to manuscript Methods for further details). See plasmid_descriptions for a description of all plasmids.
Structures of custom sequencing amplicons used in this study are listed in "custom_amplicon_structures".
The BAM processing pipeline (revcomp_bam.sh) is first run, normalizing PacBio HiFi reads to a consistent strand orientation by reverse-complementing reads containing a known orientation motif. Insert sequences and barcodes are then extracted from the orientation-corrected reads using anchor-flanking sequence parsing (extract_inserts.sh), and raw insert sequences are annotated against a reference table to produce human-readable insert names (rename_inserts.sh). The annotated reads are collapsed to unique insert-barcode combinations with associated read counts (collapse_counts_stats.sh). Finally, the collapsed count table is filtered and processed using filter_association_file.R to generate a barcode-to-insert-combination association table, with barcodes filtered for correct length and unique insert-combo assignment.
The bash pipeline (arr_bulk_mBC_UMI_count_MPRA.sh) is first run, generating per-library barcode quantification files. This pipeline performs PEAR-based error correction of barcode reads, UMI extraction, and homopolymer filtering. The per-library barcode counts are then merged with a pre-determined barcode-to-insert association table using merge_BC_dictionaries.R. Finally, the merged count table is processed using first_pass_analysis_MPRA_dictionaries.R to generate winsorized RNA/DNA activity scores.
The preprocessing script (preprocess.py) is first run, converting the MPRA activity score output into a categorical feature table in which each construct is encoded as ten integer columns and associated with its replicate-averaged activity score (avg_Rep). Four model families are then trained on these ten features to predict construct expression: linear models with optional pairwise interactions (train_linear.py; OLS, Ridge, Lasso, ElasticNet) and tree ensembles (train_rfxgb.py; random forest and XGBoost), each hyperparameter-tuned. The best model from each family is scored on the held-out set using evaluate_holdout.py, and a random-forest learning curve is generated by downsampling the training data across 50 replicates (downsample_replicates.py). Finally, results are collated across families and subsets into model-comparison tables using model_comparison_merge.py and model_comparison_v3.1.py.
See scripts/modeling/README.md for the encoding scheme, data splits, environment, and full run commands.