Load and Validate a Manifest for Immune Repertoire Files¶
Description¶
This function loads a manifest from either a file path or a data frame, validates the presence of a column with repertoire file paths, and converts all file paths to absolute paths. It is used to support flexible pipelines for loading bulk or single-cell immune repertoire data across samples.
If the input is a file path, the function reads it with
readr::read_delim. If the input is a data frame, it checks
whether file paths are absolute; relative paths are only allowed when
the manifest is loaded from a file.
It warns the user if many of the files listed in the manifest are missing, and stops execution if none of the files exist.
The column with file paths is normalized into the internal filename schema.
Usage¶
read_manifest(
manifest,
file_col = "file",
delim = NULL,
...,
verbose = getOption("immundata.verbose", TRUE)
)
Arguments¶
manifest
|
A manifest table. Can be either:
|
file_col
|
A string specifying the name of the column in the manifest that contains
paths to repertoire files. Defaults to “file”.
|
delim
|
Delimiter used to read the manifest file. If NULL, it is
inferred from the extension: comma for .csv, tab for
.tsv and .txt.
|
…
|
Additional arguments passed to readr::read_delim() when
reading a manifest from a file.
|
verbose
|
Logical(1). Whether to print informative messages. Defaults to
getOption(“immundata.verbose”, TRUE).
|
Value¶
A validated and updated manifest data frame with absolute file paths and
an additional internal column named imd_filename.