Rename the project from "obikmer" to "obiskim" across all documentation, user guides, and developer notes. Add extensive new theoretical and implementation documentation covering chance sharing, sibling partition unification, pair-coverage sampling, MPHF batch queries, merge scaling, and hot resume/memoization. Update navigation structures to reflect these new topics and the new project name. - Rename "obikmer" to "obiskim" in all HTML titles, headers, navigation labels, and code examples across `DevDoc/` and `doc/` directories. - Add new navigation links for "Chance sharing across genomes", "Sibling partition unification", "Pair-coverage-biased family sampling", "MPHF batch queries", "Merge mmap audit", "Merge scaling", and "Hot resume and memoization" throughout the documentation site. - Move `DevDoc/architecture/numa_worker_pools/index.html` to `DevDoc/architecture/hot_resume_memoization/index.html` and update content to focus on hot resume and memoization strategies. - Move `DevDoc/implementation/evidence_elimination/index.html` to `DevDoc/implementation/merge_mmap_audit/index.html` and update content to detail merge mmap audit findings and plans. - Move `DevDoc/implementation/superkmer.refs/index.html` to `DevDoc/implementation/merge_scaling/index.html` and update content to discuss merge scaling costs and dependencies. - Move `DevDoc/theory/indexing/index.html` to `DevDoc/theory/chance_sharing/index.html` and rewrite content to discuss chance sharing across genomes and null models. - Move `DevDoc/theory/minimizer/index.html` to `DevDoc/theory/sibling_partition_unification/index.html` and update content to discuss sibling partition unification and Can3 masked canonical form. - Add new `DevDoc/implementation/mphf_batch_queries/index.html` documenting MPHF batch query performance and inventory. - Add new `DevDoc/theory/pair_coverage_sampling/index.html` documenting pair-coverage-biased family sampling theory and diagnostics. - Update `DevDoc/architecture/query/index.html` to describe `by_partition` using `Vec<PartitionKmers>` instead of `HashMap` for reduced memory usage. - Update `DevDoc/implementation/merge/index.html` to describe bootstrap output logic selecting base source by largest `unitigs.bin` size and using `MatrixBuilder::resume`. - Update `DevDoc/implementation/unitig_evidence/index.html` to change `MAX_KMERS_PER_CHUNK` from 256 to 128 and update rank field documentation. - Update `DevDoc/implementation/obipipeline/index.html` to reflect that `obiskim` uses `make_pipe!` and `.apply()` instead of `make_pipeline!` / `WorkerPool`. - Update `DevDoc/implementation/filtering/index.html` to change `FilterArgs` inheritance to `obiskim::cmd::predicate::FilterArgs`. - Update `DevDoc/implementation/partition_layer_cache/index.html` to reflect new crate dependency structure requiring external reachability for algorithm implementation traits. - Update `doc/formats/index_layout/index.html` to describe new directory structure for index files including `part_NNNNN/index/layer_X/` and updated merging/packing logic. - Update `doc/formats/vcf/index.html` to use `obiskim` prefixes for contigs and update VCF header source. - Update `doc/usage/estimate/index.html` to add "Comparing an index with random sharing" section and clarify `--index` and `--presence-threshold` options. - Update `doc/usage/phylo/index.html` to clarify that running `obiskim phylo` twice draws independent samples and update `--sibling-annex` behavior. - Update `doc/usage/select/index.html` to clarify that `select` always writes to a new output directory and explains hard-linking mechanism. - Add new BibTeX entries for Karlin et al. and Bennett et al. in `doc/references.bib`. - Delete `scripts/smoke_test_index2.sh` which contained end-to-end smoke tests for `obikmer2 index` and `obikmer query`. - Update `src/Cargo.lock` to bump "obiskim" package dependency from 1.4.8 to 1.4.9.
2934 lines
104 KiB
HTML
2934 lines
104 KiB
HTML
|
|
<!doctype html>
|
|
<html lang="en" class="no-js">
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
|
|
|
|
|
|
|
|
<link rel="prev" href="../sibling_partition_unification/">
|
|
|
|
|
|
<link rel="next" href="../../implementation/superkmer/">
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="icon" href="../../assets/images/favicon.png">
|
|
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.7.6">
|
|
|
|
|
|
|
|
<title>Pair-coverage-biased family sampling (discussion) - obiskim</title>
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="../../assets/stylesheets/main.484c7ddc.min.css">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
|
|
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
|
|
|
|
|
|
|
|
<script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
|
|
|
|
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
<body dir="ltr">
|
|
|
|
|
|
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
|
|
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
|
|
<label class="md-overlay" for="__drawer"></label>
|
|
<div data-md-component="skip">
|
|
|
|
|
|
<a href="#motivation-observed-on-primulaceae-180-genomes" class="md-skip">
|
|
Skip to content
|
|
</a>
|
|
|
|
</div>
|
|
<div data-md-component="announce">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<header class="md-header md-header--shadow" data-md-component="header">
|
|
<nav class="md-header__inner md-grid" aria-label="Header">
|
|
<a href="../.." title="obiskim" class="md-header__button md-logo" aria-label="obiskim" data-md-component="logo">
|
|
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
|
|
|
|
</a>
|
|
<label class="md-header__button md-icon" for="__drawer">
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
|
|
</label>
|
|
<div class="md-header__title" data-md-component="header-title">
|
|
<div class="md-header__ellipsis">
|
|
<div class="md-header__topic">
|
|
<span class="md-ellipsis">
|
|
obiskim
|
|
</span>
|
|
</div>
|
|
<div class="md-header__topic" data-md-component="header-topic">
|
|
<span class="md-ellipsis">
|
|
|
|
Pair-coverage-biased family sampling (discussion)
|
|
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
|
|
|
|
|
|
|
|
|
|
</nav>
|
|
|
|
</header>
|
|
|
|
<div class="md-container" data-md-component="container">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<main class="md-main" data-md-component="main">
|
|
<div class="md-main__inner md-grid">
|
|
|
|
|
|
|
|
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
|
|
<div class="md-sidebar__scrollwrap">
|
|
<div class="md-sidebar__inner">
|
|
|
|
|
|
|
|
|
|
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
|
|
<label class="md-nav__title" for="__drawer">
|
|
<a href="../.." title="obiskim" class="md-nav__button md-logo" aria-label="obiskim" data-md-component="logo">
|
|
|
|
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
|
|
|
|
</a>
|
|
obiskim
|
|
</label>
|
|
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../.." class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Home
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../installation/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Installation
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_3" checked>
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_3" id="__nav_3_label" tabindex="0">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Theory
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_3_label" aria-expanded="true">
|
|
<label class="md-nav__title" for="__nav_3">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
|
|
|
|
Theory
|
|
|
|
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../kmers/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Kmers and super-kmers
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../encoding/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
DNA encoding
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../entropy/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Entropy filter
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../minimizer/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Minimizer selection
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../indexing/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Partitioning architecture
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../chance_sharing/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Chance sharing across genomes (discussion)
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../evolutionary_distances/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Central-position SNP distance (discussion)
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../sibling_partition_unification/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Sibling partition unification (discussion)
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--active">
|
|
|
|
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
|
|
|
|
|
|
|
|
<label class="md-nav__link md-nav__link--active" for="__toc">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Pair-coverage-biased family sampling (discussion)
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<a href="./" class="md-nav__link md-nav__link--active">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Pair-coverage-biased family sampling (discussion)
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__title" for="__toc">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Table of contents
|
|
</label>
|
|
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#motivation-observed-on-primulaceae-180-genomes" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Motivation: observed on Primulaceae (180 genomes)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#what-defines-a-target" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
What defines a target
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#nesting-hypothesis-user-unverified" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Nesting hypothesis (user, unverified)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#measuring-nesting-scriptspseudo_alignment_nestingpy" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Measuring nesting: scripts/pseudo_alignment_nesting.py
|
|
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Measuring nesting: scripts/pseudo_alignment_nesting.py">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#result-primulaceae-pseudo-alignment-180-genomes-50-m-columns-uniform-draw-root-as-written" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Result, Primulaceae pseudo-alignment (180 genomes, 5.0 M columns, uniform draw, root as written)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#lift-test-lift-test-margin-preserving-null" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Lift test (--lift-test): margin-preserving null
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#candidate-weighting-strategy-pair-raking-proposal-not-implemented" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Candidate weighting strategy: pair raking (proposal, not implemented)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#alternative-complement-site-classes-with-their-own-models" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Alternative / complement: site classes with their own models
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#literature-on-informative-site-selection-2026-10-07-read-from-search-extracts-not-full-papers" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Literature on informative-site selection (2026-10-07; read from search extracts, not full papers)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#simpler-weight-poorest-pair-of-the-family-user-preference-2026-10-07" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Simpler weight: poorest pair of the family (user preference, 2026-10-07)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Simpler weight: poorest pair of the family (user preference, 2026-10-07)">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#estimating-o-locally-per-partition-per-layer" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Estimating \(O\) locally (per partition / per layer)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#does-the-entropy-bias-distort-pair-representation-measured-2026-10-07" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Does the entropy bias distort pair representation? (measured 2026-10-07)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#entropy-vs-number-of-carrier-genomes-full-index-measured-2026-10-09" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Entropy vs number of carrier genomes, full index (measured 2026-10-09)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#site-concordance-factors-on-the-primulaceae-tree-measured-2026-10-12" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Site concordance factors on the Primulaceae tree (measured 2026-10-12)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#quartet-coverage-measured-2026-10-12-quartet-test" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Quartet coverage (measured 2026-10-12, --quartet-test)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#two-kinds-of-family-loss-sequencing-dropout-vs-divergence-2026-10-12" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Two kinds of family loss: sequencing dropout vs divergence (2026-10-12)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#overlap-vs-mash-distance-on-the-full-index-measured-2026-10-12" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Overlap vs Mash distance on the full index (measured 2026-10-12)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#data-poor-genomes-measured-2026-10-12" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Data-poor genomes (measured 2026-10-12)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#implemented-entropy-annex-parametrised-by-no-ambiguity-2026-10-13" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Implemented: entropy annex parametrised by --no-ambiguity (2026-10-13)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#implemented-quartet-2026-10-13" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Implemented: --quartet (2026-10-13)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#implemented-subsample-renamed-n-sites-nall-2026-10-13" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Implemented: --subsample renamed --n-sites N|all (2026-10-13)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#implemented-pair-balance-2026-10-13" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Implemented: --pair-balance (2026-10-13)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#quota-rounding-fix-and-the-combined-test-on-the-1x-testbed-2026-10-13" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Quota rounding fix, and the combined test on the 1x testbed (2026-10-13)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#implemented-no-distance-matrix-unless-one-is-wanted-2026-10-13" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Implemented: no distance matrix unless one is wanted (2026-10-13)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#implemented-diagnostic-outputs-2026-10-13" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Implemented: diagnostic outputs (2026-10-13)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#combined-draw-on-primulaceae-quartet-pair-balance-entropy-1-measured-2026-10-13" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Combined draw on Primulaceae: --quartet --pair-balance --entropy 1 (measured 2026-10-13)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#tree-level-effect-of-the-combined-draw-scf-on-three-trees-measured-2026-10-16" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Tree-level effect of the combined draw: sCF on three trees (measured 2026-10-16)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#open-questions" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Open questions
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_4" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_4" id="__nav_4_label" tabindex="0">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Implementation
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_4_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_4">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
|
|
|
|
Implementation
|
|
|
|
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/superkmer/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
SuperKmer
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/kmer/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Kmer
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/chunkreader/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Chunk reader
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/pipeline/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Construction pipeline
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/obipipeline/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
obipipeline library
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/storage/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
On-disk storage
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/mphf/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
MPHF selection
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/mphf_batch_queries/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
MPHF batch queries (inventory)
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/unitig_evidence/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Unitig evidence encoding
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/evidence_elimination/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Evidence elimination (discussion)
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/layer_tier/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
obikindex layer tier
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/persistent_compact_int_vec/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
PersistentCompactIntVec
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/persistent_bit_vec/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
PersistentBitVec
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/merge/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Merge command
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/merge_parallelism/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Merge parallelism & memory
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/merge_mmap_audit/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Merge mmap audit (2026-11)
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/merge_scaling/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Merge scaling (open)
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/filtering/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Kmer filtering
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/select/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Select command
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/obitaxonomy/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
obitaxonomy crate
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/benchmark_query_testing/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Benchmark: query-path testing
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../implementation/partition_layer_cache/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Partition and layer caching (discussion)
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item md-nav__item--nested">
|
|
|
|
|
|
|
|
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_5" >
|
|
|
|
|
|
<label class="md-nav__link" for="__nav_5" id="__nav_5_label" tabindex="0">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Architecture
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span class="md-nav__icon md-icon"></span>
|
|
</label>
|
|
|
|
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_5_label" aria-expanded="false">
|
|
<label class="md-nav__title" for="__nav_5">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
|
|
|
|
Architecture
|
|
|
|
|
|
</label>
|
|
<ul class="md-nav__list" data-md-scrollfix>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../architecture/sequences/invariant/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Sequences
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../architecture/index_architecture/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Kmer index
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../architecture/siblings/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Sibling annex
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../architecture/hot_resume_memoization/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
Hot resume and memoization
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../architecture/numa_worker_pools/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
NUMA-aware worker pools
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="md-nav__item">
|
|
<a href="../../architecture/numa_partition_runner/" class="md-nav__link">
|
|
|
|
|
|
|
|
<span class="md-ellipsis">
|
|
|
|
|
|
NUMA-aware partition runner
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a>
|
|
</li>
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
|
|
<div class="md-sidebar__scrollwrap">
|
|
<div class="md-sidebar__inner">
|
|
|
|
|
|
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
|
|
|
|
|
|
|
|
|
|
<label class="md-nav__title" for="__toc">
|
|
<span class="md-nav__icon md-icon"></span>
|
|
Table of contents
|
|
</label>
|
|
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#motivation-observed-on-primulaceae-180-genomes" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Motivation: observed on Primulaceae (180 genomes)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#what-defines-a-target" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
What defines a target
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#nesting-hypothesis-user-unverified" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Nesting hypothesis (user, unverified)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#measuring-nesting-scriptspseudo_alignment_nestingpy" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Measuring nesting: scripts/pseudo_alignment_nesting.py
|
|
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Measuring nesting: scripts/pseudo_alignment_nesting.py">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#result-primulaceae-pseudo-alignment-180-genomes-50-m-columns-uniform-draw-root-as-written" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Result, Primulaceae pseudo-alignment (180 genomes, 5.0 M columns, uniform draw, root as written)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#lift-test-lift-test-margin-preserving-null" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Lift test (--lift-test): margin-preserving null
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#candidate-weighting-strategy-pair-raking-proposal-not-implemented" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Candidate weighting strategy: pair raking (proposal, not implemented)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#alternative-complement-site-classes-with-their-own-models" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Alternative / complement: site classes with their own models
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#literature-on-informative-site-selection-2026-10-07-read-from-search-extracts-not-full-papers" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Literature on informative-site selection (2026-10-07; read from search extracts, not full papers)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#simpler-weight-poorest-pair-of-the-family-user-preference-2026-10-07" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Simpler weight: poorest pair of the family (user preference, 2026-10-07)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
<nav class="md-nav" aria-label="Simpler weight: poorest pair of the family (user preference, 2026-10-07)">
|
|
<ul class="md-nav__list">
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#estimating-o-locally-per-partition-per-layer" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Estimating \(O\) locally (per partition / per layer)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</nav>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#does-the-entropy-bias-distort-pair-representation-measured-2026-10-07" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Does the entropy bias distort pair representation? (measured 2026-10-07)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#entropy-vs-number-of-carrier-genomes-full-index-measured-2026-10-09" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Entropy vs number of carrier genomes, full index (measured 2026-10-09)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#site-concordance-factors-on-the-primulaceae-tree-measured-2026-10-12" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Site concordance factors on the Primulaceae tree (measured 2026-10-12)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#quartet-coverage-measured-2026-10-12-quartet-test" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Quartet coverage (measured 2026-10-12, --quartet-test)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#two-kinds-of-family-loss-sequencing-dropout-vs-divergence-2026-10-12" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Two kinds of family loss: sequencing dropout vs divergence (2026-10-12)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#overlap-vs-mash-distance-on-the-full-index-measured-2026-10-12" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Overlap vs Mash distance on the full index (measured 2026-10-12)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#data-poor-genomes-measured-2026-10-12" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Data-poor genomes (measured 2026-10-12)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#implemented-entropy-annex-parametrised-by-no-ambiguity-2026-10-13" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Implemented: entropy annex parametrised by --no-ambiguity (2026-10-13)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#implemented-quartet-2026-10-13" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Implemented: --quartet (2026-10-13)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#implemented-subsample-renamed-n-sites-nall-2026-10-13" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Implemented: --subsample renamed --n-sites N|all (2026-10-13)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#implemented-pair-balance-2026-10-13" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Implemented: --pair-balance (2026-10-13)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#quota-rounding-fix-and-the-combined-test-on-the-1x-testbed-2026-10-13" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Quota rounding fix, and the combined test on the 1x testbed (2026-10-13)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#implemented-no-distance-matrix-unless-one-is-wanted-2026-10-13" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Implemented: no distance matrix unless one is wanted (2026-10-13)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#implemented-diagnostic-outputs-2026-10-13" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Implemented: diagnostic outputs (2026-10-13)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#combined-draw-on-primulaceae-quartet-pair-balance-entropy-1-measured-2026-10-13" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Combined draw on Primulaceae: --quartet --pair-balance --entropy 1 (measured 2026-10-13)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#tree-level-effect-of-the-combined-draw-scf-on-three-trees-measured-2026-10-16" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Tree-level effect of the combined draw: sCF on three trees (measured 2026-10-16)
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li class="md-nav__item">
|
|
<a href="#open-questions" class="md-nav__link">
|
|
<span class="md-ellipsis">
|
|
|
|
Open questions
|
|
|
|
</span>
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="md-content" data-md-component="content">
|
|
|
|
<article class="md-content__inner md-typeset">
|
|
|
|
|
|
|
|
|
|
|
|
<h1>Pair-coverage-biased family sampling (discussion)</h1>
|
|
|
|
<p>&@")--# Pair-coverage-biased family sampling (discussion, 2026-10-07)</p>
|
|
<p>Idea: bias the family sample used by <code>--pseudo-alignment</code>/<code>--sankoff</code>/<code>snp-*</code> so that the <code>family_overlap</code> matrix of the <em>sample</em> is as uniform as possible, compensating the scarcity of shared families between distant species. Complements, does not replace, the existing proportional-by-partition and entropy-biased draws (see user doc, <em>Sampling design</em>).</p>
|
|
<h2 id="motivation-observed-on-primulaceae-180-genomes">Motivation: observed on Primulaceae (180 genomes)</h2>
|
|
<p>Scatter of patristic distance (IQ-TREE on the pseudo-alignment) vs. normalized <code>family_overlap</code> shows three pair classes:</p>
|
|
<ul>
|
|
<li>close intra-genus pairs: high overlap, well resolved;</li>
|
|
<li>inter-genus plus distant intra-genus pairs: overlap collapses by ~2 orders of magnitude, one large noisy cloud;</li>
|
|
<li>a small low-overlap cluster at the largest distances, plausibly a few poorly sequenced genomes (user hypothesis, unverified; the tree shows one tip, <code>Androsace_saussurei--PHA010690</code>, with a 2.9 terminal branch).</li>
|
|
</ul>
|
|
<p>Uniform family draw reproduces this imbalance in the pseudo-alignment: distant pairs share few informative columns, close pairs many. The tree quality for deep splits is then limited by sampled-column count on those pairs, not by the total number of families.</p>
|
|
<h2 id="what-defines-a-target">What defines a target</h2>
|
|
<p>A family <span class="arithmatex">\(f\)</span> is carried by a genome set <span class="arithmatex">\(S_f\)</span> and contributes to every pair in <span class="arithmatex">\(S_f \times S_f\)</span>. For a sample <span class="arithmatex">\(\mathcal{F}\)</span> with inclusion probabilities <span class="arithmatex">\(\pi_f\)</span>, the expected sample overlap of pair <span class="arithmatex">\((i,j)\)</span> is</p>
|
|
<div class="arithmatex">\[\mathbb{E}[O^{\mathcal{F}}_{ij}] = \sum_{f:\, i,j\in S_f} \pi_f\]</div>
|
|
<p>The goal is a <span class="arithmatex">\(\pi\)</span> making this approximately constant over pairs. The full-index <span class="arithmatex">\(O_{ij}\)</span> (already computed by <code>--family-overlap</code>) is the pool size per pair; <span class="arithmatex">\(\min_{ij} O_{ij}\)</span> is a hard ceiling on the flat level reachable.</p>
|
|
<h2 id="nesting-hypothesis-user-unverified">Nesting hypothesis (user, unverified)</h2>
|
|
<p>Families covering the poorest pairs also cover the richest ones: absent genome-skimming sampling bias (locus dropout), a family conserved across distant species is not expected to be missing between closer ones. If it holds, <span class="arithmatex">\(S_f\)</span> is approximately a clade closure and the family pool is nested by pair distance, which changes the design:</p>
|
|
<ul>
|
|
<li>no sequential/stateful draw needed: a family's weight depends only on its own reach (farthest pair covered, or equivalently its coverage of the poorest pairs), computable in one pass;</li>
|
|
<li>flattening reduces to a monotone reweighting by reach: keep (nearly) all long-reach families, thin the short-reach ones, until the sample overlap of close pairs drops to the level of distant ones.</li>
|
|
</ul>
|
|
<p>My earlier remark that the weight is stateful (depends on what other families already covered) holds only without nesting.</p>
|
|
<h2 id="measuring-nesting-scriptspseudo_alignment_nestingpy">Measuring nesting: <code>scripts/pseudo_alignment_nesting.py</code></h2>
|
|
<p>Works on a pseudo-alignment FASTA plus the IQ-TREE treefile (columns = families; a call is any character other than <code>-</code>/<code>?</code>). Outputs the sample's <code>family_overlap</code> matrix and, per clade-size stratum, the <em>completeness</em> <span class="arithmatex">\(|S_f|/|C(S_f)|\)</span> where <span class="arithmatex">\(C(S_f)\)</span> is the smallest clade containing <span class="arithmatex">\(S_f\)</span>. Tree rooted as written in the Newick unless <code>--outgroup</code>. Uses the already-existing families × genomes presence structure only; no <code>S_f</code> is stored (clade of a column = LCA of its first and last carrier in DFS leaf order, precomputed 180×180 matrix).</p>
|
|
<h3 id="result-primulaceae-pseudo-alignment-180-genomes-50-m-columns-uniform-draw-root-as-written">Result, Primulaceae pseudo-alignment (180 genomes, 5.0 M columns, uniform draw, root as written)</h3>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Clade size</th>
|
|
<th>Families</th>
|
|
<th>Mean completeness</th>
|
|
<th>Clade-closed</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>2</td>
|
|
<td>145 047</td>
|
|
<td>1.00</td>
|
|
<td>100 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td>3-4</td>
|
|
<td>272 918</td>
|
|
<td>0.71</td>
|
|
<td>20 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td>5-8</td>
|
|
<td>503 114</td>
|
|
<td>0.45</td>
|
|
<td>0.6 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td>9-16</td>
|
|
<td>637 896</td>
|
|
<td>0.35</td>
|
|
<td>0.1 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td>17-32</td>
|
|
<td>1 656 229</td>
|
|
<td>0.21</td>
|
|
<td>0 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td>33-64</td>
|
|
<td>299 632</td>
|
|
<td>0.18</td>
|
|
<td>0 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td>65-128</td>
|
|
<td>181 126</td>
|
|
<td>0.08</td>
|
|
<td>0 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td>129-180</td>
|
|
<td>1 307 452</td>
|
|
<td>0.12</td>
|
|
<td>0 %</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Overall 4.1 % clade-closed, mean completeness 0.275; off-diagonal overlap min 4, median 1 665, max 387 057, CV 1.57. <strong>Strict nesting does not hold on this sample.</strong> Caveats: unrooted tree, so the 129-180 stratum is inflated by families spanning the arbitrary root (rerun with <code>--outgroup</code> pending); this is the sample fed to IQ-TREE, not the full index; absence symbols <code>-</code>/<code>?</code> both count as absent.</p>
|
|
<h3 id="lift-test-lift-test-margin-preserving-null">Lift test (<code>--lift-test</code>): margin-preserving null</h3>
|
|
<p>Question: do families covering a rare pair <span class="arithmatex">\((A,B)\)</span> also cover an abundant pair <span class="arithmatex">\((A,C)\)</span> more often than margins imply? For each <span class="arithmatex">\(A\)</span>, <span class="arithmatex">\(B\)</span> = its 10 % rarest partners, <span class="arithmatex">\(C\)</span> = its 10 % most abundant (ranked on pair overlap). Null: curveball swap randomisation of the genome × family matrix (exact row and column sums), re-selecting <span class="arithmatex">\(B\)</span>/<span class="arithmatex">\(C\)</span> in every replicate with the same procedure. 200 754 sampled columns, 20 null replicates, 5 000 trades between replicates.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Statistic</th>
|
|
<th>Observed</th>
|
|
<th>Null</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="arithmatex">\(T=P(C\mid A,B)=O_{ABC}/O_{AB}\)</span></td>
|
|
<td>0.559</td>
|
|
<td>0.498 ± 0.003 (no replicate ≥ observed, p at floor 1/21)</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="arithmatex">\(L=\sum n_A O_{ABC}/\sum O_{AB}O_{AC}\)</span></td>
|
|
<td>1.18</td>
|
|
<td>1.694 ± 0.004</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>The two statistics disagree, not contradictorily: <span class="arithmatex">\(T\)</span> above null supports the "positive association beyond margins" statement; <span class="arithmatex">\(L\)</span> below null says that, relative to <span class="arithmatex">\(P(C\mid A)\)</span>, knowing <span class="arithmatex">\(B\)</span> adds less than under the null — the observed abundant partners of <span class="arithmatex">\(A\)</span> are far more abundant than null ones (phylogenetic structure inflates the <span class="arithmatex">\(L\)</span> denominator). Unverified: mixing of the chain (is 5 000 trades enough? the tiny null sd may reflect correlation), sensitivity to the 10 % threshold and to the 200 k-column subsample.</p>
|
|
<p>Combined reading: association exists but is patchy; a reach-only weight is not enough, weighting must be per presence pattern <span class="arithmatex">\(S_f\)</span>.</p>
|
|
<h2 id="candidate-weighting-strategy-pair-raking-proposal-not-implemented">Candidate weighting strategy: pair raking (proposal, not implemented)</h2>
|
|
<p>Goal: inclusion probabilities <span class="arithmatex">\(\pi_f\)</span> with <span class="arithmatex">\(\sum_{f\ni i,j}\pi_f\approx c\)</span> for all pairs.</p>
|
|
<ol>
|
|
<li>First-order weight: <span class="arithmatex">\(w_f=\sum_{i,j\in S_f}1/O_{ij}\)</span> (draw a pair uniformly, then a family uniformly among those covering it). With the presence matrix <span class="arithmatex">\(P\)</span> and <span class="arithmatex">\(R=1/O\)</span>, <span class="arithmatex">\(w=\tfrac12\,\mathrm{rowsum}(P\odot RP)\)</span>, one pass in the existing chunked loop, no <span class="arithmatex">\(S_f\)</span> storage.</li>
|
|
<li>Iterate (raking/IPF with one multiplier per pair): update <span class="arithmatex">\(R_{ij}\)</span> from the overlap the current <span class="arithmatex">\(\pi\)</span> yields, recompute <span class="arithmatex">\(w_f\)</span>; corrects the fact that large families are drawn for many pairs at once. <span class="arithmatex">\(\pi_f=\min(1,c\,w_f)\)</span>, <span class="arithmatex">\(c\)</span> set to hit the target sample size; independent Poisson draw per family.</li>
|
|
<li>Control: recompute the sample's <code>family_overlap</code> and its CV with the script above.</li>
|
|
</ol>
|
|
<p>Pre-conditions: exclude anecdotal genomes first (e.g. <code>Androsace_saussurei--PHA010690</code>, terminal branch 2.9), else their tiny <span class="arithmatex">\(O_{ij}\)</span> dominate <span class="arithmatex">\(R\)</span>. Overlap uniformity is only a proxy: information for a deep split is informative sites across it, not mere co-presence; to be checked on node support of the resulting tree. Unknown: whether long-reach families are rare because conserved-single-copy or because repeats/misassemblies (the latter would be amplified by up-weighting).</p>
|
|
<h2 id="alternative-complement-site-classes-with-their-own-models">Alternative / complement: site classes with their own models</h2>
|
|
<p>Analogy with multigene supermatrices: loci differ in rate <em>and</em> in taxon occupancy. Families covering rare pairs (long reach, conserved, slow) vs. families covering close pairs only could be two (or a few) site classes, each with its own substitution model / branch-length scale (IQ-TREE partitions; edge-proportional vs edge-linked options to be checked in the manual). Independent of the weighting: sampling fixes scarcity, partitioning fixes rate heterogeneity; with class-specific scales, oversampling a class would not distort that class's branch lengths, removing the need for <span class="arithmatex">\(1/\pi_f\)</span> reweighting (IQ-TREE support for per-site weights unverified).</p>
|
|
<p>Caveats: reach is a continuum, two classes is a simplification and there is no criterion for the cut; class membership is defined from presence patterns, hence correlated with the data the model sees (assignment bias, worst with <code>?</code> missing data; magnitude not assessed); partitioning does not fix repeats/misassembly, it only gives them their own rate.</p>
|
|
<p>The pseudo-alignment already keeps only variable families, so branch lengths are not substitutions/site anyway (ascertainment bias, handled by <code>+ASC</code>, see the constant-column fix section in <a href="../evolutionary_distances/">evolutionary_distances.md</a>). With partitions the ascertainment correction must be per class: each class excludes a different number of constant sites. Whether the existing fix applies per partition is unchecked.</p>
|
|
<p>Literature: see the next section.</p>
|
|
<h2 id="literature-on-informative-site-selection-2026-10-07-read-from-search-extracts-not-full-papers">Literature on informative-site selection (2026-10-07; read from search extracts, not full papers)</h2>
|
|
<ul>
|
|
<li><strong>Phylogenetic informativeness.</strong> Townsend 2007 (<em>Syst. Biol.</em> 56:222-231) links each site's rate of change to its power to resolve splits at a given depth: invariant sites are useless, saturated sites misleading, with an optimum in between that depends on the age of the split. Implemented online as PhyDesign (requires an ultrametric tree). Relevance: supports an entropy centre <span class="arithmatex">\(\mu\)</span> that depends on depth (pair distance) rather than a single value; cf. the <span class="arithmatex">\(\mu(n)\)</span> discussion.</li>
|
|
<li><strong>Entropy-based trimming.</strong> BMGE (Criscuolo & Gribaldo 2010, <em>BMC Evol. Biol.</em> 10:210) computes a per-character entropy-like score weighted by a similarity matrix and removes regions above a threshold. Uses entropy to <em>discard</em> over-variable characters, the opposite direction of the Gaussian band here.</li>
|
|
<li><strong>Saturation / fast sites.</strong> Classical removal methods: Slow-Fast, LQP, TIGER, Observed Variability. Counter-evidence (Tree-of-Life protein datasets, PMC10609509): even the fastest sites carry reliable signal, trimming them can lower accuracy, slow sites recover fewer true bipartitions than the fastest. Argument against penalizing high entropy (<span class="arithmatex">\(H\ge2\)</span>) without checking that those families do not carry the deep signal; domain (conserved proteins) differs from central-position SNPs, transfer unverified.</li>
|
|
<li><strong>Taxon-coverage theory.</strong> Sanderson, McMahon & Steel 2010 (<em>BMC Evol. Biol.</em>, "Phylogenomics with incomplete taxon coverage: the limits to inference") characterise phylogenetically decisive collections of taxon sets via the four-way partition property: when the coverage pattern suffices to determine the tree uniquely irrespective of signal. Formal frame for pair-coverage sampling; applicability at 180 genomes not assessed.</li>
|
|
</ul>
|
|
<p>Takeaways to check before weighting: (i) whether high-entropy families are the deep-signal ones (entropy vs carrier count measured, see below; the cross with reach is still open); (ii) depth-dependent entropy centre; (iii) whether a decisiveness criterion can serve as a sufficiency test for the sample's pair coverage.</p>
|
|
<h2 id="simpler-weight-poorest-pair-of-the-family-user-preference-2026-10-07">Simpler weight: poorest pair of the family (user preference, 2026-10-07)</h2>
|
|
<p><span class="arithmatex">\(w_f=1/\min_{i,j\in S_f}O_{ij}\)</span>, <span class="arithmatex">\(\pi_f=\min(1,c\,w_f)\)</span>. Equivalent in spirit to a reach weight but measured on actual overlaps (no tree needed), same <span class="arithmatex">\(O(|S_f|^2)\)</span> cost per family as the sum form. Limit: it ignores that large families also feed already-abundant pairs; flattening from above then relies only on dropping short-reach families, which is exact only under nesting, and nesting holds partially (see measurements). Untested.</p>
|
|
<h3 id="estimating-o-locally-per-partition-per-layer">Estimating <span class="arithmatex">\(O\)</span> locally (per partition / per layer)</h3>
|
|
<ul>
|
|
<li><strong>Per layer: not representative.</strong> A layer is an increment of kmer content added to a partition (typically one <code>merge</code>), not a batch of genomes; all genome columns exist in every layer (<code>UserDocMD/formats/index_layout.md</code>). Layer content is dominated by kmers novel at merge time, so a layer's <span class="arithmatex">\(O_{ij}\)</span> reflects merge order, not the index-wide distribution; not an unbiased estimator of the global <span class="arithmatex">\(O_{ij}\)</span>.</li>
|
|
<li><strong>Per partition: valid only if partitions are exchangeable samples of families</strong> (hash-based; not verified, minimizer distribution may be skewed). Even then, the pairs that matter are the rare ones, with near-zero count per partition; a <code>min</code> over noisy estimates is biased downward (winner's curse), weights would go to pairs that were unlucky in that partition rather than globally poorest.</li>
|
|
<li><strong>Recommended:</strong> compute <span class="arithmatex">\(O\)</span> globally once (the <code>--family-overlap</code> scan already exists), apply the weight locally per partition, keeping partitions independent. Without an extra pass: pilot estimate on a random subset of partitions.</li>
|
|
<li><strong>Sequential variant:</strong> update the <span class="arithmatex">\(O\)</span> estimate as partitions are processed in random order, boosting still-undersampled pairs. Self-correcting but breaks partition independence and makes the result order-dependent.</li>
|
|
<li><strong>Quota consequence:</strong> the current per-partition quota is proportional to candidate-family count; with weights it must be proportional to the partition's weight mass <span class="arithmatex">\(\sum_f w_f\)</span>, otherwise partitions rich in high-weight families are undersampled.</li>
|
|
</ul>
|
|
<h2 id="does-the-entropy-bias-distort-pair-representation-measured-2026-10-07">Does the entropy bias distort pair representation? (measured 2026-10-07)</h2>
|
|
<p>Sample drawn with <code>--entropy 1 --entropy-sd 0.5</code> (μ=1 explicit, σ default 0.5): family weight <span class="arithmatex">\(\exp(-2(H-1)^2)\)</span>, <span class="arithmatex">\(H\)</span> = <code>entropy15</code> in bits; weight 1 at <span class="arithmatex">\(H=1\)</span>, 0.135 at <span class="arithmatex">\(H=0\)</span> or <span class="arithmatex">\(2\)</span>, <span class="arithmatex">\(\approx 3\!\times\!10^{-4}\)</span> at <span class="arithmatex">\(H=3\)</span>.</p>
|
|
<p>Comparison, per genome pair, of the full-index <code>family_overlap</code> <span class="arithmatex">\(O^{\text{full}}\)</span> (index scan) to the sample's overlap <span class="arithmatex">\(O^{\text{samp}}\)</span> (5.0 M columns), sampling fraction <span class="arithmatex">\(r_{ij}=O^{\text{samp}}_{ij}/O^{\text{full}}_{ij}\)</span> (uniform draw would give constant <span class="arithmatex">\(r\)</span>):</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Quantity</th>
|
|
<th>Value</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Spearman <span class="arithmatex">\(O^{\text{full}}\)</span> vs <span class="arithmatex">\(O^{\text{samp}}\)</span></td>
|
|
<td>0.994 (Pearson on logs 0.998): ranking preserved</td>
|
|
</tr>
|
|
<tr>
|
|
<td>global fraction <span class="arithmatex">\(\sum O^{\text{samp}}/\sum O^{\text{full}}\)</span></td>
|
|
<td>0.52 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="arithmatex">\(r\)</span> quantiles 5 / 50 / 95 %</td>
|
|
<td>0.0025 / 0.0037 / 0.0055</td>
|
|
</tr>
|
|
<tr>
|
|
<td>slope <span class="arithmatex">\(\log r\)</span> vs <span class="arithmatex">\(\log O^{\text{full}}\)</span></td>
|
|
<td>+0.12</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Spearman(<span class="arithmatex">\(r\)</span>, patristic distance)</td>
|
|
<td>−0.71</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Per decile of <span class="arithmatex">\(O^{\text{full}}\)</span>, median <span class="arithmatex">\(r\)</span> rises from 0.0027 (poorest decile) to 0.0053 (three richest, plateau): the poorest pairs are represented about half as much as the richest, so the draw amplifies the imbalance. <span class="arithmatex">\(r\)</span> climbs slowly over deciles 1-6 (0.0027 to 0.0037), jumps at deciles 7-8 (0.0045-0.0052), where the <span class="arithmatex">\(O^{\text{full}}\)</span> distribution has a gap (689 k to 11.6 M, presumably close intra-clade pairs, unchecked).</p>
|
|
<p>Not established: (a) causality — a dependence of <span class="arithmatex">\(r\)</span> on pair richness is compatible with the entropy filter but no uniform control draw of the same size exists; (b) noise — the poorest sample pairs have tiny counts (min 4).</p>
|
|
<p><strong>Candidate mechanism: first hypothesis refuted, see the next section.</strong> I first suggested that long-reach families, carried by many divergent genomes, spread over several states (<span class="arithmatex">\(H\approx2\text{-}3\)</span>) and are downweighted from above by the Gaussian. The full entropy table (next section) shows the opposite: families with many carriers are mostly <em>low</em>-entropy, and are downweighted from below.</p>
|
|
<p><strong>Consequence for the pair-weight proposal:</strong> entropy and reach are likely correlated, not independent criteria. Since the entropy weight of each family is known, the pair weight can compensate it exactly (divide by it) rather than compose with it; order of the two filters must then be defined.</p>
|
|
<h2 id="entropy-vs-number-of-carrier-genomes-full-index-measured-2026-10-09">Entropy vs number of carrier genomes, full index (measured 2026-10-09)</h2>
|
|
<p>Source: <code>phylo --shannon</code>, which is <strong>always a full, unsampled scan</strong> of every non-monomorphic minorant of every layer (<code>SiblingExt::shannon_entropy_csv(path)</code> takes no <code>subsample</code>/<code>entropy_bias</code> argument; <code>--subsample</code>/<code>--entropy</code> apply only to <code>--pseudo-alignment</code>/<code>--sankoff</code>/<code>snp-*</code>). Here: 19.7 GB CSV, 535 257 857 families, read in 11 s with DuckDB (no in-memory load). <code>UserDocMD/usage/phylo.md</code> line 121 ("<code>--subsample N --shannon</code> gives a bounded diagnostic sample") is stale and contradicts line 55 and the code; to fix.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Carriers <span class="arithmatex">\(n\)</span></th>
|
|
<th>Families</th>
|
|
<th>mean <span class="arithmatex">\(H\)</span></th>
|
|
<th>median <span class="arithmatex">\(H\)</span></th>
|
|
<th><span class="arithmatex">\(P(H<0.5)\)</span></th>
|
|
<th><span class="arithmatex">\(P(H\ge1.5)\)</span></th>
|
|
<th>mean weight (<span class="arithmatex">\(\mu=1,\sigma=0.5\)</span>)</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>2</td>
|
|
<td>163.3 M</td>
|
|
<td>0.66</td>
|
|
<td>1.00</td>
|
|
<td>34.5 %</td>
|
|
<td>0 %</td>
|
|
<td>0.70</td>
|
|
</tr>
|
|
<tr>
|
|
<td>3-4</td>
|
|
<td>104.6 M</td>
|
|
<td>0.94</td>
|
|
<td>0.92</td>
|
|
<td>0.5 %</td>
|
|
<td>7.9 %</td>
|
|
<td>0.93</td>
|
|
</tr>
|
|
<tr>
|
|
<td>5-8</td>
|
|
<td>91.8 M</td>
|
|
<td>0.83</td>
|
|
<td>0.72</td>
|
|
<td>0.1 %</td>
|
|
<td>4.6 %</td>
|
|
<td>0.80</td>
|
|
</tr>
|
|
<tr>
|
|
<td>9-16</td>
|
|
<td>62.7 M</td>
|
|
<td>0.70</td>
|
|
<td>0.50</td>
|
|
<td>43.6 %</td>
|
|
<td>4.9 %</td>
|
|
<td>0.66</td>
|
|
</tr>
|
|
<tr>
|
|
<td>17-32</td>
|
|
<td>45.4 M</td>
|
|
<td>0.59</td>
|
|
<td>0.35</td>
|
|
<td>58.9 %</td>
|
|
<td>5.9 %</td>
|
|
<td>0.53</td>
|
|
</tr>
|
|
<tr>
|
|
<td>33-64</td>
|
|
<td>48.1 M</td>
|
|
<td>0.34</td>
|
|
<td>0.19</td>
|
|
<td>79.7 %</td>
|
|
<td>1.1 %</td>
|
|
<td>0.40</td>
|
|
</tr>
|
|
<tr>
|
|
<td>65-128</td>
|
|
<td>19.1 M</td>
|
|
<td>0.37</td>
|
|
<td>0.18</td>
|
|
<td>77.4 %</td>
|
|
<td>3.8 %</td>
|
|
<td>0.37</td>
|
|
</tr>
|
|
<tr>
|
|
<td>129-180</td>
|
|
<td>0.19 M</td>
|
|
<td>0.83</td>
|
|
<td>0.47</td>
|
|
<td>53.0 %</td>
|
|
<td>21.4 %</td>
|
|
<td>0.46</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Findings:</p>
|
|
<ul>
|
|
<li>Families with many carriers are mostly one dominant state plus rare variants (<span class="arithmatex">\(H<0.5\)</span> for ~77-80 % at <span class="arithmatex">\(n\ge33\)</span>); only 1-4 % have <span class="arithmatex">\(H\ge1.5\)</span>. The Gaussian at <span class="arithmatex">\(\mu=1\)</span> therefore penalizes them from the <strong>low</strong> side (weight 0.135 at <span class="arithmatex">\(H=0\)</span>), not the high side.</li>
|
|
<li>Relative to a uniform draw, expected inclusion is about ×1.32 at 3-4 carriers and ×0.53-0.56 at 33-128 carriers: a factor ~2.4 between small and large <span class="arithmatex">\(n\)</span>. Same order as the ~2× pair-level undersampling of poor pairs measured above; compatible, but a family-level ratio is not a pair-level one, so causality remains unproven (no uniform control draw).</li>
|
|
<li>The filter does what it is designed for (drop near-autapomorphic variants), but those low-entropy high-<span class="arithmatex">\(n\)</span> families are also the ones covering distant pairs, hence the side effect.</li>
|
|
<li>Informative high-<span class="arithmatex">\(n\)</span> families are scarce: at <span class="arithmatex">\(n>32\)</span> only ~19 % have <span class="arithmatex">\(H\in[0.5,1.5)\)</span>, and the 129-180 class is 0.04 % of all families. Flattening deep-pair coverage works on little informative material whatever the weights.</li>
|
|
<li>Consequence for a <span class="arithmatex">\(\mu(n)\)</span> that grows with <span class="arithmatex">\(n\)</span>: it would not recover these families (80 % sit below 0.5 bit); what matters at large <span class="arithmatex">\(n\)</span> is the share of families in the band around 1 bit, not the position of the centre. Conditional weight <span class="arithmatex">\(w_H(f)/E[w_H\mid n_f]\)</span> remains an option to make the entropy filter neutral to <span class="arithmatex">\(n\)</span>; <span class="arithmatex">\(E[w_H\mid n]\)</span> is now available from this table.</li>
|
|
</ul>
|
|
<p>Limit: the table has <code>n_genomes_present</code> but not the reach of the family, so the link to specific pairs is still not measured.</p>
|
|
<h2 id="site-concordance-factors-on-the-primulaceae-tree-measured-2026-10-12">Site concordance factors on the Primulaceae tree (measured 2026-10-12)</h2>
|
|
<p>Command (IQ-TREE 3.1.3): <code>iqtree3 -t <treefile> -s <alignment> -m GTR+G4+ASC --scfl 100 --cf-verbose -T 5 --prefix concord</code>. With <code>-t</code> plus <code>-m</code>, IQ-TREE did <strong>not</strong> just annotate the reference tree: it ran a full ML search started from it (102 iterations, ~59 h wall-clock). <code>concord.treefile</code> differs from the input treefile by one bipartition (Robinson-Foulds 2), so sCF refer to the re-inferred tree. Without <code>-m</code>, ModelFinder is launched and required 157 GB (first attempt failed). The log also warns that all 180 sequences contain more than 50 % gaps/ambiguity. <code>sN</code> below = informative sites averaged over the 100 sampled quartets of a branch (alignment: 5 003 414 columns).</p>
|
|
<p><strong>Deep Primula/Androsace interface: too few informative sites (data scarcity).</strong></p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Node</th>
|
|
<th>Tips (Primula / Androsace)</th>
|
|
<th>sCF</th>
|
|
<th>sDF1</th>
|
|
<th>sDF2</th>
|
|
<th><code>sN</code></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>209</td>
|
|
<td>67 (43 / 24)</td>
|
|
<td>27</td>
|
|
<td>47</td>
|
|
<td>26</td>
|
|
<td>17</td>
|
|
</tr>
|
|
<tr>
|
|
<td>210</td>
|
|
<td>66 (43 / 23)</td>
|
|
<td>37</td>
|
|
<td>33</td>
|
|
<td>30</td>
|
|
<td>43</td>
|
|
</tr>
|
|
<tr>
|
|
<td>208</td>
|
|
<td>74 (50 / 24)</td>
|
|
<td>54</td>
|
|
<td>16</td>
|
|
<td>29</td>
|
|
<td>190</td>
|
|
</tr>
|
|
<tr>
|
|
<td>211</td>
|
|
<td>24 (2 / 22)</td>
|
|
<td>64</td>
|
|
<td>18</td>
|
|
<td>18</td>
|
|
<td>226</td>
|
|
</tr>
|
|
<tr>
|
|
<td>212</td>
|
|
<td>21 (2 / 19)</td>
|
|
<td>30</td>
|
|
<td>38</td>
|
|
<td>32</td>
|
|
<td>184</td>
|
|
</tr>
|
|
<tr>
|
|
<td>216</td>
|
|
<td>10 (2 / 8)</td>
|
|
<td>21</td>
|
|
<td>47</td>
|
|
<td>32</td>
|
|
<td>7</td>
|
|
</tr>
|
|
<tr>
|
|
<td>217</td>
|
|
<td>9 (1 / 8)</td>
|
|
<td>43</td>
|
|
<td>20</td>
|
|
<td>36</td>
|
|
<td>7</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Quartets crossing these nodes have tens to a few hundred informative sites out of 5 M columns, the quantitative counterpart of the pair-overlap scarcity. Primula tips are spread over several nodes mixed with Androsace (e.g. 43 + 24 at node 209); no monophyletic Primula in this tree.</p>
|
|
<p><strong>Within Androsace: conflict, not scarcity.</strong> Nodes 283 (72 Androsace, <code>sN</code> 17 127), 292 (49 tips, 10 335), 305 (22, 11 980), 342 (11, 6 566) have thousands of informative sites but sCF 33-37 % with both alternatives nearly as supported: sites split almost evenly among the three quartet topologies. More sites would not fix this; cause not established (a poor fit of a tree model to intra-species divergence is one hypothesis, untested). Node 185 (23 Androsace): sDF1 53.6 % > sCF 30.6 %, a majority of the 893 sites prefer an alternative (real conflict).</p>
|
|
<p><strong>Well-supported nodes have long branches:</strong> node 296 (45 tips, length 0.23, sCF 90 %), 341 (0.21, 91 %), 330 (0.09, 85.5 %), 181 (0.099, 89.5 %); most branches of length 0.01-0.05 have sCF 33-45 %. Degenerate: node 186 (length 0.001, <code>sN</code> 0.37) and 187 (<code>sN</code> 2.2) carry no informative site.</p>
|
|
<p>Median sCF shows no gradient with clade size (about 39-48 % in every class), so the clade-size class hides the effect; the scarcity is specific to the interface nodes above.</p>
|
|
<p><strong>Implication for sampling.</strong> The part a sampling design can address is the interface scarcity: select families carried by genomes from the four groups around each target node (a quartet-targeted selection) rather than flattening the whole pair matrix. Not assessed: how many such families the index holds (the <code>sN</code> of nodes 209 and 216 suggests few). For the intra-Androsace conflict no sampling strategy is suggested by these measurements alone.</p>
|
|
<h2 id="quartet-coverage-measured-2026-10-12-quartet-test">Quartet coverage (measured 2026-10-12, <code>--quartet-test</code>)</h2>
|
|
<p><code>scripts/pseudo_alignment_nesting.py --quartet-test --quartets N</code> draws random genome quartets and counts exactly the columns where all four carry a call, stratified by the size of the smallest tree clade containing the four. Cost: 20 000 quartets over 5.0 M columns in about 35 s total. Exact per-family quartet weighting is out of reach (<span class="arithmatex">\(\binom{180}{4}\approx 42.3\)</span> M quartets; one family carried by 100 genomes covers <span class="arithmatex">\(\binom{100}{4}\approx 3.9\)</span> M), so quartets serve as a <em>diagnostic</em> of a sample, not as a weight.</p>
|
|
<p>Result on the current sample: 4-way count quantiles 0 / 1 / 10 / 50 / 90 / 99 / 100 % = 0, 3, 68, 200, 2 329, 66 504, 194 460 (CV 3.5, 0.1 % uncovered). By depth: median 131-209 for quartets inside clades ≥ 65 genomes versus 11 580-57 387 for clades 17-64. The ratio of the 4-way count to the smallest of the six pair overlaps has median 0.20-0.29 for deep quartets (0.53 for clades 33-64; 1 would be perfect nesting): pair overlap is only a loose upper bound of 4-way coverage, so flattening pairs does not by itself flatten quartets. 88 % of random quartets fall in the deepest class (root as written; strata with < 5 quartets are noise). Co-presence is not informativeness (a column must also differ among the four). Next measurement: repeat on a sample drawn with the pair weight and check whether the ratio moves toward 1.</p>
|
|
<h2 id="two-kinds-of-family-loss-sequencing-dropout-vs-divergence-2026-10-12">Two kinds of family loss: sequencing dropout vs divergence (2026-10-12)</h2>
|
|
<ul>
|
|
<li><strong>Sequencing dropout (genome skimming, ~1× coverage).</strong> About <span class="arithmatex">\(e^{-1}\approx 37\%\)</span> of each genome is uncovered, independently per family. Predicted for a family truly present in a clade of <span class="arithmatex">\(m\)</span> genomes: completeness ≈ 0.63-0.70 and clade-closed fraction <span class="arithmatex">\(c^m\)</span>, independent of clade depth. Consistent with small clades (3-4 tips: completeness 0.71, 20 % closed vs <span class="arithmatex">\(0.65^3=27\%\)</span>, <span class="arithmatex">\(0.65^4=18\%\)</span>). Does not predict the observed decay at larger clades (0.45 at 5-8 tips, 0.21 at 17-32, 0.08-0.12 beyond).</li>
|
|
<li><strong>Loss by divergence (user observation).</strong> A family is a kmer whose 30 flanking positions (15 each side for <span class="arithmatex">\(k=31\)</span>) are identical, with a variable central base; with per-site divergence <span class="arithmatex">\(d\)</span> the flanks survive with probability ≈ <span class="arithmatex">\((1-d)^{30}\approx e^{-30d}\)</span> (0.74, 0.21, 0.042, 0.0012 for <span class="arithmatex">\(d\)</span> = 0.01, 0.05, 0.10, 0.20). Phylogeny-dependent and tied to local conservation, unlike sequencing dropout. Explains the loss of completeness with clade size, and sets a floor: no weighting can sample families that no longer exist for pairs whose <span class="arithmatex">\(e^{-30d}\)</span> is negligible. Surviving deep families are selected for conserved flanks, hence plausibly slow-evolving (fewer variable sites for deep splits; hypothesis, untested).</li>
|
|
<li>The patristic distances of the IQ-TREE tree (1 to 3.5) come from an alignment with variable sites only, hence strongly inflated; the true <span class="arithmatex">\(d\)</span> is unknown and these numbers cannot be plugged into <span class="arithmatex">\(e^{-30d}\)</span>.</li>
|
|
<li><strong>Test (user's plan), done 2026-10-12: see the next section.</strong></li>
|
|
</ul>
|
|
<h2 id="overlap-vs-mash-distance-on-the-full-index-measured-2026-10-12">Overlap vs Mash distance on the full index (measured 2026-10-12)</h2>
|
|
<p>Inputs: <code>phylo --distance mash --csv --shared-kmers --nj</code> on the 180-genome index (distance matrix, shared-kmer matrix, NJ tree) against the full-index <code>family_overlap</code> <span class="arithmatex">\(O_{ij}\)</span>. Mash <span class="arithmatex">\(D\)</span>: range 0.011-0.337, median 0.20.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Regression</th>
|
|
<th>Slope</th>
|
|
<th><span class="arithmatex">\(R^2\)</span></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><span class="arithmatex">\(\log O_{ij}\)</span> vs <span class="arithmatex">\(D\)</span>, all pairs</td>
|
|
<td>-26.95</td>
|
|
<td>0.979</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="arithmatex">\(\log\)</span>(shared kmers) vs <span class="arithmatex">\(D\)</span></td>
|
|
<td>-31.87</td>
|
|
<td>0.984</td>
|
|
</tr>
|
|
<tr>
|
|
<td><span class="arithmatex">\(\log O_{ij}\)</span> vs <span class="arithmatex">\(D\)</span> + additive genome effect</td>
|
|
<td>-25.3</td>
|
|
<td>0.9999</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Spearman(<span class="arithmatex">\(D\)</span>, <span class="arithmatex">\(O\)</span>) = -0.95; Spearman(<span class="arithmatex">\(D\)</span>, shared kmers) = -0.95; Spearman(<span class="arithmatex">\(D\)</span>, IQ-TREE patristic) = 0.81.</p>
|
|
<p>Reading:</p>
|
|
<ul>
|
|
<li>Overlap decays log-linearly with distance, slope about -27 versus -30 predicted by flank survival (previous section). <strong>Not an independent confirmation of the flank model</strong>: Mash <span class="arithmatex">\(D\)</span> is derived from kmer sharing and <span class="arithmatex">\(O\)</span> counts families defined by kmers, so both measure the same shared content. The kmer slope of -32 is <span class="arithmatex">\(-k\)</span> by construction of Mash (implementation check only). The ratio of the two slopes, 27/32 ≈ 0.85, is below the 30/31 ≈ 0.97 expected from flank survival alone; cause unknown, the gap is modest.</li>
|
|
<li>Local slopes vary: -21 for <span class="arithmatex">\(D\in[0.011,0.07]\)</span> (<span class="arithmatex">\(R^2\)</span> 0.45), -28 for [0.07, 0.20] (0.96), -35 for <span class="arithmatex">\(D>0.23\)</span> (0.83). Half the pairs lie in <span class="arithmatex">\(D\in[0.20,0.23]\)</span>, where the fit explains almost nothing (<span class="arithmatex">\(R^2\)</span> 0.26 and 0.07): a plateau where Mash has little resolution.</li>
|
|
<li>Genome effects (log scale, sd 0.21): lowest <code>Androsace_saussurei--PHA010690</code> (factor ≈ 0.39), <code>Androsace_triflora--PHA000558</code> (≈ 0.62), <code>Androsace_vesulensis--PHA010698</code> and <code>Primula_stricta_var_obesior--TROM_V_149128</code> (≈ 0.65); highest <code>Androsace_pubescens--PHA010697</code> (≈ 2.8). Three of the four lowest are also among the genomes with the fewest calls in the pseudo-alignment (saussurei, triflora, stricta), pubescens has the most; consistent with a coverage effect at the extremes, correlation over all genomes not computed.</li>
|
|
<li>NJ on Mash vs the IQ-TREE tree: Robinson-Foulds 182 of 354 (0.51 normalized); the Mash plateau near 0.2 probably limits NJ resolution for most pairs.</li>
|
|
<li>Consequence for normalization: the residual <span class="arithmatex">\(\log O_{ij}-(a+bD_{ij})\)</span> measures coverage deviation at a given distance, a normalization of <span class="arithmatex">\(O\)</span> that needs no per-genome call counts. Untested on a weighted sample.</li>
|
|
</ul>
|
|
<h2 id="data-poor-genomes-measured-2026-10-12">Data-poor genomes (measured 2026-10-12)</h2>
|
|
<p>Per-genome share of the 5 003 414 sampled columns with a call: median 5.2 %, max 14.3 %; 8 genomes below 1 % and 23 below 2 %. Fewest calls: <code>Androsace_triflora--PHA000558</code> 1 936, <code>Primula_stricta_var_obesior--TROM_V_149128</code> 2 403, <code>Primula_carniolica--PHA007185</code> 4 937, <code>Androsace_saussurei--PHA010690</code> 6 986, <code>Primula_pumila--TROM_V_135924</code> 17 393, <code>Androsace_maxima--PHA000534</code> 17 939, <code>Primula_auricula_subsp_serratifolia--PHA007184</code> 30 621, <code>Androsace_pyrenaica--PHA000543</code> 37 725. Three of them (saussurei, serratifolia, pyrenaica PHA000543) are among the tips whose placement looked aberrant, previously attributed to possible mislabelling or contamination. A simpler alternative is too little data to place them reliably; testable by removing them (<code>--exclude-genome</code>) and watching deep-node support.</p>
|
|
<p>Consequence for flattening: raw <span class="arithmatex">\(O_{ij}\)</span> mixes evolutionary distance and per-genome coverage; flattening on it chases pairs involving data-poor genomes, for which no family exists. Normalizing, <span class="arithmatex">\(O_{ij}/(c_ic_j)\)</span> with <span class="arithmatex">\(c_i\)</span> the number of families carried by genome <span class="arithmatex">\(i\)</span> (per-genome counts from <code>--sibling-stats</code>), targets distance instead of coverage; the best normalization (smoothing of <span class="arithmatex">\(c_i\)</span>, etc.) is not established.</p>
|
|
<h2 id="implemented-entropy-annex-parametrised-by-no-ambiguity-2026-10-13">Implemented: entropy annex parametrised by <code>--no-ambiguity</code> (2026-10-13)</h2>
|
|
<p>Design decision (user): the way genomes are counted depends on <code>--no-ambiguity</code>, so that flag, not an "alphabet" option, is the annex parameter. Over single-member genomes the 15-state entropy only has the four single-base states, hence <code>entropy4</code> (redefined: 4 bases over single-member genomes) equals <code>entropy15</code> under <code>--no-ambiguity</code>; a unit test checks it.</p>
|
|
<ul>
|
|
<li><code>entropy_annex.rs</code>: header <code>flags</code> (the former padding), bit 0 = <code>no_ambiguity</code>; old files have 0 and stay valid. One file per convention (<code>entropy.pent</code>, <code>entropy.noamb.pent</code>), so switching the flag builds the missing one without discarding the other. <code>EntropyAnnex::no_ambiguity()</code>; <code>iter_full_entropy</code> rejects a header that disagrees with the requested convention.</li>
|
|
<li><code>ensure_layer_entropy_annex</code> takes the list of conventions to build; one scan feeds every missing annex and the overlap accumulator. <code>sample_index</code> builds and reads the convention matching its <code>no_ambiguity</code> argument, removing the mismatch between the draw (previously always raw masks) and the alignment (masked).</li>
|
|
<li><code>--sibling-annex</code> builds both conventions and invalidates both on rebuild. <code>--shannon</code> no longer builds any annex as a prerequisite (it recomputes everything from its own scan).</li>
|
|
<li>Checked on the 1x benchmark index: a <code>--no-ambiguity</code> run creates <code>entropy.noamb.pent</code> beside the existing <code>entropy.pent</code> in all 512 layers; workspace tests pass.</li>
|
|
<li>Still to do, in this order: <code>--quartet</code> (per-family bit annex, same parameter), <code>--pair-balance</code> (mean of 1/shared-families over the carrier pairs; second overlap matrix for the single-member convention, annex header carrying a fingerprint of the matrix it came from).</li>
|
|
</ul>
|
|
<h2 id="implemented-quartet-2026-10-13">Implemented: <code>--quartet</code> (2026-10-13)</h2>
|
|
<p><code>--quartet</code> keeps only the families with at least two called states each carried by at least two genomes (<code>masking::is_quartet_informative</code> for the raw masks, <code>survives_quartet</code> for the exact check on masked states and <code>--exclude-genome</code>). Genomes are read through <code>masked_state</code>, exactly as in the alignment: absence is a state of its own unless <code>--free-loss</code> (then it is missing and counts for nothing), and with <code>--no-ambiguity</code> multi-member genomes are left out of the count. The persisted annex is a plain <code>PersistentBitVec</code> (one bit per non-monomorphic family, compact ordinal) — no ad hoc format; its counting convention (<code>QuartetConvention</code>: ambiguity policy × <code>--free-loss</code>) is carried by the file name (<code>quartet.pbiv</code>, <code>quartet.noamb.pbiv</code>, <code>quartet.diploid.pbiv</code> for <code>--free-loss</code>; <code>quartet.abs.*.pbiv</code> for absence-as-a-state) because that header has no room for a flag.</p>
|
|
<p><em>Correction (2026-11-19).</em> The first version never counted absence, whatever <code>--free-loss</code> said, which contradicted the alignment: without <code>--free-loss</code> a genome lacking the family has the state <code>∅</code>, so <code>A A ∅ ∅</code> separates two pairs yet was rejected. Fixed in <code>has_bipartition</code> (index 0 is now counted, and is only ever populated when absence is a state), in the annex (one file per <code>QuartetConvention</code>) and in <code>--sample-stats</code> (informative sites follow the same rule). The old file names keep the <code>--free-loss</code> semantics, which is exactly the old rule, so annexes already built with <code>--free-loss</code> stay valid; the sampling measured below used <code>--free-loss</code> and is unaffected. It is a safe pre-filter: excluding genomes can only destroy a bipartition, never create one.</p>
|
|
<p>Plumbing: <code>AnnexRequest</code> (which annexes, per convention) and <code>ensure_layer_family_annexes</code> (one shared scan for entropy, quartet and overlap) replace the entropy-only builder; the sampling parameters travel as one <code>SamplingSpec { free_loss, no_ambiguity, quartet, entropy_bias }</code> instead of a growing positional list.</p>
|
|
<p>First test on the 1x benchmark testbed (3 seeds, exhaustive alignment, <code>GTR+G4+ASC</code>, species monophyly out of 3 per seed): without filter 1 / 0 / 0 correct monophylies; carriers >= 4 only: 3 / 1 / 2; <code>--quartet</code>: 2 / 2 / 3 (370, 148, 369 columns, all informative by construction). <em>Klebsiella</em> stays fragile (wrong in 2 seeds out of 3); two seeds still show a branch at the IQ-TREE ceiling of 10 with so few columns. Small testbed, three seeds: a direction, not a measurement.</p>
|
|
<h2 id="implemented-subsample-renamed-n-sites-nall-2026-10-13">Implemented: <code>--subsample</code> renamed <code>--n-sites N|all</code> (2026-10-13)</h2>
|
|
<p><code>--subsample</code> read as "draw a subset", while <code>--pseudo-alignment</code>/<code>--sankoff</code> made it mandatory and accepted no way to say "everything" (the workaround was a number larger than the family count, e.g. <code>--subsample 100000000</code>). The option is now <code>--n-sites <N|all></code>: <code>all</code> is an explicit value, parsed into its own type (<code>NSitesArg::{All, N}</code>, like <code>GammaShapeArg</code>) rather than an in-band sentinel (negative number, <code>0</code>); <code>all</code> gives the exhaustive scan the <code>snp-*</code> path already ran when the option was omitted. Still mandatory for <code>--pseudo-alignment</code>/<code>--sankoff</code>; still optional for <code>snp-*</code> <code>--distance</code>. No alias is kept for the old name (the software is in active development). The benchmark commands and measurements recorded in the earlier sections of this file were run with the old name.</p>
|
|
<h2 id="implemented-pair-balance-2026-10-13">Implemented: <code>--pair-balance</code> (2026-10-13)</h2>
|
|
<p>Weight of a family = <strong>mean</strong> over the pairs of its carriers of 1/O (O = index-wide shared variable families of the pair, same <code>--no-ambiguity</code> convention): the simulation on the <em>Primulaceae</em> sample (above) had the mean flatten best (expected-overlap range 23 000× to ~600×, slope 0.37) without chasing high-carrier families, unlike the sum (65 % of the draw at >= 33 carriers).</p>
|
|
<ul>
|
|
<li><code>algorithms/pair_weight.rs</code>: <code>inverse_overlap_matrix</code> (dense n×n of 1/O from the persisted overlap annex), <code>pair_balance_weight</code> (mean over carrier pairs; 0 below two carriers). Carriers are defined once, <code>helpers::is_carrier(mask, no_ambiguity)</code>, shared with the overlap accumulator and the quartet test.</li>
|
|
<li>Storage: no new format. The entropy annex is generalised to <code>FamilyScalarAnnex</code> with a <code>ScalarKind</code> (<code>Entropy</code> magic <code>PENT</code>, <code>PairWeight</code> magic <code>PPWT</code>, one file per kind and convention, header flag <code>no_ambiguity</code>); <code>entropy_annex.rs</code> became <code>family_scalar_annex.rs</code>. Family overlap is now one file per convention too (<code>family_overlap.povl</code>, <code>family_overlap.noamb.povl</code>, header flag); <code>--family-overlap</code> and <code>--min-shared-family</code> follow <code>--no-ambiguity</code>.</li>
|
|
<li>Build order: sweep 1 builds entropy, quartet and the missing overlap annexes together; sweep 2 builds the pair weights, which need the finished matrix (<code>ensure_layer_pair_weight_annexes</code>). <code>AnnexRequest</code> now lists <code>entropy</code>, <code>quartet</code>, <code>overlap</code>, <code>pair_weight</code>; a pair weight implies its overlap. A rebuilt sibling annex removes every annex derived from it (entropy, quartet, pair weight, overlap), so a weight can never outlive the matrix it came from; there is no fingerprint, only that single invalidation point.</li>
|
|
<li>Sampler: <code>LayerPlan</code> (eligible bits, minorant count, mass) replaces the positional tuple; a layer's quota is <code>n × mass / Σ mass</code> (mass = eligible count without the option, Σ weights with it); a family is accepted with probability <code>quota/mass × weight × entropy kernel</code>, capped at 1 (the cap, and kernels below 1, undershoot the quota, absorbed by the existing top-up rounds).</li>
|
|
<li>Cost note: weights need O(carriers²) per family at build time; not measured on a large index.</li>
|
|
</ul>
|
|
<p>First test, 1x benchmark testbed (20 genomes, 46 706 variable families, <code>--n-sites 5000 --free-loss --no-ambiguity</code>, 8 replicates each; sample overlap computed from the alignment, compared with the index <code>--family-overlap --no-ambiguity</code>):</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>slope of log(sample overlap) on log(index overlap)</th>
|
|
<th>pairs (index overlap > 0) covered by >= 1 column</th>
|
|
<th>columns with >= 10 carriers</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>uniform</td>
|
|
<td>1.02 ± 0.14</td>
|
|
<td>64 %</td>
|
|
<td>0.18 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td><code>--pair-balance</code></td>
|
|
<td>0.84 ± 0.001</td>
|
|
<td>97 %</td>
|
|
<td>1.1 %</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>The weight flattens the representation (slope toward 0) and, above all, covers most of the pairs a uniform draw misses. Not measured: effect on the tree (sCF / monophyly), interaction with <code>--entropy</code>, behaviour on the <em>Primulaceae</em> index. 20 genomes only.</p>
|
|
<h2 id="quota-rounding-fix-and-the-combined-test-on-the-1x-testbed-2026-10-13">Quota rounding fix, and the combined test on the 1x testbed (2026-10-13)</h2>
|
|
<p><strong>Fix.</strong> <code>sample_index</code> rounded each layer's quota down on its own, losing up to one site per layer: with 512 layers a budget of 100 sites gave 0 to 3 columns. Quotas now use cumulative rounding (<code>floor(n × cumulative mass / total)</code> minus what earlier layers got), so they sum to exactly <code>n</code>; a 100-site budget now yields 50-80 usable columns. Not a result of the options below, a defect the small testbed exposed.</p>
|
|
<p><strong>Test.</strong> 1x testbed, 3 seeds × 10 replicates per variant, 11 genomes (the 9 genomes with fewest calls excluded, so no all-missing sequence), <code>--free-loss --no-ambiguity</code>, IQ-TREE <code>GTR+G4+ASC</code> on each sampled alignment; score = number of the three species (<em>E. coli</em>, <em>Salmonella</em>, <em>Klebsiella</em>) recovered monophyletic (0-3), mean over the 30 runs; "informative" = columns with two bases each carried by >= 2 genomes.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th><code>--n-sites</code></th>
|
|
<th>variant</th>
|
|
<th>trees obtained</th>
|
|
<th>columns</th>
|
|
<th>informative columns</th>
|
|
<th>mean species monophyletic (of 3)</th>
|
|
<th>all 3</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>100</td>
|
|
<td>uniform</td>
|
|
<td>77 %</td>
|
|
<td>49</td>
|
|
<td>0.5</td>
|
|
<td>0.04</td>
|
|
<td>0 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td>100</td>
|
|
<td><code>--quartet</code></td>
|
|
<td>100 %</td>
|
|
<td>82</td>
|
|
<td>82</td>
|
|
<td>2.30</td>
|
|
<td>50 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td>100</td>
|
|
<td><code>--pair-balance</code></td>
|
|
<td>100 %</td>
|
|
<td>52</td>
|
|
<td>2.1</td>
|
|
<td>0.20</td>
|
|
<td>0 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td>100</td>
|
|
<td><code>--quartet --pair-balance</code></td>
|
|
<td>100 %</td>
|
|
<td>67</td>
|
|
<td>67</td>
|
|
<td>2.53</td>
|
|
<td>53 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td>100</td>
|
|
<td><code>... --entropy 1</code></td>
|
|
<td>100 %</td>
|
|
<td>67</td>
|
|
<td>67</td>
|
|
<td>2.17</td>
|
|
<td>17 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td>300</td>
|
|
<td>uniform</td>
|
|
<td>93 %</td>
|
|
<td>163</td>
|
|
<td>2.1</td>
|
|
<td>0.04</td>
|
|
<td>0 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td>300</td>
|
|
<td><code>--quartet</code></td>
|
|
<td>100 %</td>
|
|
<td>239</td>
|
|
<td>239</td>
|
|
<td>2.33</td>
|
|
<td>33 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td>300</td>
|
|
<td><code>--pair-balance</code></td>
|
|
<td>100 %</td>
|
|
<td>179</td>
|
|
<td>6.2</td>
|
|
<td>0.57</td>
|
|
<td>0 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td>300</td>
|
|
<td><code>--quartet --pair-balance</code></td>
|
|
<td>100 %</td>
|
|
<td>197</td>
|
|
<td>197</td>
|
|
<td>2.67</td>
|
|
<td>67 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td>300</td>
|
|
<td><code>... --entropy 1</code></td>
|
|
<td>100 %</td>
|
|
<td>196</td>
|
|
<td>196</td>
|
|
<td>2.67</td>
|
|
<td>67 %</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>(Mean over all runs counting a failed tree as 0 is identical to the "mean species" column wherever trees were obtained; the uniform rows lose runs because IQ-TREE refuses alignments where a genome has no data.)</p>
|
|
<p>Reading: <code>--quartet</code> is the decisive option here — a uniform draw of 100-300 sites contains almost no informative column (0.5-2), the restricted draw contains only informative ones. <code>--pair-balance</code> alone barely helps (it favours rare pairs but does not remove the uninformative columns); added to <code>--quartet</code> it raises the share of replicates recovering all three species (50→53 % and 33→67 %). The entropy kernel (centre 1 bit, default width) adds nothing at 300 sites and costs at 100. Limits: 11 genomes, three simulated 1x datasets, small budgets, a single criterion (species monophyly, not deep branches), and the differences between the <code>--quartet</code> variants (a few runs out of 30) are small relative to the replicate noise — a direction, not a ranking.</p>
|
|
<h2 id="implemented-no-distance-matrix-unless-one-is-wanted-2026-10-13">Implemented: no distance matrix unless one is wanted (2026-10-13)</h2>
|
|
<p><code>--distance</code> had a default (<code>jaccard</code>) and <code>phylo</code> always computed and wrote a matrix, even for <code>--sibling-annex</code>, <code>--family-overlap</code> or <code>--pseudo-alignment</code> alone. <code>--distance</code> is now optional: a matrix is computed only if <code>--distance</code> is given, or <code>--nj</code>/<code>--upgma</code>/<code>--shared-kmers</code> needs one (then <code>jaccard</code>, <code>args::distance_to_compute</code>, unit-tested); <code>--csv</code> alone changes nothing. When nothing is wanted the command stops before the distance step. Checked on the 1x testbed: <code>--family-overlap</code> and <code>--pseudo-alignment</code> runs write no <code>_dist</code> file and run no distance stage; <code>--nj</code> writes <code>_dist.phy</code> and <code>_nj.nwk</code>; <code>--distance mash --csv</code> writes <code>_dist.csv</code>. Cost saved on a large index: not measured.</p>
|
|
<h2 id="implemented-diagnostic-outputs-2026-10-13">Implemented: diagnostic outputs (2026-10-13)</h2>
|
|
<p>Added so the measurements this file reports no longer need ad hoc scripts, and so a draw can be diagnosed from the files of the run that produced it:</p>
|
|
<ul>
|
|
<li><code>--sample-stats</code>: a <code>SampleStatsReducer</code> (<code>algorithms/sample_stats.rs</code>), a <code>LayerReducer</code> run beside the alignment over the same surviving families; writes <code>_sample_genomes.csv</code>, <code>_sample_carriers.csv</code>, <code>_sample_overlap.csv</code>. A call is a masked state other than <code>0</code>; informative = <code>has_bipartition</code> (the quartet rule, now shared). Checked on the 1x testbed: per-genome calls and the overlap matrix equal those recomputed from the alignment.</li>
|
|
<li><code>--sample-plan</code>: <code>sampled_scan</code> now returns a <code>SamplePlan</code> (one <code>LayerReport</code> per layer: eligible, mass, quota, resolved, kept); <code>_sample_plan.csv</code> has the layer lines only (quotas sum to the target by cumulative rounding; on the testbed 3000 asked, 2695 kept).</li>
|
|
<li><code>--shannon-summary</code>: <code>--shannon</code> and the summary share one traversal (<code>scan_family_entropies</code>, which replaces the loop that lived in <code>shannon_entropy_csv</code>); the summary keeps counts per (entropy kind, genomes present, genomes without ambiguity, 0.05-bit bin) instead of one line per family: 156 lines for the 46 706 families of the testbed (a few hundred thousand lines at most on any index, by construction: the bins are bounded). Checked: its <code>entropy15</code> counts sum to the number of variable families.</li>
|
|
<li>Writers are in <code>cmd/phylo/stats.rs</code>; the library computes, the command layer formats and writes.</li>
|
|
</ul>
|
|
<h2 id="combined-draw-on-primulaceae-quartet-pair-balance-entropy-1-measured-2026-10-13">Combined draw on Primulaceae: <code>--quartet --pair-balance --entropy 1</code> (measured 2026-10-13)</h2>
|
|
<p>Command: <code>phylo --entropy 1 --pseudo-alignment --n-sites 5000000 --free-loss --no-ambiguity --quartet --pair-balance -o primulaceae_quartet_balance --family-overlap --sibling-stats primulaceae</code>. One draw, 180 genomes, 5 000 000 columns requested and obtained (no shortfall; no <code>--sample-plan</code>, so per-layer quotas are not inspectable). The three options are on together: <strong>effects of entropy, quartet and pair balance are not separable here</strong>; the testbed result that the entropy kernel adds nothing at small budgets was not rechecked.</p>
|
|
<p><strong>Baseline.</strong> The same statistics were recomputed with one script on the alignment fed to IQ-TREE (<code>primulaceae-gamma_alignment.fasta</code>, 5 003 414 columns). It reproduces the figures of the earlier sections (sample overlap min 4 / median 1 665 / max 387 057 / CV 1.57; sampling fraction <span class="arithmatex">\(r\)</span> quantiles 0.0025 / 0.0037 / 0.0055; 5.2 % median calls per genome), hence <strong>is the entropy-drawn sample</strong> (<code>--entropy 1 --entropy-sd 0.5</code>, section on entropy bias), not a uniform draw. The "uniform draw" label of the nesting section is inconsistent with this (to settle). So the comparison below is <em>entropy-only vs entropy + quartet + pair balance</em>, never against a uniform control. A call is any character other than <code>?</code>/<code>-</code>. With <code>--free-loss</code> absence is written <code>?</code> (<code>masking::masked_state</code>); <code>-</code> only occurs without it. Neither file contains IUPAC characters.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>Baseline (entropy only)</th>
|
|
<th>Combined</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Informative columns (≥ 2 bases, each in ≥ 2 genomes)</td>
|
|
<td>21.4 %</td>
|
|
<td>100 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Carriers per column: median / share ≤ 4 / share ≥ 33</td>
|
|
<td>4 / 58.1 % / 8.0 %</td>
|
|
<td>8 / 12.4 % / 11.3 %</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Calls per genome, median; genomes < 1 % / < 2 %</td>
|
|
<td>5.2 %; 8 / 23</td>
|
|
<td>8.1 %; 4 / 6</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Sample pair overlap min / median / max</td>
|
|
<td>4 / 1 665 / 387 057</td>
|
|
<td>282 / 27 380 / 491 038</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Sample overlap CV; max/min</td>
|
|
<td>1.57; 96 764</td>
|
|
<td>1.10; 1 741</td>
|
|
</tr>
|
|
<tr>
|
|
<td>4-way count (20 000 random quartets, 2 seeds): median</td>
|
|
<td>200-202</td>
|
|
<td>3 738-3 797</td>
|
|
</tr>
|
|
<tr>
|
|
<td>4-way p1 / p10</td>
|
|
<td>3 / 66-67</td>
|
|
<td>93-95 / 1 092-1 104</td>
|
|
</tr>
|
|
<tr>
|
|
<td>4-way p90 / p99</td>
|
|
<td>3 000-3 644 / 65 700-67 300</td>
|
|
<td>14 500-15 600 / 82 900-84 600</td>
|
|
</tr>
|
|
<tr>
|
|
<td>4-way CV; share of quartets with 0</td>
|
|
<td>3.4-3.5; 0.11-0.14 %</td>
|
|
<td>1.83-1.87; 0 %</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>(p90/p99 move by 20 % between the two seeds: read them as orders of magnitude only.) The gain is at the bottom of the 4-way distribution (median ×19, p1 ×30); the top is unchanged. 4-way coverage is not stratified by clade depth here (needs the tree). "Informative" is measured over the 180 genomes: a column informative overall is not necessarily informative among the four genomes of a given quartet.</p>
|
|
<p><strong>Pair representation.</strong> Index-wide overlap used for the comparison: baseline, the raw matrix (<code>primulaceae_phylo_family_overlap.csv</code>); combined, the <code>--no-ambiguity</code> matrix of the same run. Different conventions, so the two slopes are indicative.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>Baseline</th>
|
|
<th>Combined</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Slope of log(sample overlap) on log(index overlap)</td>
|
|
<td>1.12 (<span class="arithmatex">\(R^2\)</span> 0.997)</td>
|
|
<td>0.54 (<span class="arithmatex">\(R^2\)</span> 0.91)</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Pairs with index overlap > 0 and no sample column</td>
|
|
<td>0</td>
|
|
<td>0</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Median <span class="arithmatex">\(r\)</span> = sample/index, poorest decile of index overlap</td>
|
|
<td>0.0027</td>
|
|
<td>0.059</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Median <span class="arithmatex">\(r\)</span>, richest decile</td>
|
|
<td>0.0053</td>
|
|
<td>0.0067</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Median <span class="arithmatex">\(r\)</span> by decile 1 → 10</td>
|
|
<td>0.0027 … 0.0053, rising</td>
|
|
<td>0.059, 0.065, 0.067, 0.067, 0.069, 0.074, 0.023, 0.0082, 0.0077, 0.0067</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>The weight does not merely flatten: the poorest pairs are now about 9× better represented (relative to their pool) than the richest, where the baseline gave them about half. Deciles 1-6 are flat; the drop sits at deciles 7-10, around the gap of the index-overlap distribution already noted in the entropy-bias section (cause of that gap still unchecked). <strong>Caveat on <span class="arithmatex">\(r\)</span>:</strong> the numerator only holds quartet-informative families while the denominator counts every variable family, and the matrices differ in convention, so <span class="arithmatex">\(r\)</span> is no longer a sampling fraction of one pool; the decile pattern is a measurement of the sample, not of an inclusion probability.</p>
|
|
<p><strong>Per-genome richness.</strong> <code>--sibling-stats</code> now gives the variable families (size ≥ 2) per genome: 0.72 M to 93.9 M, median 34.5 M. Spearman between a genome's calls in the sample and its variable-family count: <strong>0.974 in the baseline, 0.435 in the combined draw</strong>: the baseline mirrored genome richness, the combined draw largely decouples from it (on the same genomes the correlation with <em>all</em> families is 0.66 and 0.32). Genomes poorest in variable families: <em>A. saussurei</em> 0.72 M (0.30 % of its families), <em>A. triflora</em> 1.26 M (0.72 %), <em>P. stricta var. obesior</em> 2.39 M (1.33 %), then <em>P. pumila</em> 5.2 M, <em>P. auricula</em> subsp. <em>serratifolia</em> 5.9 M (1.92 %), <em>P. carniolica</em> 6.8 M (1.77 %), <em>A. pyrenaica</em> PHA000543 8.4 M (1.46 %). Their calls in the sample went from 6 986 / 1 936 / 2 403 (saussurei, triflora, stricta) to 15 725 / 22 988 / 25 392, and carniolica from 4 937 to 52 310; <em>saussurei</em> stays the poorest genome in both. These genomes are data-poor, not empty: their families are mostly of size 1. This is the per-genome <span class="arithmatex">\(c_i\)</span> the normalisation of the data-poor section calls for.</p>
|
|
<p>Global family-size histogram (<code>global</code> row): 34 047 616 087 families; sizes 1 / 2 / 3 / 4 = 33 512 358 231 (98.43 %) / 479 910 992 (1.41 %) / 45 621 663 (0.13 %) / 9 725 201 (0.03 %). Sizes ≥ 2 sum to 535 257 856, matching the 535 257 857 of the entropy table within 1.</p>
|
|
<p><strong><code>_dist.phy</code> (not asked for).</strong> 180 × 180, symmetric, values 0.456-0.99999, median 0.999; Spearman with the Mash matrix 0.9999998 and with the index overlap −0.95, so it carries Mash-like information, consistent with the <code>jaccard</code> default (not verified). <code>args::distance_to_compute</code> at HEAD computes no matrix for this command line; why the file exists is unknown (binary predating the change, or a leftover; not checked). Not used above.</p>
|
|
<p><strong>Not measured:</strong> any tree-level effect (sCF, species monophyly, support at the interface nodes 209/216 where <code>sN</code> was 17 and 7); the separate contribution of entropy, quartet and pair balance (needs ablation runs: without <code>--entropy</code>, without <code>--pair-balance</code>, <code>--quartet</code> alone); variance between draws (one draw per setting); clade-stratified 4-way coverage; the new alignment had not been given to IQ-TREE (done 2026-10-16: see the last measured section).</p>
|
|
<h2 id="tree-level-effect-of-the-combined-draw-scf-on-three-trees-measured-2026-10-16">Tree-level effect of the combined draw: sCF on three trees (measured 2026-10-16)</h2>
|
|
<p>Closes the "not measured" item of the previous section (the combined alignment given to IQ-TREE). Three trees, all sCF by <code>--scfl 100 --cf-verbose</code>, model <code>GTR+G4+ASC</code>:</p>
|
|
<ul>
|
|
<li><strong>A</strong> = <code>concord</code> (12/10): entropy-only draw, 180 genomes, 5 003 414 columns; <code>-t</code> + <code>-m</code> re-ran a full ML search (59 h).</li>
|
|
<li><strong>B</strong> = <code>concord_quartet_balance</code>: combined draw (<code>--entropy 1 --quartet --pair-balance</code>), 180 genomes, 5 000 000 columns. Its log stops during the tree search (14/10), so the command that produced its <code>cf.*</code> (16/10) is not in the files; presumably <code>-te</code> on the 15/10 treefile as for G (unverified).</li>
|
|
<li><strong>G</strong> = <code>scf_good</code>: same draw as B without the 3 data-poor genomes (<em>A. pyrenaica</em> PHA000543, <em>A. saussurei</em>, <em>A. triflora</em>), 177 genomes. 72 sites became invariant and were removed to satisfy ASC; the search (<code>concord_quartet_balance_good</code>, 107 iterations, 6 h 47 on 120 threads) crashed in the sCF step on the FASTA (<code>Assertion all_prob_const < 1.0</code>; cause untested, ASC with constant sites is a suspect). sCF were recomputed with <code>-te <treefile> -s <varsites.phy> -m GTR+G4+ASC --scfl 100</code>: <strong>no search</strong> (0 iterations, lnL −41 053 676.53 vs −41 053 676.41 from the search), 4 999 729 columns. A used <code>-t</code>, B/G a fixed tree: the protocols differ.</li>
|
|
</ul>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th></th>
|
|
<th>A</th>
|
|
<th>B</th>
|
|
<th>G</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>Branches</td>
|
|
<td>177</td>
|
|
<td>177</td>
|
|
<td>174</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Mean <code>sN</code></td>
|
|
<td>3 219</td>
|
|
<td>13 163</td>
|
|
<td>13 396</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Branches with <code>sN</code> < 100 / < 1 000</td>
|
|
<td>13 / 50</td>
|
|
<td>0 / 5</td>
|
|
<td>0 / 2</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Median sCF</td>
|
|
<td>44.2</td>
|
|
<td>42.9</td>
|
|
<td>42.8</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Branches with sCF < 40 / ≥ 70</td>
|
|
<td>74 / 28</td>
|
|
<td>67 / 26</td>
|
|
<td>69 / 25</td>
|
|
</tr>
|
|
<tr>
|
|
<td><em>Primula</em> and <em>Androsace</em> monophyletic</td>
|
|
<td>no / no</td>
|
|
<td>no / no</td>
|
|
<td>yes / yes</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p><strong>Sampling effect (A → B, same 180 genomes).</strong> <code>sN</code> ×4.5 and the scarcity is gone. Sites do not become more concordant: on the 113 shared bipartitions (of 177) median sCF 48.0 → 47.3 (44 up, 69 down). Robinson-Foulds 128: the draw rearranged the tree deeply. Consistent with the earlier reading that the intra-<em>Androsace</em> conflict is not a matter of site count; the number of branches with sCF < 40 % stays around 70.</p>
|
|
<p><strong>Interface nodes.</strong> Of the old nodes 209/211/212/216/217 (<code>sN</code> 17 / 226 / 184 / 7 / 7) none exists in G. Node 208 survives with <code>sN</code> 190 → 5 218 (sCF 54.5 → 37.5). Six mixed clades remain in G (83 to 72 tips, 50 <em>Primula</em> + 22-33 <em>Androsace</em>), all with <code>sN</code> > 3 000.</p>
|
|
<p><strong>Effect of the 3 genomes (B → G, same draw).</strong> RF 16 (166 of 174 shared), median sCF 43.2 → 43.6, median <code>sN</code> unchanged. In B, <em>A. pyrenaica</em> and <em>A. triflora</em> sit inside <em>Primula</em> (a clade of 52 tips = 50 <em>Primula</em> + these 2; each has a <em>Primula</em> sister, sCF 92 % and 52 %, <code>sN</code> 556 and 153); <em>A. saussurei</em> stays with <em>Androsace</em>. Removing them restores both monophylies and changes nothing else measurably: support for "too little data to place them" (data-poor section), not for contamination, though the latter is not excluded.</p>
|
|
<p><strong>Where A and G disagree (2026-10-16).</strong> On the 177 common tips: 124 shared bipartitions, 50 only in A, 50 only in G. Differing bipartitions are weakly supported in both trees (median sCF 35.7 in A-only, 37.7 in G-only, versus 47.5-48.1 on the shared ones), so the disagreement sits where support was already low. Differences are mostly local: the closest bipartition of the other tree is 1 tip away for 25 of 50 A-only and 21 of 50 G-only splits (≤ 2 tips: 37 and 30); only 8 and 9 are 5+ tips apart. Greedy removal of the tip that lowers RF most: the first (<em>P. auricula</em> subsp. <em>serratifolia</em>) takes RF from 100 to 86, then about 2 per tip (<em>A. maxima</em>, <em>P. stricta</em> var. <em>obesior</em>, then ordinary tips); the top three are data-poor genomes. A bipartition separates a data-poor genome (the 5 left after the 3 removals) in 1 of 124 shared splits but in 23 of 50 A-only and 10 of 50 G-only splits; removing those 5 genomes gives RF 72, against 96.6 (range 90-100, 40 draws) for 5 random tips. So about 28 of the 100 differences trace to data-poor genomes, and the remaining 72 do not. Backbone: A has a clade of 50 <em>Primula</em> + 25 <em>Androsace</em> (sCF 76, <code>sN</code> 453), G one of 50 + 26 (sCF 73, <code>sN</code> 6 677): one tip apart. Genuine conflict: a clade of 72 <em>Androsace</em> exists in both trees (A: sCF 34, <code>sN</code> 17 127; G: sCF 38, <code>sN</code> 49 473) with 16 different tips, i.e. a topological disagreement carried by tens of thousands of sites in each, not a scarcity effect; consistent with the intra-<em>Androsace</em> conflict above.</p>
|
|
<p><strong>Not established.</strong> Separate contribution of entropy / quartet / pair balance (no ablation); stability of the tree between two independent draws (one draw per setting; A → B shows the topology moves with the draw); whether the quartet-informative restriction biases branch lengths (ASC corrects for variable-only ascertainment, not for requiring two states each in two genomes; tree length 22.5 is not interpretable as substitutions/site).</p>
|
|
<h2 id="open-questions">Open questions</h2>
|
|
<ul>
|
|
<li>Per-family <span class="arithmatex">\(S_f\)</span> without materializing the full matrix: a first pass storing only a per-family summary (reach, <span class="arithmatex">\(|S_f|\)</span>), as <code>--shannon</code> already does a full unsampled scan for entropy.</li>
|
|
<li>Combination with entropy bias: not independent criteria if entropy correlates with reach (see section above); options: compensate the known entropy weight inside the pair weight, or apply the Gaussian inside reach strata.</li>
|
|
<li>Pairs with near-zero <span class="arithmatex">\(O_{ij}\)</span> (suspected badly sequenced genomes) set the ceiling for everyone; <code>--min-shared-family</code>/<code>--exclude-genome</code> should be applied first so the floor is not dictated by anecdotal genomes.</li>
|
|
<li>Effect on the SNP-distance estimators: a non-uniform draw over pairs biases per-pair eligible-family counts, but each pair's <span class="arithmatex">\(p\)</span>-distance is a ratio over its own eligible families, so unbiasedness per pair is expected to hold. To confirm before relying on it.</li>
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
</div>
|
|
|
|
|
|
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
|
|
</div>
|
|
|
|
</main>
|
|
|
|
<footer class="md-footer">
|
|
|
|
<div class="md-footer-meta md-typeset">
|
|
<div class="md-footer-meta__inner md-grid">
|
|
<div class="md-copyright">
|
|
|
|
|
|
Made with
|
|
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
|
|
Material for MkDocs
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
|
|
</div>
|
|
<div class="md-dialog" data-md-component="dialog">
|
|
<div class="md-dialog__inner md-typeset"></div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<script id="__config" type="application/json">{"annotate": null, "base": "../..", "features": [], "search": "../../assets/javascripts/workers/search.2c215733.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
|
|
|
|
|
|
<script src="../../assets/javascripts/bundle.79ae519e.min.js"></script>
|
|
|
|
<script src="https://unpkg.com/mathjax@3/es5/tex-mml-chtml.js"></script>
|
|
|
|
|
|
</body>
|
|
</html> |