Detect cis-regulatory genetic effects on chromatin accessibility from heterozygous SNPs. Covers WASP reference-bias correction (mandatory), GATK ASEReadCounter for allele counting, RASQUAL for joint cohort-level + allelic imbalance caQTL mapping, QuASAR for genotype-free ASE, and per-peak aggregation strategies. Builds chromatin QTL (caQTL) maps for fine-mapping and validates GWAS variant function with allelic imbalance evidence.
# WASP for mapping bias correction (mandatory)
git clone https://github.com/bmvdgeijn/WASP
# GATK 4 for allele counting
conda install -c bioconda gatk4
# RASQUAL for joint caQTL
git clone https://github.com/natsuhiko/rasqual
# Phasing (input to WASP)
conda install -c bioconda shapeit5 beagle whatshap
# Other tools
conda install -c bioconda samtools bcftools vcftools plink2 bowtie2 bwa-mem2
install.packages('MatrixEQTL') # CRAN
remotes::install_github('piquelab/QuASAR') # GitHub-only (not on Bioconductor/CRAN)
Inputs: - ATAC-seq BAM (deduplicated, MAPQ-filtered) - Genotype VCF for the same individual (filtered to heterozygous SNPs) - Reference genome FASTA - Phased haplotypes (SHAPEIT5/BEAGLE/whatshap output) - Consensus peakset (atac-seq/consensus-peakset)
Tell your AI agent what you want to do: - "Run WASP filter to correct reference-allele mapping bias before any ASE analysis" - "Use GATK ASEReadCounter on WASP-filtered BAM to count REF and ALT reads at heterozygous SNPs" - "Aggregate ASE within peaks: per-peak binomial test with effect size >= 0.2 and FDR < 0.05" - "Run RASQUAL joint cis-caQTL combining total counts and allelic counts on a cohort of N=50" - "Phase genotypes with SHAPEIT5 before WASP since unphased sites can't assign reads to haplotypes" - "Cross-validate predicted variant effects (chromBPNet) against observed allelic imbalance"
"Run WASP on a sample's ATAC BAM: find_intersecting_snps, re-align flipped reads with bowtie2, filter_remapped_reads to keep only consistently-mapped, and merge with non-overlapping reads. The output BAM is safe for ASE counting."
"On a WASP-filtered BAM with heterozygous SNPs in VCF, run GATK ASEReadCounter to produce per-SNP REF/ALT counts. Filter to SNPs with totalCount >= 30 for adequate power."
"Aggregate per-SNP ASE counts within each peak in the consensus peakset; pooled binomial test per peak with effect size |ref_frac - 0.5| >= 0.2 and BH-adjusted p < 0.05."
"Run RASQUAL per feature: stream the cis-window genotype VCF (with allele-specific counts) through tabix into rasqual, which models genotype/allelic correlation internally -- no external LD-precompute step. Joint p-value typically gives 1.5-3x more caQTLs than MatrixEQTL alone at N=50."
"I don't have genotypes but want to detect ASE. Use QuASAR which infers genotypes from the BAM directly using a HMM."
"Compare chromBPNet-predicted variant effects (atac-seq/deep-learning-atac) against observed allelic imbalance at the same SNPs; concordance > 70% supports the deep-learning model."
| Setting | Method |
|---|---|
| Single individual, has genotypes | WASP + GATK ASEReadCounter |
| Cohort N >= 100 | WASP + GATK + MatrixEQTL on peak counts |
| Cohort N = 20-100 | WASP + RASQUAL (joint power gain) |
| No genotypes | QuASAR |
| Validating GWAS variant | Lookup het samples; aggregate ASE |
| Trios / family designs | Per-trio phasing + per-individual ASE |
| Test | Threshold |
|---|---|
| Per-SNP coverage | totalCount >= 30 |
| Per-peak SNP aggregation | snp_count >= 2 |
| Effect size | abs(ref_frac - 0.5) >= 0.2 (30:70 imbalance) |
| Significance | BH-adjusted p < 0.05 |
| Cohort caQTL | p < 1e-5 (genome-wide) |
| Allele frequency filter | 0.1 < AF < 0.9 (avoids rare-allele extremes) |