R/check_scan_completeness.R
check_scan_completeness.RdVerifies that every expected genome chunk produced its result file, so the genome-wide summary does not silently aggregate a partial scan (which would shrink the Bonferroni denominator and inflate the count of significant windows).
check_scan_completeness(output_dir, output_format = "csv")A list with: complete (TRUE iff every expected chunk has a
result file), n_expected, n_present, missing_ids,
not_done_ids (result exists but log never reached "Done";
advisory), n_window_errors (total n_error across finished
chunks), and status (per-chunk data.frame: chunk_id,
has_result, reached_done, n_error).
Expected chunk ids come from <output_dir>/shared/01-genome_chunks.rds;
present chunks are those with a
results/scan_chunk_<id>.<ext> file. For every expected chunk, the
per-chunk log (if present) is parsed via parse_chunk_log to
detect whether the run reached "Done" and how many per-window errors it had.