docs: clarify VCF pseudo-alignment format and update obikmer dependency
ci.yml / build (pull_request) Successful in 3m40s
Release / create-release (push) Successful in 1m7s
Release / build-macos-arm64 (push) Successful in 1m52s
Release / build-linux-x86_64 (push) Successful in 6m41s

Update the VCF export documentation to reflect that `-` represents an overlapping deletion (extra allele `*`) and introduce the `<ABS>` symbolic allele for absent families. Add a new dedicated documentation file for the VCF pseudo-alignment format, remove obsolete descriptions from phylo.md, and fix benchmark scripts to handle errors and directory creation correctly.

- Update `obikmer` dependency from 1.4.1 to 1.4.2 in Cargo.toml and Cargo.lock
- Add `UserDocMD/formats/vcf.md` describing VCF pseudo-alignment structure, alleles, and genotypes
- Remove obsolete VCF descriptions from `UserDocMD/usage/phylo.md` and update ploidy/free-loss notes
- Update `DevDocMD/theory/evolutionary_distances.md` to clarify `-` as overlapping deletion and `<ABS>` for others
- Fix `benchmark/index_one_count.sh` to create index directory and check read command errors
- Fix `benchmark/index_one_presence.sh` to create index directory and check simulation errors
- Update `src/obikphylo/src/siblings/algorithms/alignment_vcf.rs` to use `<ABS>` for absent families instead of `*`
This commit is contained in:
Eric Coissac committed 2026-11-09 20:59:28 +11:00
1 parent 5368c98875
commit 0134c69cf4
9 files changed
+156 -34

No files matched your search

+13 -5
View File
@@ -2903,10 +2903,18 @@ Absence handling. `masked_state` keeps absence (`m == 0`, `-`) as a real state
unless `--free-loss`, where it becomes missing (`?`). A first version mapped
`-` and `?` both to `.`: on a toy 4-genome index half of the lines then had
`ALT = .` (presence/absence-only sites, selected by `survives_masking`), i.e.
polymorphic sites rendered as monomorphic. Now `-` is the extra allele `*`
(VCF >= 4.2 "allele missing due to upstream deletion"), after the bases; `?`
and IUPAC ambiguity codes stay `.` (haploid GT cannot express a genome
carrying several forms; superseded below). The writer needs no knowledge of
polymorphic sites rendered as monomorphic. Absence became an extra allele,
first written `*`; that was a misuse: in VCF 4.5 (section on the ALT column)
`*` is "allele missing due to overlapping deletion", and `<*>` is the gVCF
unspecified allele, `DEL`/`INS`/`DUP`/`INV`/`CNV` are structural-variant
types. Now the symbolic allele `<ABS>` (free-form ID, declared by a
`##ALT=<ID=ABS,...>` line, always written in the header, listed after the
bases); `?` and IUPAC ambiguity codes stay `.` (haploid GT cannot express a
genome carrying several forms; superseded below). A symbolic ALT formally
asks for a padding base before `POS`; moot here, positions being virtual.
Checked with `bcftools view`/`stats` and `tabix`: no warning, the sites with
`<ABS>` are classed "others" by `bcftools stats`, and
`-e 'ALT="<ABS>"'` drops exactly them. The writer needs no knowledge of
`--free-loss`: `-` simply never occurs with it. A reference-genome option
(`--vcf-ref`) was implemented then dropped: `REF` is always the per-site
majority base (alphabetical on ties).
@@ -2916,7 +2924,7 @@ per sample/site), but an obikmer cell only says *which* forms a genome
carries, not their multiplicity (`A/A/G` and `A/G/G` are both `R`), nor
whether several forms mean heterozygosity or paralogues. Compromise chosen:
`--no-ambiguity` => haploid (ambiguous cells are already `?`); otherwise
diploid, single base `X` -> `X/X`, two-base code -> `X/Y`, `-` -> `*/*`, and
diploid, single base `X` -> `X/X`, two-base code -> `X/Y`, `-` -> `<ABS>/<ABS>`, and
three/four-base codes or `?` -> `./.`. `REF` is the majority allele counting
each copy once (so a het contributes 1+1, a homozygote 2). Counting copies
for a real dosage (polyploids) would need k-mer counts (`--with-counts`),