Single cell ATAC coverages - settylab/single-cell-primers GitHub Wiki
Coverage plots are a useful visualization to understand the accessibility changes at different loci. Coverage plots for a subset of clusters from the PBMC data at the RUNX1 locus is shown below.

The notebook here details the generation of coverage plots from single-cell ATAC data. A bigwig file is generated for each cluster / cell-type which can then be browsed either using IGV or [pyBigwig][https://github.com/deeptools/pyBigWig].
The following are the parameters necessary for using the notebook
# RNA and ATAC anndata objects
atac_ad
# Output and scratch directories
out_dir
tmp_dir
# Grouping parameters
# Sample field in atac_ad.obs (Useful in case your anndata has multiple samples)
sample_key
# Cell type field in atac_ad.obs (A bigwig will be generated for each group of cells)
celltype_key
Celltype subset - Specify if you only want coverages for a subset of cell types
celltype_subset = None
# Fragment files
fragment_files = dict()
# Add an entry for each sample
# Chromsizes [Path to chromosome sizes file downloaded from UCSC Genome Browser]
# For human:
chromsizes = '/fh/fast/setty_m/grp/lab-datasets/bonemarrow-tcell-dep-multiome/cr-arc-results/hg38.chrom.sizes'
For each cell type, the following bigwig files will be generated
-
<celltype>_All.bw
: Coverage using all fragments -
<celltype>_NFR.bw
: Coverage with NFR fragments (fragment length < 147) -
<celltype>_NUC.bw
: Coverage with nucleosomal fragments (fragment length > 147)
Make sure all the necessary python packages and dependencies are installed as detailed in https://github.com/settylab/single-cell-primers/wiki#environment-set-up