{"name":"@deckyard/mitoleaf","description":"Reader for the mitoLEAF human mitochondrial phylogeny: haplogroup tree, motif accumulation with back mutations, and nearest-haplogroup lookup.","versions":{"0.1.0":{"version":"0.1.0","kind":"git","url":"https://github.com/deckyard/deck-mitoleaf.git","ref":"0.1.0","commit":"a7194806f8fc7c01de34e20f88638d3c882cf9eb","checksum":"","yanked":false,"license":"LGPL-3.0-only","requires":{"@deckyard/forensicgenetics":"\u003e=0.1.0"},"engines":{"jennifer":"\u003e=0.25.0"},"capabilities":[],"keywords":["mtdna","mitochondrial","haplogroup","phylogeny","mitoleaf"],"description":"Reader for the mitoLEAF human mitochondrial phylogeny: haplogroup tree, motif accumulation with back mutations, and nearest-haplogroup lookup.","publishedAt":"1793219844","repoId":1432115666,"repoOwnerId":346943577,"repoOwner":"deckyard"},"0.2.0":{"version":"0.2.0","kind":"git","url":"https://github.com/deckyard/deck-mitoleaf.git","ref":"0.2.0","commit":"ea835e6966e08ff805dba49238c5a05e4e5a1804","checksum":"","yanked":false,"license":"LGPL-3.0-only","requires":{"@deckyard/forensicgenetics":"\u003e=0.1.0"},"engines":{"jennifer":"\u003e=0.25.0"},"capabilities":[],"keywords":["mtdna","mitochondrial","haplogroup","phylogeny","mitoleaf"],"description":"Reader for the mitoLEAF human mitochondrial phylogeny: haplogroup tree, motif accumulation with back mutations, and nearest-haplogroup lookup.","publishedAt":"1793647309","repoId":1432115666,"repoOwnerId":346943577,"repoOwner":"deckyard"}},"readme":"# @deckyard/mitoleaf\n\n[![test](https://github.com/deckyard/deck-mitoleaf/actions/workflows/test.yml/badge.svg)](https://github.com/deckyard/deck-mitoleaf/actions/workflows/test.yml)\n[![docs](https://github.com/deckyard/deck-mitoleaf/actions/workflows/docs.yml/badge.svg)](https://github.com/deckyard/deck-mitoleaf/actions/workflows/docs.yml)\n[![release](https://img.shields.io/github/v/release/deckyard/deck-mitoleaf)](https://github.com/deckyard/deck-mitoleaf/releases/latest)\n\nReads the [mitoLEAF](https://forensicgenomics.github.io/mitoLeaf/) human\nmitochondrial phylogeny (the maintained successor to PhyloTree), turns a\nhaplogroup into its defining haplotype with back mutations applied, and finds\nthe haplogroup nearest an observed haplotype. Haplotypes are\n`lineage.MtHaplotype` values from\n[`@deckyard/forensicgenetics`](https://github.com/deckyard/deck-forensicgenetics).\nPure Jennifer, TinyGo-clean.\n\nManual: **\u003chttps://deckyard.github.io/deck-mitoleaf/\u003e**\n\n## Install\n\nRequires Jennifer 0.25.0 or newer.\n\n```sh\njvc add \"@deckyard/mitoleaf\" \"^0.1.0\"\njvc install\n```\n\njvc vendors the deck to `vendor/deckyard/mitoleaf/` and pulls in\n`@deckyard/forensicgenetics` with it. Without jvc, copy the `src/` of both\ndecks (from a checkout or a `deckyard-mitoleaf-\u003cversion\u003e.tar.gz` release\narchive) by hand:\n\n```sh\nmkdir -p vendor/deckyard/mitoleaf vendor/deckyard/forensicgenetics\ncp path/to/deck-mitoleaf/src/*.j         vendor/deckyard/mitoleaf/\ncp path/to/deck-forensicgenetics/src/*.j vendor/deckyard/forensicgenetics/\nrm -f vendor/deckyard/*/*_test.j\n```\n\n## Example\n\nNo tree is bundled; download the phm XML from mitoLEAF.\n\n```jennifer\nimport \"@deckyard/mitoleaf/\" as mitoleaf;\nimport \"@deckyard/forensicgenetics/lineage.j\" as lineage;\n\ndef t as mitoleaf.Tree init mitoleaf.parse(fs.readString(\"mitoLEAF_phm.xml\"));\n\nmitoleaf.path($t, \"L0a1\");                               # root first\nmitoleaf.motif($t, \"L0a1\");                              # this node's own tokens\nlineage.mtDesignations(mitoleaf.haplotype($t, \"L0a1\"));  # accumulated haplotype\n\ndef m as mitoleaf.Match init mitoleaf.assign($t, $observed);\n```\n\n`assign` is a nearest-neighbour report, not a haplogroup classifier; see\n[Limitations](https://deckyard.github.io/deck-mitoleaf/project/limitations.html).\n\n## Tests\n\nFrom the deck root (the example reads `testdata/tree.xml`):\n\n```sh\njennifer test src/mitoleaf_test.j\njennifer run examples/haplogroups.j\n```\n\n## Citing mitoLEAF\n\n\u003e Huber N, Hurmer N, Dür A, Parson W. mitoLEAF: mitochondrial DNA Lineage,\n\u003e Evolution, Annotation Framework. *NAR Genomics and Bioinformatics* 7(2),\n\u003e 2025. \u003chttps://doi.org/10.1093/nargab/lqaf079\u003e\n\nmitoLEAF data is MPL-2.0; none is redistributed here.\n\n## Licence\n\nLGPL-3.0-only, see [LICENSE](LICENSE). Copyright (C) 2026 mplx \u0026lt;mplx@jennifer-lang.dev\u0026gt;.\n"}