Reads one delimited file per sample subfolder and row-binds the result,
tagging each row with Sample_fp (the subfolder name). The dictionary-driven
counterpart of read_fragpipe_batch() / read_diann_batch(), with the
filename and delimiter taken from the dictionary's read: block instead of
being hard-coded. Three input modes are checked in priority order:
Usage
read_custom_batch(
folder = NULL,
annotation = NULL,
files = NULL,
file = "results.tsv",
delim = "\t",
testmode = FALSE
)Arguments
- folder
Top-level directory. Required for the
annotationand scan-all modes; unused whenfilesis supplied.- annotation
Optional annotation data frame (output of
read_annot()). When provided withoutfiles, only itsSample_fpentries are read.- files
Optional character vector of file paths or parent folder paths.
- file
Filename to read inside each sample subfolder (e.g.
"psm.tsv").- delim
Field delimiter passed to
readr::read_delim()("\t"for tsv,","for csv).- testmode
Logical; if
TRUE, keeps only the first ~100 rows per run (auto-detectedRun/Spectrumcolumn, else per file).
Value
The merged raw data frame across every file found, with Sample_fp
identifying the source subfolder of each row.
Details
files— character vector of file paths or their parent folders; sample names are taken from the immediate parent folder.annotation— onlySample_fpentries listed in the annotation table are read fromfolder; warns about annotated samples not found on disk.neither —
folderis scanned recursively for every file namedfile.