A reproducible Python pipeline for studying Neanderthal and Denisovan-related ancestry in ancient and present-day human genomes from the Allen Ancient DNA Resource (AADR). It combines allele-frequency f-statistics, block-jackknife uncertainty, technical-quality gates, ancestry-aware outlier models, sensitivity analyses, and portable reports.
The pipeline is designed to separate a large numerical estimate from a credible biological result. Low coverage, contamination, damage, relatedness, panel ascertainment, and reference choice are surfaced rather than hidden.
Interpretation boundary: the validated Neanderthal f4-ratio is reported as a percentage.
D_Denis a relative Denisovan-affinity statistic, not a Denisovan percentage. The pipeline therefore does not calculate a combined Neanderthal-plus-Denisovan percentage.
These are the pipeline's headline outputs: one at the scale of the whole AADR, one at the scale of a single individual.
The pipeline applied end to end to 21,109 quality-passing ancient and present-day AADR genomes across Africa, the Americas, Eurasia, and Oceania: global Neanderthal estimates, relative Denisovan-affinity controls, coverage-aware filtering, artifact auditing, and continental comparisons, all within the interpretation boundary above.
Paper-style report · supporting outputs
The same machinery aimed at one question, and declining to answer it. EV16A.SG from Monteriggioni carries a raw 5.35% Neanderthal point estimate on only 15,994 informative SNPs, a 1.22-9.49% confidence interval. Transversion, alternate outgroup, reference swap, per-chromosome, block-bootstrap, and local Etruscan controls are all reported, and the individual still ends up classified low confidence because coverage, read-level QC, and segment evidence do not support it. That refusal is the result.
Group-level findings · dedicated EV16A analysis · sensitivity table
- Remote Oceania transect — Denisovan ancestry is normally measured on present-day genomes, so its arrival is inferred rather than observed. Vanuatu is the exception. Across 31 Vanuatu ancients in four dated horizons, pooled Denisovan affinity rises from indistinguishable from zero at founding to 75% of the present-day Papuan level. Ninety-six Guam/Marianas genomes, same expansion but without the Papuan-related influx, stay flat. The parallel Neanderthal rise appears in the control too, so it is reported as shared measurement drift rather than a result.
- Which Neanderthal? Altai vs Vindija — a source contrast across the AADR that returns a null with a stated detection limit rather than a finding.
Five minutes, no data download. The synthetic smoke test drives the real packed-genotype reader and the shared f-statistic engine, so a green run means the install works end to end.
git clone https://github.com/bennettek99-spec/Archaic-DNA-processing-pipeline.git
cd Archaic-DNA-processing-pipeline
python -m venv .venvActivate it — PowerShell .\.venv\Scripts\Activate.ps1, or bash
source .venv/bin/activate — then:
python -m pip install --upgrade pip
python -m pip install -e .
archaic-pipeline smoke-testThat prints a synthetic introgression estimate and exits 0. You now have five console entry points:
| Command | What it does |
|---|---|
archaic-pipeline |
the Phase 2-9 workflow and every study subcommand |
archaic-highest |
highest-archaic credibility scan |
archaic-highest-segments |
segment support for scan candidates |
archaic-denisovan |
Denisovan reference-genome module |
archaic-admixture-dating |
Papuan Denisovan admixture dating V1 |
Run archaic-pipeline --help to see the subcommands.
Next: to work on the code, python -m pip install -e ".[test,sim]" then
python -m pytest -q. To run real analyses, you need an AADR panel — see
Run with AADR below. To understand what the numbers mean before
trusting any of them, read
methods and interpretation.
- The core estimator passes seven AADR-based validation gates and is checked against published estimates, simulation, and ADMIXTOOLS 2.
- The Phase 2-9 AADR workflow, global survey, highest-archaic credibility scan, Etruscan study, Denisovan reference-genome module, focused Oase1 workflow, and exploratory single-genome Neanderthal admixture dating are implemented.
- Individual outlier findings remain hypotheses unless the documented coverage, damage, contamination, sensitivity, and—where appropriate—segment evidence support them.
See methods and interpretation for the statistical definitions and evidence limits.
The full workflow requires a locally obtained AADR v66.p1 Human Origins or 1240K panel. AADR genotype files are not redistributed by this repository.
Copy config.yaml to the ignored config.local.yaml, then set the directory
containing v66.p1_1240K.{geno,snp,ind,anno}:
aadr_dir: "/path/to/aadr"You can instead set ARCHAIC_CONFIG=/path/to/config.yaml or
ARCHAIC_AADR_DIR=/path/to/aadr.
archaic-pipeline validate --panel 1240k
archaic-pipeline all --panel 1240kThe orchestrator runs Phases 2-9 and generates
reports/archaic_report_1240k.html. The checked-in configuration contains no
developer-specific AADR path and fails with a setup message when none is
provided.
Detailed setup and command examples are in the getting-started guide.
The core statistics are:
- Neanderthal proportion: an Altai/Vindija-scaled f4-ratio with a block-jackknife confidence interval.
- Neanderthal affinity:
D(X, Mbuti; Altai, Chimp), used as a relative significance channel. - Differential sharing: population contrasts such as
D(Pop1, Pop2; Altai, Yoruba). - Denisovan affinity:
D(X, Mbuti; Denisova, Chimp), reported only as a relative statistic and Z-score.
Important limitations:
- A single low-coverage ancient genome cannot support fine-scale percentage comparisons at population-level resolution.
- Human Origins and 1240K are ascertained panels, not callable whole genomes.
- A high point estimate is not evidence of recent admixture without technical stability and, where relevant, long-segment evidence.
- Published Denisovan percentages may be discussed as external context, but they are never presented as outputs calculated by this pipeline.
| Analysis | Entry point | Main documentation or report |
|---|---|---|
| Core validation | archaic-pipeline validate --panel 1240k |
VALIDATION.md |
| Full Phase 2-9 workflow | archaic-pipeline all --panel 1240k |
reports/archaic_report_1240k.html |
| Highest-archaic credibility scan | archaic-pipeline highest-archaic |
module guide |
| Denisovan reference genome | archaic-pipeline denisovan-genome --panel 1240k |
module guide |
| Papuan Denisovan admixture dating V1 | archaic-admixture-dating run-all --profile smoke --resume |
module guide |
| Remote Oceania archaic time transect | archaic-pipeline oceania-transect --panel 1240k |
report |
| Which Neanderthal? Altai vs Vindija source contrast | archaic-pipeline neanderthal-source --panel 1240k |
report |
| Global and Eurasian >5% survey | python scripts/global_archaic_survey.py |
study index |
| Neanderthal admixture dating | archaic-pipeline admixture-date |
module guide |
| Oase1 segment analysis | python scripts/oase1_haplotype.py |
study index |
| West-Eurasian source ancestry | archaic-pipeline ancestry |
study index |
| Etruscan case study | python scripts/etruscan_study.py |
study index |
The study and report index labels which outputs are validation artifacts, supported summaries, exploratory results, or data-limited negative/inconclusive findings.
Large AADR panels remain outside Git. Five small, published Sima de los Huesos
BAMs from ENA study PRJEB10597 are intentionally retained as a documented
exception for the exploratory adapter in tools/sima_de_los_huesos_scan.py.
Their accessions, publisher MD5 values, repository SHA-256 values, and scientific
limits are recorded in docs/DATA.md.
See docs/DATA.md before adding data or generated results — it also records which pipeline tables are tracked and which are regenerated. The source code is MIT licensed; upstream datasets retain their own terms and citation requirements.
- Documentation index
- Getting started
- Methods and interpretation
- Studies and reports
- Data and artifact policy
- Simulation validation
- Papuan Denisovan admixture dating V1
- Roadmap
- Changelog
- Contributing
- Release process
Use the repository's CITATION.cff metadata when citing the software, and cite Mallick et al. (2024) plus the primary publications for AADR samples used in an analysis.
Code is released under the MIT License. Genomic data are not relicensed by this repository.