{"name":"@skiffyard/mitoleaf","description":"Reader for the mitoLEAF human mitochondrial phylogeny: haplogroup tree, motif accumulation with back mutations, and nearest-haplogroup lookup.","versions":{"0.5.0":{"version":"0.5.0","kind":"git","url":"https://github.com/skiffyard/deck-mitoleaf.git","ref":"0.5.0","commit":"1d1f6271ce1a0a3aa7382951380aa9c5867d5cb9","checksum":"","yanked":false,"license":"LGPL-3.0-only","requires":{"@deckyard/forensicgenetics":"\u003e=0.1.0"},"engines":{"jennifer":"\u003e=0.27.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":"1795879194","repoId":1432115666,"repoOwnerId":362133827,"repoOwner":"skiffyard"}},"readme":"# @skiffyard/mitoleaf\n\n[![test](https://github.com/skiffyard/deck-mitoleaf/actions/workflows/test.yml/badge.svg)](https://github.com/skiffyard/deck-mitoleaf/actions/workflows/test.yml)\n[![docs](https://github.com/skiffyard/deck-mitoleaf/actions/workflows/docs.yml/badge.svg)](https://github.com/skiffyard/deck-mitoleaf/actions/workflows/docs.yml)\n[![release](https://img.shields.io/github/v/release/skiffyard/deck-mitoleaf)](https://github.com/skiffyard/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.\n\nThis deck is part of [Skiffyard](https://github.com/skiffyard), small community decks for [Jennifer](https://jennifer-lang.dev/).\n\nManual: **\u003chttps://skiffyard.github.io/deck-mitoleaf/\u003e**\n\n## Install\n\nRequires Jennifer 0.27.0 or newer.\n\n```sh\njvc add \"@skiffyard/mitoleaf\" \"^0.5.0\"\njvc install\n```\n\njvc vendors the deck to `vendor/skiffyard/mitoleaf/` and pulls in\n`@deckyard/forensicgenetics` with it. Without jvc, copy the `src/` of both\ndecks (from a checkout or a `skiffyard-mitoleaf-\u003cversion\u003e.tar.gz` release\narchive) by hand:\n\n```sh\nmkdir -p vendor/skiffyard/mitoleaf vendor/deckyard/forensicgenetics\ncp path/to/deck-mitoleaf/src/*.j         vendor/skiffyard/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 \"@skiffyard/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://skiffyard.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\n## Trademarks\n\nmitoLEAF™, EMPOP™, HaploGrep™ and PhyloTree™ may be trademarks of their\nrespective owners. They are used only to identify the data and tools this\ndeck works with. This deck is an independent project, not affiliated with,\nsponsored or endorsed by the authors of mitoLEAF, EMPOP, HaploGrep or\nPhyloTree.\n","movedFrom":["@deckyard/mitoleaf"]}