Skip to content
@tatami-inc

tatami libraries and extensions

A variety of wild and wacky matrix representations in C++

Matrix representations in C++

About

(No, we're not really a corporation. I couldn't get the @tatami or @tatami-galaxy handles because they were already taken.)

tatami is a C++ library that implements read access to a variety of matrix representations through a common interface. Developers can use this interface to create applications that can extract data from diverse matrix representations, whether it be dense or sparse, row-major or column-major, in-memory or file-backed, with or without delayed operations, and so on. It was initially developed to support scalable analyses of genomics datasets, where the matrix representation can be easily substituted depending on the circumstances. tatami-powered applications can thus be used to process small in-memory matrices on a laptop, or large file-backed matrices on a high performance compute node.

Matrix representations currently supported by tatami include:

  • Dense row/column major matrices, with user-defined storage modes and containers.
  • Compressed sparse row/column matrices, with user-defined storage modes and containers.
  • Matrices generated by delayed operations, stolen inspired by those in DelayedArray.
  • Matrices backed by HDF5 files, either as dense datasets or in a compressed sparse format.
  • Matrices backed by dense or sparse TileDB arrays.
  • Wrappers around R matrices that cannot be transformed into the above types, for use within R packages.

Getting started

Using C++

tatami is implemented as a header-only C++ library and can be dropped directly into an existing C++ project, either manually or via CMake. Check out the repository for more details on the tatami::Matrix interface.

tatami extensions implement more complex matrix representations and can be included by applications on an as-needed basis. As these often depend on additional third-party libraries, they are not included as part of the core library.

  • tatami_hdf5 provides representations for HDF5-backed matrices.
  • tatami_tiledb provides representations for TileDB-backed matrices.
  • tatami_r provides representations for unknown R matrices.
  • tatami_mtx enables loading of Matrix Market files into tatami matrices.

Using R

The beachmat R package (Bioconductor, GitHub) vendors the tatami library, allowing R package developers to compile their C++ code against the tatami interface. It also implements the initializeCpp() generic that maps an abstract R matrix to a suitable tatami representation for immediate use by the package's C++ code.

beachmat has several extension packages that mirror those of tatami. These can be imported by package developers or users on an as-needed basis, assuming that the additional dependencies are acceptable.

Using Python

The mattress vendors the tatami library, allowing Python package developers to... well, see the beachmat description above. Like beachmat, mattress implements the tatamize() generic function that maps various Python matrices into a suitable C++ representation.

Use cases

The scran.js Javascript package compiles tatami to WebAssembly to enable single-cell analyses in the browser via kana.

The SingleR R package uses beachmat to implement matrix representations for the associated C++ cell type annotation library.

The scranpy Python package uses mattress to perform single-cell analyses based on methods in the libscran library.

Got a use case that you'd like to advertise? Make a PR and add it here!

Contributors

LTLA aboyoun

Hopefully this will be a bit less lonely soon.

References

Lun ATL, Pagès H, Smith ML (2018). "beachmat: A Bioconductor C++ API for accessing high-throughput biological data from a variety of R matrix types." PLoS Comput. Biol., 14(5), e1006135. doi:10.1371/journal.pcbi.1006135

Popular repositories Loading

  1. tatami tatami Public

    C++ API for various matrix types.

    C++ 13 2

  2. archive-beachmat archive-beachmat Public archive

    An archived version of the beachmat repository, see https://github.com/LTLA/beachmat for the active version.

    C++ 8

  3. beachmat beachmat Public

    Clone of the Bioconductor repository for the beachmat package.

    C++ 4 4

  4. tatami_r tatami_r Public

    tatami bindings for abstract R matrices

    C++ 1

  5. manticore manticore Public

    C++ library for main thread execution

    C++ 1

  6. developer-guide developer-guide Public

    Developer guide for tatami libraries

    1

Repositories

Showing 10 of 23 repositories
  • beachmat Public

    Clone of the Bioconductor repository for the beachmat package.

    tatami-inc/beachmat’s past year of commit activity
    C++ 4 4 4 0 Updated Nov 11, 2024
  • beachmat.hdf5 Public

    Beachmat extensions for HDF5 matrices

    tatami-inc/beachmat.hdf5’s past year of commit activity
    R 0 0 0 0 Updated Nov 8, 2024
  • beachmat.tiledb Public

    Beachmat extensions for TileDB matrices

    tatami-inc/beachmat.tiledb’s past year of commit activity
    R 0 0 0 0 Updated Nov 8, 2024
  • tatami_chunked Public

    Developer utilities for creating chunked matrix representations

    tatami-inc/tatami_chunked’s past year of commit activity
    C++ 0 MIT 0 1 0 Updated Nov 7, 2024
  • tatami_tiledb Public

    tatami bindings for TileDB-backed matrices

    tatami-inc/tatami_tiledb’s past year of commit activity
    C++ 0 MIT 0 0 0 Updated Nov 7, 2024
  • developer-guide Public

    Developer guide for tatami libraries

    tatami-inc/developer-guide’s past year of commit activity
    1 MIT 0 0 0 Updated Nov 3, 2024
  • tatami_r Public

    tatami bindings for abstract R matrices

    tatami-inc/tatami_r’s past year of commit activity
    C++ 1 MIT 0 0 0 Updated Nov 3, 2024
  • tatami_mult Public

    Matrix multiplication for tatami

    tatami-inc/tatami_mult’s past year of commit activity
    C++ 0 MIT 0 0 0 Updated Nov 3, 2024
  • tatami_stats Public

    Matrix statistics for tatami

    tatami-inc/tatami_stats’s past year of commit activity
    C++ 0 MIT 0 1 0 Updated Nov 3, 2024
  • tatami Public

    C++ API for various matrix types.

    tatami-inc/tatami’s past year of commit activity
    C++ 13 MIT 2 2 0 Updated Nov 3, 2024

Top languages

Loading…

Most used topics

Loading…