imd_schema_sym: Developer helpers for ImmunData schemas and storage

View source: R/globals.R

imd_schema_symR Documentation

Developer helpers for ImmunData schemas and storage

Description

These helpers expose package constants for extension developers. They are not needed for routine biological analysis. Use imd_schema() for a standard column name and make_receptor_schema() to define biological receptors.

The functions remain exported for compatibility with packages that extend immundata, but their values describe implementation details and may grow as the storage format develops.

Usage

imd_schema_sym(key = NULL)

imd_meta_schema()

imd_files()

imd_repertoire_schema(format = "airr")

imd_receptor_features(schema)

imd_receptor_chains(schema)

Arguments

key

A character string or NULL. For imd_schema_sym(), one schema key accepted by imd_schema(). Use NULL, the default, to return the complete named schema list.

format

A character string. For imd_repertoire_schema(), the preset name. Currently only "airr" is accepted.

schema

A receptor-schema list. For imd_receptor_features() and imd_receptor_chains(), a schema created by make_receptor_schema().

Value

  • imd_schema_sym() returns an rlang symbol for one standard column. With key = NULL, it returns the complete named schema list.

  • imd_meta_schema() returns a named list of fields used in metadata.json.

  • imd_files() returns a named list of standard snapshot file names.

  • imd_repertoire_schema() returns the configured preset for format, or NULL when no preset is configured.

  • imd_receptor_features() returns the character vector in schema$features.

  • imd_receptor_chains() returns the character vector in schema$chains, or NULL for a chain-agnostic schema.

Examples

schema <- make_receptor_schema(
  features = c("junction_aa", "v_call"),
  chains = c("TRA", "TRB")
)

imd_receptor_features(schema)
# Expected result: c("junction_aa", "v_call")

imd_receptor_chains(schema)
# Expected result: c("TRA", "TRB")

imd_files()
# Lists the standard metadata and Parquet file names.


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