Overview of the steps involved in training ChromBPNet models on the atlas and analyzing outputs.
We show how to load and use trained ChromBPNet models in the tutorial at code/05-misc/04-ChromBPNet_use_cases.ipnyb (html).
chrombpnet_utilsPython utilities for downstream ChromBPNet related analysis, plotting, etc.
tangermeme_utilsPython utilities for downstream ChromBPNet related analysis, particularly for interfacing with the tangermeme package. These are mainly used for the in silico experimentation.
00-inputsThese scripts pertain to generating the necessary inputs for training ChromBPNet models.
01: get fragments per cluster per sample from ArchR projects02: process fragments for calling peaks (generating pseudoreplicates)03: group fragments across samples per cell type, and sort fragments04: call peaks with macs2 on pseudoreplicates04b: call peaks on the fragments of each cluster (no pseudoreps), to generate p-value and fold-change signal bigwig tracks05: format peaks for ChromBPNet06: make bigwigs07: make chromosome splits for test/train/validation folds08: get GC-matched negative peaks09: tabix-index peaks for viewing in browser10: randomly subset backgrounds to 100 regions per cell type to use for downstream analysis01-train_modelsThese scripts run the ChromBPNet workflow, which involves training a bias model, using the bias model to train chromatin accessibility models in each cell type, calculate contribution scores, generate model predictions, and perform motif discovery.
01: train bias models02: train ChromBPNet models with a given bias model, initial interpretation with 30k subsample peaks03: perform model QC and make figures with performance metrics04: get contribution scores (aka DeepLIFT or DeepSHAP scores) as h5 files per fold per cell type05: average contribs across folds, separately for profile and counts06: deep TF-MoDISco run with 1M seqlets on averaged contribs07: generate contribution score bigwigs, for viewing in browser08: predict accessibility in peak regions across folds, and average the predictions (bias-corrected) to generate bw09: prepare supplementary table with ChromBPNet performance and QC metrics02-compendiumThese scripts pertain to assembling a motif compendium from across the atlas, calling instances of each motif in each cell type, and then annotating those instances.
01: convert MoDISco CWMs to PFMs to prepare the input for gimme cluster:
this is run per organ, and motifs from all cell types (models) within an organ are concatenated.
Done separately for positive and negative patterns.02: for each organ, run gimme cluster on PFMs of motifs from all cell types in that organ, to get broad clusterings.
Done separately for positive and negative patterns.02b: run gimme cluster again, using as input all the clusters from the per organ runs of gimme cluster in Step 02.
Dine separately for positive and negative patterns. This produces “superclusters” of patterns from across cell types.03: merge similar MoDISco patterns within each supercluster together, using the modiscolite.SimilarPatternCollapser functionality.
This produces one MoDISco h5 object per supercluster, containing merged, non-redundant patterns.04: combine MoDISco h5 objects from the merging step into one h5 object, match to known patterns, assign unique index, and prepare as MEME format05: call hits in each cell type, using the unified motifs06: generate HTML reports to assess the quality of hit calling with unified motif set, filter & label hits using manual annotation06b: filter out low QC hits, reconcile overlapping hits, and get genomic annotations07: run NucleoATAC per cell type03-syntax00: compute the mean and summed importance score for all trimmed CWMs01: global overview of de novo motifs and predictive instances02: visualization of genomic tracks at example loci03: visualization of motif instances (hits) for a few examples04: in silico analysis of cooperativity
04a: assemble the set of composites to test04b: run the in silico analysis04c: summarize the results and generate plots04d: make animations showing hard and soft synergy05: in silico analysis of cell type-specific cooperativity
05a: run the analysis05b: visualize results06: in silico ablations of negative motifs07: compute motifs with enriched co-occurrence08: investigate overlaps in peaks and motif instance calls across clustersNOTE: variant scoring using ChromBPNet models is done in the code/06-variants directory.