Sliding-window analog of parse_chr_log. Parses one log_chunk_NNNN.txt (written by the per-chunk scan runner) into a one-row summary plus a per-window error data.frame.

parse_chunk_log(log_path)

Arguments

log_path

Character. Path to a log_chunk_NNNN.txt file.

Value

A list with:

$summary

one-row data.frame: chunk_id, run_name, chr, chunk_start, chunk_end, est_n_windows, n_windows, n_ok, n_skip_empty, n_staar_skip_single, n_error, engine_runtime_secs, wall_secs. NA-filled fields for an incomplete run.

$errors

data.frame with columns chunk_id, chr, label, message (0 rows if no errors).

Details

Accepts both the older "[ts] Starting chunk N: chrX [a, b], ..." header and the newer "[ts] Starting chunk N [run R]: chrX [a, b], ..." header (run_name is NA when absent), so existing per-chunk logs parse without regeneration. The window label always matches "chrN:start-end", which lets the parser locate the colon separating label from message even though the label itself contains a colon.