Sovereign 8s.is mirror of standardgalactic/cell_type_regulatory_evolution
  • Jupyter Notebook 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-01 21:43:53 -07:00
.ipynb_checkpoints Update scripts 2026-07-01 21:27:35 -07:00
environment update analysis notebook and README 2026-06-30 23:03:59 -07:00
notebooks/Figures Update scripts 2026-07-01 21:27:35 -07:00
step-by-step-scripts Update scripts 2026-07-01 21:27:35 -07:00
README.md Update readme 2026-07-01 21:43:53 -07:00

Flexible use of conserved motif vocabularies constrains genome access in cell type evolution

Code and analysis notebooks for the study described in Chai et al., bioRxiv 2024.09.03.611027.

Overview

This repository contains the Python, R, and bash scripts used to process multiome (scRNA + scATAC) data across flatworms (Macrostomum lignano, Schmidtea mediterranea, Schistosoma mansoni), zebrafish, and mouse, and to train ChromBPNet models of chromatin accessibility per cell type. Notebooks are organised by manuscript figure.

Repository layout

cell_type_regulatory_evolution/
├── environment/                # conda environment files
│   ├── base_python.yml
│   └── base_R.yml
├── notebooks/Figures/          # analysis notebooks, one folder per figure
│   ├── Fig1/                   # single-cell atlases and marker-gene / ArchR analyses per species
│   ├── Fig2/                   # cross-species SAMap comparisons + sub-clustering
│   ├── Fig3/                   # ChromBPNet motif deviations and conservation
│   ├── Fig4/                   # motif co-occurrence, jaccard, scVI, gene phylogenies
│   ├── Fig5/                   # cross-species motif quantification (Smed–Sman)
│   └── Fig6/                   # cross-species motif work in mouse and zebrafish
└── step-by-step-scripts/       # preprocessing pipeline commands and configs
    ├── STARsolo_alignment_parameters       # scRNA read alignment
    ├── chromap_alignment_parameters         # scATAC read alignment
    ├── kallisto_alignment_parameters        # alternative RNA quantification
    ├── peakcalling_consensus_step_by_step.txt  # ENCODE atac-seq-pipeline + iterative overlap
    ├── iterative_overlap_peaks.py           # consensus-peak builder
    └── ChromBPNet_model_step_by_step.txt    # end-to-end ChromBPNet training recipe

Environments

Two conda environments cover most notebooks:

conda env create -f environment/base_python.yml   # base_python
conda env create -f environment/base_R.yml        # base_R

Two figures use dedicated Docker containers rather than the conda envs:

Figure Environment Container
Fig 1 base_python / base_R —
Fig 2 SAMap Docker jessedgibson/samap-test
Fig 3 base_python / base_R —
Fig 4 base_python / base_R —
Fig 5 ChromBPNet Docker kundajelab/chrombpnet
Fig 6 ChromBPNet Docker kundajelab/chrombpnet

All ChromBPNet model training (see step-by-step-scripts/ChromBPNet_model_step_by_step.txt) was performed inside the ChromBPNet Docker container — the same image linked above.

Pull the containers:

docker pull jessedgibson/samap-test
docker pull kundajelab/chrombpnet

Preprocessing pipeline

Before running any of the figure notebooks, raw reads are processed through the following steps (see step-by-step-scripts/):

  1. Read alignment. scRNA with STARsolo (STARsolo_alignment_parameters) or alternatively kallisto (kallisto_alignment_parameters); scATAC with chromap (chromap_alignment_parameters).
  2. Peak calling and consensus set. ENCODE atac-seq-pipeline per cell type, then merged into an iterative-overlap consensus with iterative_overlap_peaks.py. See peakcalling_consensus_step_by_step.txt for the end-to-end recipe.
  3. ChromBPNet training. Per-species / per-cell-type bias and accessibility models, following ChromBPNet_model_step_by_step.txt inside the ChromBPNet Docker container.

Data availability