agg_strata: Aggregate repertoires into strata

View source: R/operations_agg_strata.R

agg_strataR Documentation

Aggregate repertoires into strata

Description

Creates a strata layer above repertoires by grouping idata$repertoires with user-selected metadata columns.

This enables a hierarchy of chains -> barcodes -> receptors -> repertoires -> strata.

Usage

agg_strata(idata, by, strata_name_prefix = "Strata")

Arguments

idata

An ImmunData object with repertoire aggregation already available (run agg_repertoires() first).

by

Character vector of columns in idata$repertoires used to define strata.

strata_name_prefix

Character(1). Prefix for automatic strata labels in strata_name. Default: "Strata".

Value

A new ImmunData object where:

  • ⁠$repertoires⁠ includes imd_strata_id and strata_name;

  • ⁠$annotations⁠ includes imd_strata_id (joined by imd_repertoire_id).

strata_name is stored only in ⁠$repertoires⁠ and is not copied into ⁠$annotations⁠.

See Also

agg_repertoires(), rename_strata(), ImmunData


immundata documentation built on April 4, 2026, 9:09 a.m.