Living record · started 23 Jul 2026
What the raw archaic data actually is, the difference between reads (BAM) and genotype calls (VCF), what the pipeline transforms, and a running log we update as we rebuild.
plan/pipeline_workbook.md. Bug evidence: BUG_EVIDENCE.md. Rebuild plan: rebuild_from_raw.md.The single most important distinction for understanding this project's data. Every archaic individual can exist as either (or both), and they are not interchangeable.
A BAM is all the raw crime-scene photographs from every angle — you can re-measure anything later. A VCF is the detective's written findings ("at spot X the allele is G"). Once you keep only the VCF, you can't go back and re-examine the photos. This is exactly why mapDamage, a max-depth filter, and any transversion/transition handling need BAMs — they read the photographs; a VCF has already thrown them away.
The archaic genomes are published — as BAMs aligned to hg19/GRCh37 — in two public archives: MPI-EVA (Max Planck, ftp.eva.mpg.de) and EBI-ENA (ftp.sra.ebi.ac.uk). Lily's pipeline started from these BAMs and called its own genotypes. Sources marked "confirm" are being recovered in Stage 0 of the rebuild.
The archaic data was taken as BAM files "previously mapped to the GRCh37/hg19 reference" — i.e. the reads were already aligned by the original data producers; Lily did no alignment, adapter-trimming, or read-collapsing herself, and there was no FASTQ. The modern SGDP data came as VCFs (also hg19). Consequence for the rebuild: re-mapping to hg38 would require going back to FASTQ and re-running the whole aDNA read-processing chain (and the MPI-EVA genomes are published only as processed BAMs) — so rebuilding on hg19 is the practical choice, not just the cheap one.
| Sample | Type | Coverage tier | Archive | Accession / path | Note |
|---|---|---|---|---|---|
| Vindija 33.19 | Neanderthal | high (~30×) | MPI-EVA | Prüfer 2017, per-chromosome BAMs | flagship high-coverage |
| Chagyrskaya 8 | Neanderthal | high (~27×) | ENA (confirm) | confirm in Stage 0 | high-coverage |
| Denisova 5 (Altai) | Neanderthal | high (~30×) | MPI-EVA (confirm) | confirm in Stage 0 | "Altai Neanderthal" — despite the cave name |
| Denisova 3 | Denisovan | high (~30×) | MPI-EVA (confirm) | confirm in Stage 0 | chr-named BAM → bug A1 |
| Denisova 25 | Denisovan | medium (~16×) | MPI-EVA (confirm) | confirm in Stage 0 | |
| Denisova 11 (denny) | F1 hybrid | low | ENA | ERR2273828 | Neanderthal × Denisovan first-generation |
| Goyet Q56-1 | Neanderthal | low | confirm | confirm in Stage 0 | |
| Les Cottés Z4-1415 | Neanderthal | low | confirm | confirm in Stage 0 | |
| Mezmaiskaya 1 | Neanderthal | low | ENA | ERR257722 (L4741) | |
| Mezmaiskaya 2 | Neanderthal | low | confirm | confirm in Stage 0 | |
| Scladina | Neanderthal | low | ENA | ERR9741105 (G2160) | |
| Spy 94a | Neanderthal | low | MPI-EVA | A9416 | |
| Hohlenstein-Stadel | Neanderthal | low | MPI-EVA | L5386.bam | |
| Vindija 87 | Neanderthal | low | confirm | confirm in Stage 0 | |
| El Sidrón 1253 | Neanderthal | exome only | EVA exomes/ | Castellano 2014, PNAS | no shotgun genome — exome-capture only (~12.5× over coding) → excluded; 14 analyzed, not 15 |
Source paper, DOI, published coverage, exact VCF/BAM/ENA URLs, and data tier for all 15 archaic genomes + SGDP: plan/papers/REFERENCES.md. What QC each published VCF already carries (snpAD, MQ25, 35-mer mappability, FilterBed masks): plan/papers/VCF_QC.md. Two findings from the search: Vindija 87 is the same individual as Vindija 33.19 (so a genotype VCF exists for it), and El Sidrón 1253 has only exome-capture data, which is exactly why the thesis found no usable genome-wide nuclear data. (PDFs live in the git-ignored plan/papers/pdf/ — paywalled ones aren't redistributed on this public repo.)
Modern comparison: the Simons Genome Diversity Project (SGDP), 15 individuals, downloaded as whole-genome VCFs on hg19 (thesis: a 34.4 M-SNP whole-genome panel; pca/modern/sgdp.wg on the cluster — verified hg19, contains the pigmentation SNPs by rsID).
Per-sample mean depth over the panel, computed exactly from the committed *_depth.txt (full record + caveats: coverage_current.tsv). Read these as caveated: they're measured at the panel's current (hg38) mis-located coordinates (bug A2), so they are realized depths at the wrong positions, not true per-locus coverage; Denisova 3's 0.5× is artifactual (bug A1 — its true coverage is ~30×); and a max far above the mean (Vindija 87, Scladina) is a pileup artifact that motivates the max-depth cap. True per-locus coverage comes after the rebuild (Q6). 10 of the 14 samples are under ~3.2× — which is why hard-calling is the wrong tool and we move to genotype likelihoods (ANGSD).
| Sample | Mean depth (panel) | Max | Covered / 222 | Tier |
|---|---|---|---|---|
| Vindija 33.19 | 30.716 | 106 | 222/222 | high |
| Chagyrskaya 8 | 27.423 | 85 | 222/222 | high |
| Denisova 25 | 16.680 | 48 | 183/222 | high |
| Denisova 5 | 16.059 | 36 | 222/222 | high |
| Vindija 87 | 3.185 | 147 | 122/222 | low · max-depth artifact |
| Les Cottés | 2.941 | 51 | 142/222 | low |
| Goyet | 2.464 | 54 | 163/222 | low |
| Mezmaiskaya 2 | 1.856 | 53 | 113/222 | low |
| Scladina | 1.856 | 91 | 64/222 | low · max-depth artifact |
| Denisova 11 (denny) | 1.252 | 20 | 121/222 | low · hybrid |
| Spy | 0.743 | 22 | 75/222 | very low |
| Denisova 3 | 0.495 | 6 | 69/222 | artifact — true ~30× (A1) |
| Mezmaiskaya 1 | 0.180 | 2 | 37/222 | very low |
| Hohlenstein-Stadel | 0.117 | 2 | 24/222 | very low |
| El Sidrón (Sid1253) | — | — | 0 | no data — excluded |
The whole pipeline is one chain. Colour marks the level each step operates at — the BAM→VCF boundary (red→blue) is where "photographs" become "written findings" and damage/depth information is fixed in place.
What "contig" means (it comes up a lot): a contig ("contiguous sequence") is one continuous stretch of the reference the reads align to — in a human reference, essentially each chromosome, plus small unplaced/decoy pieces. Every BAM and VCF opens with a header line per contig, @SQ SN:<name> LN:<length>, and the SN value is its label. "Contig naming" is whether that label is bare (1) or prefixed (chr1). Two files can describe the same genome yet be unusable together if one says 1 and the other chr1 — the software matches by name, finds nothing, and silently returns empty. That one-sample mismatch is bug A1 (Denisova 3's BAM was chr-named against a bare-named reference and panel), which is why the "rename contigs" step above harmonizes every sample to bare names up front.
Left: what Lily's original pipeline did (and where the bugs entered). Right: what the rebuild does differently, with a QC gate at each stage. Full rebuild plan: rebuild_from_raw.md (incl. the per-genome reuse-vs-rerun matrix — the 5 high-coverage genomes are reused from published VCFs; only 3 low-coverage genomes are targeted-re-acquired). The justified sample subset (maximize reliable pigmentation SNPs, not genome count) is in papers/SAMPLE_INCLUSION.md. What each published VCF's QC actually was: papers/PIPELINE_QC_BY_PAPER.md.
| Step | Lily's original | Rebuild (from raw) |
|---|---|---|
| Acquire | download BAMs, sort, index | re-download + checksum (Q1); harmonize contig naming for all (fixes A1 globally) |
| Raw QC | — (none) | mapDamage, sex, contamination, coverage-vs-expectation, and heterozygosity-vs-depth (Q6/Q7/Q8) |
| Panel / build | panel on hg38, data on hg19 → wrong coordinates (A2) | panel put on hg19 by rsID; tracer-SNP lint (Q2); allele/palindrome check (Q4) |
| Call genotypes | hard calls (bcftools) for all samples incl. <1× — forces a genotype from 1–2 reads; whole-genome was haploid --ploidy 1 (A3) | genotype likelihoods (ANGSD) — no hard call for low-coverage samples; diploid model; max-depth cap; mapDamage-rescale; transitions kept for pigmentation, transversion-only for ancestry. Hard calls only for the 4–5 high-coverage genomes (reporting/cross-check) |
| Modern ref | SGDP subset → merge → PCA | verify (or rebuild) sgdp.wg against the same lint |
| PCA + project | hard-genotype plink2 --score; thesis §2.6 states "no imputation" but the code lacked no-mean-imputation, so plink silently mean-imputed → collapse on the rank-1 (wrong-build) panel | PCAngsd on the genotype likelihoods (low-coverage-appropriate); positive control (Q3); non-degeneracy (Q5); 3 panels × 2 designs |
| Reproduce | manual scripts, competing/dead copies, no seeds | Snakemake DAG, pinned env, seeds, CI (Q10) |
They differ on nearly every axis that matters — which is why one uniform recipe never fit them.
chr-prefixed while the others were bare — bug A1.filtered_*.bam + already-called VCFs remain) — which is why the rebuild re-downloads the raw reads.A dated record of what we've actually done to the data, so the pipeline's real state is always legible. Newest at the bottom.
| Date | Stage | Action | Status | Output / evidence |
|---|---|---|---|---|
| 2026-07-22 | audit | Reproduced the build mismatch (A2), Denisova 3 naming (A1), --ploidy 1 (A3), dead scripts (A5) | found | verify/BUG_EVIDENCE.md |
| 2026-07-23 | audit | Traced each bug to its downstream consequence; rendered before-figures from committed data | found | plan/figures/before_*.png |
| 2026-07-23 | 0 | Probed the cluster: full BAMs absent; sgdp.wg confirmed hg19 with pigmentation SNPs by rsID; ancient_sgdp_wg.vcf.gz (1.6 G) present; 129 panel SNPs overlap the modern ref (92 transitions / 37 transversions) | probed | this page §02, §05 |
| 2026-07-23 | — | Decision: rebuild from raw rather than trust the derived data | decided | rebuild_from_raw.md |
| 2026-07-23 | 2 | Documented exact per-sample panel coverage (10/14 under ~3.2×; max-depth artifacts in Vindija 87 / Scladina) | done | coverage_current.tsv, §02 |
| 2026-07-23 | 1 | Confirmed from thesis §2.3: archaics are BAMs pre-mapped to hg19, no FASTQ → rebuild on hg19 | done | §02, §04 |
| 2026-07-23 | 4/6 | Decision: use genotype likelihoods (ANGSD) + PCAngsd for low-coverage, not hard-calling; max-depth cap; transversion-only for ancestry only | decided | rebuild_from_raw.md Stage 4/6 |
| 2026-07-23 | 0 | Provenance search complete for all 15 archaic genomes + SGDP (only 6 sources were on the cluster). High-cov have published snpAD genotype VCFs; low-cov are BAM-only → ANGSD. Found: Vindija 87 = Vi 33.19 individual; El Sidrón is exome-only | done | papers/REFERENCES.md |
| 2026-07-23 | 0 | Documented the QC baked into each published VCF (snpAD, MQ25, 35-mer mappability, per-release FilterBed masks); pulled the open-access PDFs (3) into git-ignored papers/pdf/ | done | papers/VCF_QC.md |
| 2026-07-23 | 0 | Extracted each source paper's full QC + pipeline (Methods + supplementary, verbatim params, adversarially verified — 11 papers). Corrections: originals of Altai/Denisova 3 are GATK (prefer the 2017 snpAD reprocess); Mezmaiskaya 1 does have a snpAD VCF; low-cov genomes were pseudo-haploid random-read, not genotyped | done | papers/PIPELINE_QC_BY_PAPER.md |
| 2026-07-23 | 0/1 | Decided the sample subset (maximize reliable pigmentation SNPs, not genome count): Tier 1 = 5 high-cov + SGDP; Tier 2 = Les Cottés, Denisova 11, Goyet, Mez1; excluded El Sidrón/Vi87/Mez2/Spy/HST/Scladina. Targeted re-acquisition for 3 genomes; SGDP verified not rebuilt | decided | papers/SAMPLE_INCLUSION.md |
| 2026-07-23 | 2 | Added: individual heterozygosity vs individual depth (ANGSD realSFS) as a diversity + contamination diagnostic | planned | Q7; rebuild Stage 2 |
| 0 | Provenance manifest + pinned env + recover all 15 acquisition URLs | todo | ||
| 1 | Re-acquire raw reads (targeted or full) + harmonize naming | todo | ||
| 2 | Raw QC: mapDamage, sex, contamination, coverage | todo | ||
| 3 | Panel → hg19 (by rsID) + tracer lint + allele check | todo | ||
| 4 | Re-call genotypes (diploid, keep-all, max-depth cap, damage-rescale) | todo | ||
| 6 | PCA + projection (positive control, no-mean-imputation) → after-figures | todo |