A Unified Data Layer for Large-Scale Single-Cell, Spatial and Bulk Immunomics
Overview
Provides a unified data layer for single-cell, spatial and bulk T-cell and B-cell immune receptor repertoire data. Think AnnData or SeuratObject, but for AIRR data, a.k.a. Adaptive Immune Receptor Repertoire, VDJ-seq, RepSeq, or VDJ sequencing data.
This release introduces manifests as the input-file annotation interface and
makes repertoire, strata, and provenance state more explicit and reliable.
Breaking changes
- Renamed the input repertoire metadata interface to avoid confusion with the
metadata.jsonsnapshot file.read_metadata()is replaced byread_manifest(). Inread_repertoires(), usemanifest,manifest_file_col, andpath = "<manifest>"instead ofmetadata,metadata_file_col, andpath = "<metadata>". The default manifest file column is now"file"rather than"File". read_repertoires()now usesrepertoire_schema = "<auto>"by default. This creates one repertoire per input file, or one per manifest row when paths are supplied by a manifest. Setrepertoire_schema = NULLto retain the previous behavior of leaving repertoires undefined.
Show all changes in 0.1.0Hide the rest of the changes in 0.1.0
agg_strata()now uses the argument namesschemaandprefixinstead ofbyandstrata_name_prefix.- Removed the
ImmunData$metadataaccessor. Useidata$repertoiresfor the repertoire definitions and summaries, and use manifests for annotations associated with input repertoire files. - For extension developers,
imd_schema("metadata_filename")is nowimd_schema("manifest_filename"), and the unusedimd_files()$receptorsentry has been removed.
New features and improvements
read_repertoires()now works approximately 60 times faster by combining CSV, TSV, and compressed text inputs into one temporary Parquet file before processing by default. This avoids repeated text scans in downstream duckplyr queries while retaining original input paths in provenance. Useprematerialize = FALSEto disable it orprematerialize_folderto select the temporary storage directory. I recommend you to use it pretty much always.- Added
read_manifest()for CSV, TSV, TXT, and in-memory manifests. It infers common delimiters, resolves file-relative paths, validates file availability, and adds normalized source paths for joining to repertoire data. The specialrepertoire_schema = "<manifest>"value defines repertoires from all manifest columns. - Promoted strata to first-class
ImmunDatastate. Objects now exposeschema_strataand a$stratatable;agg_strata()andrename_strata()update this state, and snapshots persist and restore it. - Added grouped mutation through
.byinmutate_immundata()anddplyr::mutate()methods forImmunData, including a duckplyr-compatible fallback for grouped summary expressions. - Added
conflicts = c("error", "replace")to the annotation functions. Existing annotation columns are protected by default, while intentional replacement is allowed for columns that do not define coreImmunDatastate. mutate(),compute(), and annotation operations now preserve repertoire, strata, and provenance state when the biological grouping has not changed. Filtering and downsampling rebuild affected repertoire and strata summaries and retain existing stratum labels when possible.- Added consistent progress control to manifest reading, repertoire ingestion and aggregation, and snapshot reading and writing. Use
verbose = FALSEfor individual calls oroptions(immundata.verbose = FALSE)globally. - Snapshot metadata now stores repertoire and strata definitions and validates them against the Parquet annotation columns when loading. Older metadata formats remain readable and are upgraded in memory when necessary.
- Provenance now includes derived artifact locations (
artifacts_rootandartifacts_path) associated with the project home and current snapshot.
Bug fixes
- Corrected repertoire-level cell and receptor counts for paired-chain data and prevented chain rows from inflating
n_barcodes,n_receptors, receptor proportions, and repertoire-occurrence counts. - Made
imd_repertoire_idassignment deterministic by ordering repertoire schema values before assigning identifiers. - Scoped single-cell barcodes by source filename during chain selection and pairing, preventing identical barcode strings from different input files from being treated as the same cell.
- Sequence filters now retain every chain belonging to a matched receptor, including exact, regular-expression, Hamming, and Levenshtein matching. Distance calculations no longer use the k-mer prefilter, and temporary DuckDB table names are unique across repeated operations.
- Fixed downsampling with DuckDB 1.5 and later, preserved annotation columns in bulk count mode, retained provenance and strata state, and made
n = 1mean an absolute sampling depth of one. - Hardened ingestion against duplicate manifest paths, negative bulk counts, missing argument columns, and collisions between custom and canonical locus columns.
- Prevented
mutate()and annotation replacement from overwriting system, receptor-schema, repertoire-schema, or strata-defining columns. - Fixed Windows path handling in the test and example infrastructure.
Documentation and maintenance
- Reworked the package documentation around biological units, lazy duckplyr workflows, ingestion, aggregation, filtering, annotation, snapshots, and provenance, and moved website generation to altdoc.
- Removed the unused ggplot2 dependency and raised the minimum supported dplyr version to 1.2.1.
From NEWS.md in the release
Install
Health
- OK13 OK2026-09-29
- ERROR11 OK, 2 ERROR2026-09-04
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
Show 8 earlier changesHide 8 earlier changes
- ERROR12 OK, 1 ERROR2026-06-08
- OK13 OK2026-05-24
- ERROR12 OK, 1 ERROR2026-05-17
- OK13 OK2026-05-15
- ERROR12 OK, 1 ERROR2026-05-13
- OK12 OK2026-04-25
- NOTE11 OK, 3 NOTE2026-04-12
- ERROR7 OK, 7 ERROR2026-03-10
Documentation
- Help pages
- 32 (4 internal)includes a package overview page
- Examples that run
- 90%18 run in a plain check · 2 never run
- Exported functions with examples
- 78%
- Documented parameters
- 92%
- Return-value docs
- 91%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 24
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Releases over time
Issues over time
Commits over time
10 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/immunomind/immundata on 2026-10-22.
GitHub Pages site last deployed 2026-08-26 · The repository has a site deploy workflow
Show all practicesHide 1 practice
Dependencies
Installing immundata adds 42 packages (24 with compiled code, 31 MB of source tarballs). Heaviest: stringi 11 MB, duckdb 7.9 MB, jsonlite 1.0 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.1.0Latest2026-08-26 · current release · diff ↗ ·
removed 2 exports
get_test_immundata, read_metadataadded 1 export
read_manifest - RR 4.6.0 released · 2026-04-24
- 0.0.72026-04-04 · diff ↗
- 0.0.62026-03-17 · diff ↗ ·
added 4 exports
agg_strata, annotate_anndata, downsample_immundata, rename_strata - 0.0.5
- 0.0.32025-09-04 · diff ↗ ·
removed 3 exports
load_immundata, load_metadata, load_repertoiresadded 33 exports
agg_receptors, agg_repertoires, annotate, annotate_barcodes, annotate_chains, annotate_immundata, annotate_receptors, assert_receptor_schema, filter_barcodes, filter_immundata, filter_receptors, from_immunarch, get_test_idata, imd_drop_cols, imd_meta_schema, imd_receptor_chains, imd_receptor_features, imd_rename_cols, imd_repertoire_schema, imd_schema_sym, make_barcode_prefix, make_default_postprocessing, make_default_preprocessing, make_exclude_columns, make_productive_filter, make_receptor_schema, make_seq_options, mutate_immundata, read_immundata, read_metadata and 3 more - RR 4.5.0 released · 2025-04-11
- 0.0.12025-04-08
- RR 4.4.0 released · 2024-04-24
Package metadata
- First published
- 2025-04-08
- Total releases
- 6 / 1 yrs
- License
- Apache License (>= 2)
- Minimum R
- ≥ 4.1.0
- Download size
- 3.6 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("immundata")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.