imd_schema: Get a standard ImmunData column name

View source: R/globals.R

imd_schemaR Documentation

Get a standard ImmunData column name

Description

Use imd_schema() when code needs the standard column name for an ImmunData identifier or calculated value, such as the cell barcode, receptor identifier, repertoire identifier, count, or proportion.

Use this helper in reusable analysis code or package extensions instead of writing an internal name such as "imd_barcode" directly. It only returns names; it does not inspect or change an ImmunData object.

Usage

imd_schema(key = NULL)

Arguments

key

A character string or NULL. One schema key, for example "barcode", "receptor", "repertoire", "count", or "proportion". Use NULL, the default, to return all available keys and column names.

Value

If key is supplied, one character string containing the standard column name. If key = NULL, a named list of all schema keys and column names.

See Also

make_receptor_schema(), imd_rename_cols(), ImmunData

Examples

imd_schema("barcode")
# Expected result: "imd_barcode"

imd_schema("receptor")
# Expected result: "imd_receptor_id"

# Use a returned name for programmatic selection.
barcode_column <- imd_schema("barcode")
get_test_idata() |>
  dplyr::collect() |>
  dplyr::select(dplyr::all_of(barcode_column)) |>
  head(2)


immundata documentation built on Aug. 26, 2026, 5:08 p.m.