Convert an immunarch Object into an ImmunData Dataset
Source:R/io_immundata_conversion.R
from_immunarch.RdThe from_immunarch() function takes an immunarch object (as returned by
immunarch::repLoad()), writes each repertoire to a TSV file with an added
filename column in a specified folder, and then imports those files into
an ImmunData object via read_repertoires().
Arguments
- imm
A list returned by
immunarch::repLoad(), typically containing:data: a named list ofdata.frames, one per repertoire.meta: (optional) adata.frameof sample metadata.
- output_folder
Path to the output directory where the resulting ImmunData Parquet files will be stored. This directory will be created if it does not already exist.
- schema
Character vector of column names that together define unique receptors (for example,
c("CDR3.aa", "V.name", "J.name")).- temp_folder
Path to a directory where intermediate TSV files will be written. Defaults to
file.path(tempdir(), "temp_folder").
Value
An ImmunData object containing all repertoires from the input
immunarch object, with data saved under output_folder.