Skip to content

API Reference

Hifuku is organized as a pipeline of composable modules. The typical call order for a survey is shown below; see the individual pages for full signatures and behavior.

TaxonTable ──► read_tree ──► nj_tree ──► AnchorTriangle.from_anchors
                │                                   │
                └──► load_alignment                 │  (chart + branch-score/RF metric)
                           │                        ▼
                     log_likelihood ◄────── SurveyRun.execute
                     (CPU or GPU)                    │
                                              run_survey (driver)
                                                     │
                                        CpuBackend / CudaBackend
                                                     │
                                              EliteArchive
                                                     │
                        ┌────────────────────────────┴───────────────┐
                        │                                            │
           EliteArchive.surface                       split_coordinates ──► distances
                                                                     │
                                                    mds / ordinate ──► faithfulness

    chart_table ──► ChartTable.select ──► assign_genes ──► FrameworkSpec ──► Framework.build
    (before a survey)                           │
                                                └──► Batch ──► SurveyRun.prepare

Modules

Module Key exports
hifuku.taxa TaxonTable, AlignmentIndex
hifuku.alignment Alignment, load_alignment
hifuku.tree_io HifukuTree, read_tree
hifuku.substitution EigenDecomp, jc69, gtr
hifuku.pruning log_likelihood
hifuku.gpu_pruning log_likelihood_gpu
hifuku.moves nni_move, spr_move, branch_scale_move, branch_slide_move
hifuku.nj nj_tree
hifuku.metric BranchScoreMetric, TreeMetric
hifuku.anchor_triangle AnchorTriangle, TreeMetric, barycentric
hifuku.archive run_archive, EliteArchive, locate_tree
hifuku.gpu_walk run_archive_gpu, evaluate_gpu
hifuku.params ArchiveParams, GpuParams
hifuku.backend Backend, Capabilities, Stats, RunContext
hifuku.device_backend DeviceBackend, DeviceHandle
hifuku.walk_state flatten_host, canonical_flat, relabel_to, tree_from_state, device_grid
hifuku.driver run_survey, ArchiveResult
hifuku.halt qd_halts, growth_exponent, fit_models, budget_message
hifuku.monitor bind_monitor, Checkpoint
hifuku.charts ChartTable, chart_table, assign_genes, smacof
hifuku.ordination split_coordinates, distances, mds, faithfulness
hifuku.framework FrameworkSpec, Framework, FrameworkChart
hifuku.batch Batch, WorkSpec, SurveyTask
hifuku.survey_io Survey, Run, SurveyRecord, SurveyRun, Ordination
hifuku.analysis load, run_chain, qd_history, hypsometric_curve, explored_edge