| --- |
| license: mit |
| tags: |
| - genomics |
| - microbiology |
| - horizontal-gene-transfer |
| - crispr |
| - causal-inference |
| pretty_name: LEDGER |
| size_categories: |
| - 1M<n<10M |
| --- |
| |
| # LEDGER data |
|
|
| Processed data for LEDGER, a latent-variable model that separates *exposure* from *establishment* |
| when estimating which mobile genetic elements a bacterial genome will accept. Code lives at [bryanc5864/LEDGER](https://github.com/bryanc5864/LEDGER). |
|
|
| The core problem: when an element is missing from a genome, the host either never met it or met it |
| and rejected it. Regressing observed presence on host features estimates the product of those two |
| things, and exposure tracks the same phylogeny as the defense repertoire, so susceptibility is never |
| separately identified. LEDGER uses CRISPR spacers as a record of encounter that survives regardless |
| of the outcome. |
|
|
| ## Contents |
|
|
| ``` |
| simulation/ 5,551 per-fit records from every simulation sweep (JSONL, one object per fit) |
| genomes/ |
| annotations/ DefenseFinder 3.0.0 systems tables for 1,200 P. aeruginosa genomes |
| matrices/ host x defense-system presence matrices, split chromosomal/extrachromosomal |
| crispr/ 27,620 CRISPR spacers (MinCED), pooled and per genome |
| elements/ Y and S matrices: 1,200 hosts x 2,589 spacer-derived elements |
| clusters/ ANI lineage clusters at three thresholds |
| metadata/ NCBI assembly metadata and the stratified cohort definition |
| results/ exclusion-restriction audit, CRISPR proximity test, real-data fit output |
| figures/ every figure in the paper, PNG and PDF |
| main.pdf the paper |
| ``` |
|
|
| ## The two matrices |
|
|
| `genomes/elements/Y.tsv.gz` and `S.tsv.gz` are the observables the model consumes. Rows are the |
| 1,200 genomes, columns the 2,589 elements. `S[i,j] = 1` means host *i* carries a CRISPR spacer |
| targeting element *j*, so it demonstrably encountered it. `Y[i,j] = 1` means the element (strictly, |
| a >= 95% identity match to the protospacer, outside any CRISPR array) is resident in that genome. |
|
|
| Three things about this data are worth knowing before using it: |
|
|
| - The informative cell, encounter without establishment, holds 25,099 pairs. |
| - Self-targeting pairs (spacer present *and* element resident) are depleted 0.54x relative to |
| independence, which is what the model predicts, since a spacer against a resident element is |
| self-targeting and gets purged. |
| - The false-match rate is zero: 2,589 dinucleotide-shuffled decoy sequences produced no hits at all |
| against the same 1,200 genomes under identical search settings. |
|
|
| CRISPR arrays were masked out of the genomes before searching. Without that step every spacer |
| matches its own array, `Y` becomes identical to `S`, and the informative cell is empty. |
|
|
| ## Simulation records |
|
|
| `simulation/*.jsonl` is one JSON object per model fit: the full configuration, every metric, the |
| realised marginal rates and the convergence status. Nothing is aggregated. Three audit scripts in |
| the code repository recompute all 181 published numbers from these records. |
|
|
| Superseded runs are kept rather than deleted and are named accordingly, including a permutation |
| control that turned out not to be a null and a threat sweep whose arms were confounded by a shared |
| random stream. |
|
|
| ## Raw genomes |
|
|
| Not mirrored here. They are public NCBI assemblies; `make genomes` in the code repository |
| re-downloads them (about 18 GB) and reproduces everything above. |
|
|
| ## License |
|
|
| MIT, Bryan Cheng, 2026. |
|
|