imd_input_columns: Get input-column presets

imd_rename_colsR Documentation

Get input-column presets

Description

Use these helpers to inspect or customize the column renaming and removal presets used by read_repertoires().

imd_rename_cols() returns mappings from standard output names to source names. imd_drop_cols() returns technical columns that can usually be removed before receptors are defined. These functions return definitions only; they do not change input files or an ImmunData object.

Usage

imd_rename_cols(format = "default")

imd_drop_cols(format = "airr")

Arguments

format

A character string. The input format preset. For imd_rename_cols(), use "default" or "10x"; the default is "default". For imd_drop_cols(), use "universal", "airr", or "10x"; the default is "airr".

Value

imd_rename_cols() returns a named character vector in the form c(new_name = "source_name"). imd_drop_cols() returns a character vector of source columns to remove.

See Also

read_repertoires(), make_default_preprocessing(), imd_schema()

Examples

imd_rename_cols("10x")
# Includes c(v_call = "v_gene", locus = "chain").

head(imd_drop_cols("10x"), 3)
# Expected result:
#   "full_length" "is_cell" "contig_id"

# Keep the 10x `contig_id` column while dropping the other default columns.
columns_to_drop <- setdiff(imd_drop_cols("10x"), "contig_id")
custom_preprocessing <- list(
  exclude_columns = make_exclude_columns(columns_to_drop),
  filter_nonproductive = make_productive_filter(
    truthy = c("TRUE", "true", "1")
  )
)


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