Date: 2026-05-05

# Assortment of header-only libraries

Aaron Lun*

*infinite.monkeys.with.keyboards@gmail.com

#### 2026-05-05

#### Package

assorthead 1.7.2

# Contents

# 1 Overview

assorthead vendors an assortment of header-only C++ libraries for use in Bioconductor packages. The use of a central repository avoids duplicate vendoring of libraries across multiple R packages, and enables better coordination of version updates across cohorts of interdependent C++ libraries. This package is minimalistic by design to ensure that downstream packages are not burdened with more transitive dependencies.

# 2 Quick start

To use assorthead in a Bioconductor package, just add it to the `LinkingTo` field in the `DESCRIPTION`:

    LinkingTo: assorthead

The package C++ code can `#include` any of the available libraries, for example:

    #include "Eigen/Dense"
    #include "annoy/annoylib.h"
    #include "annoy/kissrandom.h"
    #include "tatami/tatami.hpp"

# 3 Available libraries

Name | Version | Description
--- | --- | ---
tatami | v4.1.0 | C++ API for matrix representations
tatami_stats | v2.0.3 | Compute statistics from tatami matrices
tatami_mult | v0.1.3 | Multiplication of tatami matrices
tatami_chunked | v2.1.0 | tatami extension for chunked matrices
manticore | v1.0.3 | Execute arbitrary functions on the main thread
tatami_r | v2.0.6 | tatami extension for R matrices
tatami_hdf5 | v2.0.6 | tatami extension for HDF5 matrices
tatami_tiledb | v2.0.1 | tatami extension for TileDB matrices
tatami_mtx | v2.1.2 | Read and write Matrix Market files from tatami matrices
eminem | v1.2.1 | No-frills library to parse Matrix Market files
byteme | v2.1.3 | C++ interfaces for reading/writing byte buffers
aarand | v1.1.0 | Lightweight random distribution functions
powerit | v2.0.1 | Power iterations
irlba | v3.1.0 | C++ port of IRLBA, based on the irlba R package
irlba_tatami | v0.1.0 | tatami wrappers for IRLBA
WeightedLowess | v2.1.4 | Lowess trend fitting with weights, à la `limma::weightedLowess`
kmeans | v4.0.6 | C++ port of `stats::kmeans` with various initialization methods
kmeans_tatami | v0.1.1 | tatami wrappers for k-means clustering
knncolle | v3.1.0 | C++ API for nearest-neighbor searches
knncolle_annoy | v0.3.0 | knncolle extension for Annoy
knncolle_hnsw | v0.3.2 | knncolle extension for HNSW
knncolle_kmknn | v0.2.0 | knncolle extension for HNSW
knncolle_tatami | v0.1.0 | knncolle extension for HNSW
kaori | v1.2.0 | Sequence alignment and counting for CRISPR guides
nenesub | v0.2.1 | Subsampling based on nearest neighbors
partisub | v0.1.0 | Subsampling within partitions
raiigraph | v1.2.0 | C++ wrappers around igraph data structures
scran_qc | v0.2.0 | Simple quality control for single-cell data
scran_norm | v0.2.3 | Scaling normalization for single-cell data
scran_variances | v0.2.3 | Variance modelling and feature selection for single-cell data
scran_pca | v0.4.0 | Principal components analysis for single-cell data
scran_graph_cluster | v0.3.1 | Graph-based clustering for single-cell data
scran_markers | v0.3.2 | Marker detection for groups of interest in single-cell data
scran_aggregate | v0.3.2 | Aggregating expression data for groups of cells
scran_blocks | v0.1.2 | Blocking utilities for all libscran libraries
annoy | v1.17.3 | Approximate nearest neighbors oh yeah
hnswlib | v0.9.0 | Hierarchical navigable small worlds for finding nearest neighbors
Eigen | 5.0.1 | C++ template library for linear algebra
gsdecon | v0.2.0 | Compute gene set scores via eigengenes
clrm1 | v0.2.1 | Scaling normalization for single-cell ADT counts
mnncorrect | v3.0.2 | Batch correction with mutual nearest neighbors
qdtsne | v3.0.2 | Quick-and-dirty t-SNE in C++
umappp | v3.3.2 | C++ implementation of the UMAP algorithm
mumosa | v0.2.1 | Simple multi-modal analyses of single-cell data
phyper | v0.1.1 | Hypergeometric tail calculations for enrichment testing
subpar | v0.5.0 | Substitutable parallelization for C++ libraries
singlepp | v3.1.0 | Cell type annotation for single-cell expression data
singler_classic_markers | v0.1.2 | Classic marker detection for SingleR
millijson | v2.1.0 | Lightweight JSON parsing library
uzuki2 | v2.1.0 | Storing simple R lists inside HDF5 or JSON
ritsuko | v0.6.1 | Helper functions for ArtifactDB libraries
takane | v0.10.0 | ArtifactDB file validators
chihaya | v1.1.2 | A C++ validator for delayed array operations
sanisizer | v0.2.2 | Sanitize sizes to avoid integer overflow
topicks | v0.2.2 | Pick top genes for downstream analyses
factorize | v0.1.0 | Pick top genes for downstream analyses

# 4 Using interfaces

The beachmat package contains the `initializeCpp()` function, which creates an external pointer to a `tatami::Matrix`. Similarly, the BiocNeighbors package can create external pointers to various knncolle objects via its `defineBuilder()` and `buildIndex()` functions. Downstream packages can use these pointers in their own C++ code by compiling against the relevant interfaces in assorthead. This means that downstream packages do not need to re-compile all of the relevant header libraries to get full functionality of beachmat, BiocNeighbors, etc. It also allows the C++ code of downstream packages to handle extensions to each framework, e.g., new matrix types in beachmat.hdf5. Check out each of the packages for more specific instructions on how to use its external pointers.

# 5 Contributing

If you want to add new libraries or update existing versions, make a pull request with appropriate motifications in the `inst/fetch.R` file.