Write an interactive HTML atlas of the gifter database
Source:R/database-visualization.R
write_gifter_database_html.RdCreates a dependency-free HTML report that opens on an introduction to the database – its counts, the evaluation layers of each GIFT type, the distribution of modes, compartments and marker namespaces, and the release versions – followed by a searchable guide to curated frames, a complete biological hierarchy, the relational data model, and a searchable browser for every table. Two network views are drawn as inline SVG. The overview network draws every GIFT together with its declared anchors as an unlabelled force directed map in which a GIFT is a large dot and an anchor a small one: hovering a dot dims everything it is not connected to and prints its identifier, boundaries, and content, and clicking a GIFT opens it in the explorer. Two menus recolour that drawing by curated metadata – GIFTs by type, mode, substrate class, or physiological role, anchors by boundary use, compartment, molecular tier, resource origin, or biomass essentiality – and the key for whichever scheme is showing sits in the corner of the figure. The second network is drawn for each GIFT: a merged route network in which alternative routes are overlaid on the reactions they share. The GIFT table can be grouped by category and filtered by start and end anchor. Each GIFT and each named frame has its own page, addressed as `#gifts/<gift_id>` or `#frames/<frame_id>`. A GIFT page links its reactions, markers and related pathways to their public records, shows where each marker was accepted from, and lists the curation documents, analysis scripts and result tables behind its definition, linked to the source repository at the release commit. An expansion-attempts view, reached from the Curation menu at `#attempts`, renders the catalogue-expansion attempt log shipped with the package: one row per investigation with its implemented, deferred and refused candidates, and a page per attempt at `#attempts/<attempt_id>` that links its implemented GIFTs, related attempts and source documents. The Changes view lists every recorded database change, and each change has a page at `#changelog/<change_id>` with its rationale, evidence, effect and affected GIFTs; a GIFT page links to the page of each change in its history. All styles, scripts, and data are embedded so the output can be opened or shared as one file.