Simulation of structural-variant (SV) read recruitment and genotyping in admixed genomes, comparing a linear reference (GRCh38) to ancestry-matched haplotype panels. One shared genotyper is applied to every reference arm so the reference is the only variable.
Built with Python 3.12, msprime /
stdpopsim
(AmericanAdmixture_4B18), and short-read alignment via
minimap2 (mappy).
Note. There is no
vgbuild for macOS arm64, so “pangenome” arms here are indexed haplotype panels aligned with minimap2 — an approximation of graph alignment, not graph alignment. This is stated in any manuscript Methods that use this package.
# requires Python 3.12 and uv (https://docs.astral.sh/uv/)
uv syncmappy compiles from source; a C toolchain is required.
The default window is GRCh38 chr20:30,000,000–32,000,000. Fetch it once:
uv run admixsv fetch-refThis calls the Ensembl REST API and writes data/ref_GRCh38_chr20_30-32Mb.fa.
uv run admixsv qc # window composition / gaps
uv run admixsv run --profile quick # smoke test (~20 s)
uv run admixsv run --profile full # 3 seeds × 13 arms (longer)
uv run admixsv controls --profile full # read-simulator controls
uv run admixsv metrics --profile full # M1–M8 tables (+ optional numbers.tex)
uv run admixsv figures # SVG/PDF under figures/Per-seed tables under results/tables/ are cached; pass --force to recompute.
Reads are regenerated deterministically from
(replicate, individual, locus, haplotype) so every arm sees identical reads.
Following NASEM 2023:
| Label | Meaning in this package |
|---|---|
| ADMIX / AMR | Admixed American cohort under AmericanAdmixture_4B18 |
| IAM | Indigenous American source — East-Asian branch used as proxy in Browning et al. (2018); disclosed in Methods |
| EUR / AFR | European / African continental sources |
Admixed American ≠ Indigenous American.
admixsv/ Python package
pyproject.toml
uv.lock
data/ created by fetch-ref (gitignored)
results/ simulation outputs (gitignored)
figures/ rendered figures (gitignored)
MIT — see LICENSE.