R/read_all_chr_results.R
read_all_chr_results.RdConcatenates the 22 per-chr gene-level result CSVs into a single data.frame in genomic order (chr 1..22, then ascending start). Errors loudly if any chr is missing or if column schemas differ across chrs.
read_all_chr_results(results_dir, chroms = 1:22, pattern = "glow_chr%d.csv")A data.frame of the requested per-chr rows concatenated and sorted into genomic order.
The per-chr filenames are built as sprintf(pattern, chroms) under
results_dir. The default chroms = 1:22 + pattern
reproduces the gene-module glow_chr{N}.csv genome-wide behaviour
exactly; pass chroms to aggregate only a subset (e.g. a single-chr
smoke run). After reading, every file's column schema is compared against the
first and the rows are returned ordered by (as.integer(chr), start).