# Mammal credible sets — release v2

Four sets of 10,000 dated, species-level mammal trees produced by the
hierarchical backbone+patch pipeline (v6), **v2 revision**: fully
binary, complete draws with TACT-style stochastic taxon completion.

`dating_v6` provenance and full methods/caveats:
`docs/BAYESIAN_SETS_README.md` (repo `phyloseek-devel`).

## What's new in v2 (vs the original release)

- **Binary trees.** Every draw is now strictly bifurcating: every
  internal node has exactly two children. v1 carried polytomies from
  three sources — absent-clade reinsertions appended as extra children,
  orphan-clade appends at order crowns, and star polytomies in
  MDD-completed draws. All are gone: every insertion is a binary edge
  split at a stochastically placed age.
- **Complete draws.** All 10,000 draws per set have the full tip count
  (dna 7,901 / comp 9,507). v1 had 93 incomplete dna draws and 21
  incomplete comp draws (transient pack-time gaps); a manifest-driven
  repack fixed them.
- **TACT-style completion (tact 0.8.0).** Missing MDD species are
  attached at times sampled from a per-group birth–death model fit per
  draw (`optim_bd` on branching times, `get_new_times` for sampling),
  not glued to a single crown node. Genus-level groups with k ≥ 3
  present species and crown-capture probability ≥ 0.8 fit their own
  rates; the rest inherit rates from family → order → whole tree.
  Placement respects monophyletic crowns of other genera/families
  (protected; their stem edges stay eligible).
- **Placement fixes.** `Macrauchenia_sp._MW-2017` (Litopterna) is now
  on the Perissodactyla *stem* (sister to crown Perissodactyla), not
  inside its crown. C0 reinsertions and DNA orphan clades use
  uniform-edge placement under the appropriate taxonomic anchor
  (genus → family → order ladder), with a singleton rule: a single-tip
  anchor places the taxon on that tip's terminal edge — fixing e.g.
  `Orycteropus` and `Notoryctes` landings.
- **Ultrametric + positive branches.** All draws are ultrametric
  (deviation ≤ 1e-4 Ma) with strictly positive branch lengths; tiny
  source rounding is reconciled by terminal-edge extension.
- **True MCC.** `MCC_*.nwk` are now maximum-clade-credibility trees
  (clades weighted by posterior support) with common-ancestor *mean*
  node heights — not majority-rule. The old `MCC_*.nwk` files were
  actually majority-rule trees; those remain as `MR_*.nwk`.

## Tree sets

| File | Tips/draw | Anchor |
|---|---|---|
| `trees10k_dna.trees.gz` | 7,901 | LSD2 + Upham ND17 calibrations (root fixed 201.45 Ma) |
| `trees10k_comp.trees.gz` | 9,507 | LSD2 + Upham ND17 calibrations (root fixed 201.45 Ma) |
| `trees10k_dna_mcmc.trees.gz` | 7,901 | MCMCtree posterior draws (root samples ~165–200 Ma, pooled mean 178.6) |
| `trees10k_comp_mcmc.trees.gz` | 9,507 | MCMCtree posterior draws |

- **dna** = all DNA-sampled taxa. **comp** = dna + MDD-completed:
  1,606 taxa added per draw — missing-species TACT insertions
  (1,493 inside present genera, 44 founder insertions for genera
  absent from the draw, 0 order founders), 68 previously-unplaced DNA
  taxa, and Litopterna.
- The `*_mcmc` pair is the sensitivity variant: each backbone replicate
  is dated against one joint MCMCtree posterior draw instead of the
  fixed ND17+LSD2 anchor. See `mcmc_anchor/` for the artifacts.
- Draw RNG is per-draw seeded (`md5("draw:{idx}")` dna,
  `md5("tact:{idx}")` comp) — draws are reproducible.

## Format

Each `.trees.gz` is gzip-compressed text: **one Newick tree per line,
lines in draw order** (`tree_00000` … `tree_09999`) — the line number
is the draw index, same convention as Upham's distributions.

## Draw correspondence

Line N is the **same underlying draw** across all four sets: identical
backbone replicate + identical per-order patch replicates (manifest
replay). `*_comp` adds completion taxa; `*_mcmc` re-anchors dates to
the posterior. `comp` restricted to dna tips is *exactly* the dna draw
(verified). Verify via the `*.manifest.tsv` files — draw rows are
verbatim identical.

## Manifest / accounting

- `<set>.manifest.tsv` — `tree  bb_rep  <order columns>`: backbone and
  patch replicates per draw. Authoritative.
- `<set>.accounting.tsv` — per-draw insertion accounting.
  dna: `tree tips grafted rescaled no_anchor residual_bb orphan_placed
  orphan_singleton orphan_rescaled_stem` (still_orphan = 0).
  comp: `tree tips genus fam_founder ord_founder unplaced litop stem
  fallback own_rate inh_rate failed` (failed = 0).

## Summary trees

- `MCC_<set>.nwk` — **true maximum-clade-credibility** tree per set;
  node ages = common-ancestor mean heights (ultrametric by
  construction). `MR_<set>.nwk` — majority-rule tree with the same CA
  mean heights. `*.nodes.tsv` — node-level posterior support and age
  stats.
- `species/<view>/{MCC,MR}_<set>.nwk` — species-level summary trees
  for the MDD / GBIF / IUCN taxonomy views (one exemplar tip per
  species, binomial labels), built from the same draws.

## taxonomy/

- `species_map.tsv` — view × tip → species mapping (roles exemplar /
  duplicate / cf / absent) with voucher and monophyly support.
  Species names normalized to binomials (trinomials collapsed);
  incertae-sedis and non-binomial rows stay unnamed.
- `species_monophyly.tsv` — posterior probability of monophyly per
  species with ≥ 2 tips in a view.
- `adjudication_units.tsv` / `adjudication_parts.tsv` — phylogenetic
  adjudication of 302 taxonomy-dispute units across views
  (LUMP_REFUTED / SPLIT_FAVORED / BOTH_CONSISTENT / LUMP_FAVORED /
  AMBIGUOUS / untestable verdicts).

## validation/

Crown-date validation tables for the LSD2-anchored sets, carried over
from the original release (computed on the v1 majority-rule summary
trees; node dating is unchanged in v2, so crown ages are expected to
agree closely — a v2 recomputation is pending).

## md5sums.txt / MANIFEST.tsv

`md5sums.txt` — md5 of every shipped file (`md5sum -c md5sums.txt`
from this directory verifies). `MANIFEST.tsv` — one row per file with
tree/row counts, gz sha256, size, description.
