Finds every *.genes.results file in rsem_dir, takes the sample ID from
the file name (S01.genes.results -> S01), matches the files to the
sample_id column of metadata, and imports the counts with
tximport(type = "rsem").
Details
Import stops when a file lacks the standard RSEM columns, when sample IDs do not match the metadata one-to-one, or when the files do not share an identical gene table (same IDs in the same order, without duplicates).
Metadata columns whose values all parse as numbers become numeric; the rest
become factors. Use categorical/numeric to override.
Examples
ex <- system.file("extdata", "example", package = "rsemflow")
study <- read_rsem_study(file.path(ex, "data"), file.path(ex, "metadata.tsv"))
study
#> <rsemflow_study>
#> samples: 6
#> genes: 200
#> metadata: condition, batch, age
#> created: 2026-10-06 00:37:14 UTC (rsemflow 0.1.1)