Skip to content
GenomicAIPublic

About

Simulation of SV reference bias in admixed genomes (msprime/stdpopsim + short reads)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

admixsv

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 vg build 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.

Install

# requires Python 3.12 and uv (https://docs.astral.sh/uv/)
uv sync

mappy compiles from source; a C toolchain is required.

Reference sequence (not shipped)

The default window is GRCh38 chr20:30,000,000–32,000,000. Fetch it once:

uv run admixsv fetch-ref

This calls the Ensembl REST API and writes data/ref_GRCh38_chr20_30-32Mb.fa.

Quick start

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.

Population descriptors

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.

Layout

admixsv/           Python package
pyproject.toml
uv.lock
data/              created by fetch-ref (gitignored)
results/           simulation outputs (gitignored)
figures/           rendered figures (gitignored)

License

MIT — see LICENSE.

About

Simulation of SV reference bias in admixed genomes (msprime/stdpopsim + short reads)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages