Code for AP-1 specifies developmental versus fibrotic extracellular matrix transcriptional programs in the lung
Analysis code accompanying AM Kaiser, A Luo, K Sivasubramanian, G Dueñas, B Martin-McNulty, W Cedron-Craft, JM Patino, AJ Chang, J Riegler, & JG Ruby, AP-1 specifies developmental versus fibrotic extracellular matrix transcriptional programs in the lung.
This repository contains the scripts used to process and analyze the single-cell multiome, bulk RNA-seq, ATAC-seq, and published human datasets reported in the paper, and to generate the figures.
git clone https://github.com/<GITHUB_USERNAME>/ap1-lung-paper.git
Most of the repository is R. The scripts are not organized as an R package; each is a standalone script meant to be run section by section in an R session (or with Rscript). Nothing is installed from this repository — the packages the scripts depend on are installed from CRAN, Bioconductor, and GitHub. The one exception is atac/atac_process.sh, a shell script that processes ATAC-seq reads on a Slurm cluster.
The scripts use placeholder paths (e.g. /path/to/...). To reproduce an analysis, set these to the location of the corresponding data on your system. Inputs for each script are listed at the top of that script.
ATAC-seq read processing (atac/atac_process.sh) was run on a Slurm cluster using cutadapt (2.8.0), bowtie2 (v2.3.4), and samtools (v1.14), aligning to mm10.
The analyses were run in two R environments. package_versions.txt lists which environment each script was run in, and the version of every package used.
The user needs to download raw and processed data from online repositories to run the analyses here.
- This study: GSE346825
- Published datasets reanalyzed here: Habermann et al: GSE135893, Adams et al: GSE136831, Tsukui et al: GSE132771, Valenzi et al: GSE214085, Zepp et al: GSE149563, Strunz et al: GSE141259, Curras-Alonso et al: GSE211713, Narvaez del Pilar et al: GSE180822, LGRC: GSE47460 — see each dataset's original publication for terms of use.
Aligned BAM files for the ATAC-seq experiment are not deposited at GEO. atac/atac_process.sh regenerates them from the deposited fastq files, and atac/ChrAccR.R takes those BAMs as input. The ATAC-seq scripts and sampleAnnotation.tsv use the original sequencing basenames, which map to the GEO sample titles as follows:
| script name | GEO library | condition |
|---|---|---|
| 1-0_S129 | 1_EGFP_1 | EGFP, replicate 1, sample 1 |
| 2-0_S130 | 2_EGFP_2 | EGFP, replicate 2, sample 2 |
| 3-0_S131 | 3_EGFP_3 | EGFP, replicate 3, sample 3 |
| 4-0_S132 | 4_AFOS_1 | AFOS, replicate 1, sample 4 |
| 5-0_S133 | 5_AFOS_2 | AFOS, replicate 2, sample 5 |
| 6-0_S134 | 6_AFOS_3 | AFOS, replicate 3, sample 6 |
multiome/— mouse lung single-nuclei multiome (RNA + ATAC)initial_processing_01.R— load 10x outputs, QC, integrate, write the base Seurat objectsanalysis_02.R— downstream analysis, chromatin scoring, GRN inferenceexternal_sc_dataset_analysis_03.R— reprocessing of published external datasets for comparisonfigures_04.R— reads the objects above and produces the multiome figure panels
human/— reanalysis of published human lung datasetshuman_sc_analysis_01.R,human_sc_figures_02.R— analysis of published single-cell RNA- and ATAC-seq datasets and associated figureshuman_microarray_analysis_03.R- whole-lung microarray dataset analysis
bulk_rnaseq/— bulk RNA-seq analyses:AFOS.R,KD_OE.R,inhibitor_screen.R
atac/— bulk ATAC-seqatac_process.sh— Slurm array script to process ATAC fastq files to sorted BAM files (cutadapt → bowtie2 → samtools)ChrAccR.R— accessibility analysis and differential accessibility from the BAMs
Most analyses are contained within their experimental folder. However, a few analyses depend on objects produced elsewhere in the repo: bulk_rnaseq/KD_OE.R reads the fibroblasts_final RDS object in the GEO repository, and bulk_rnaseq/inhibitor_screen.R uses the AFOS sample table and counts matrix.