mamba install -c conda-forge -c bioconda wasp2pip install wasp2The PyPI package does not install external tools such as samtools,
bcftools, or bedtools; install those separately.
docker pull ghcr.io/mcvickerlab/wasp2:1.5.0
docker run --rm ghcr.io/mcvickerlab/wasp2:1.5.0 wasp2-count --helpsingularity pull wasp2.sif docker://ghcr.io/mcvickerlab/wasp2:1.5.0
singularity exec wasp2.sif wasp2-count --helpWASP2 installs three command-line entry points:
wasp2-mapwasp2-countwasp2-analyze
Prerequisite — normalize your VCF first. WASP2's allelic-imbalance model is biallelic. Split multi-allelic records and left-align before running:
bcftools norm -m- -f reference.fa input.vcf.gz -Oz -o input.norm.vcf.gz bcftools index -t input.norm.vcf.gzBy default WASP2 keeps biallelic SNVs only (multi-allelic sites are dropped, equivalent to
bcftools view -m2 -M2). Pass--include-multiallelictocount-variants,count-variants-sc, ormake-readsto instead emit one row per ALT at any remaining multi-allelic sites.
wasp2-map make-reads input.bam variants.vcf.gz -s sample1 -o remap_dir
# Realign remap_dir/*_swapped_alleles_r1.fq and r2.fq with the same aligner
# and settings used for the original BAM, then:
wasp2-map filter-remapped remapped.bam \
-j remap_dir/input_wasp_data_files.json \
-o filtered.bamwasp2-count count-variants filtered.bam variants.vcf.gz -s sample1 -o counts.tsvFor a bulk cohort, use one final indexed BAM per donor and map donor identifiers to VCF sample names explicitly:
donor_id vcf_sample bam
donor1 VCF_sample_1 /path/to/donor1.bam
donor2 VCF_sample_2 /path/to/donor2.bam
wasp2-count count-cohort donors.tsv variants.vcf.gz cohort_counts \
--unit snv --regions atac_peaks.bedThis creates a new locked directory containing counts.tsv.gz, normalized
donors.tsv, and count_manifest.json. In SNV mode, regions restrict included
sites but do not combine their tests. Use --unit feature --regions peaks.bed
to retain peak identifiers for feature-level analysis.
wasp2-analyze find-imbalance counts.tsv -o ai_results.tsvwasp2-count count-variants-sc \
cellranger.bam \
variants.vcf.gz \
barcodes.tsv \
--samples sample1 \
--feature genes.gtf \
--out_file allele_counts.h5ad
wasp2-analyze find-imbalance-sc \
allele_counts.h5ad \
barcode_groups.tsv \
--sample sample1 \
-o ai_results.tsvSee the documentation for complete usage, tutorials, and API details.