Pre-compute and save per-bin GC content to a TSV.bgz file
nipter_gc_precompute.RdRuns rduckhts_fasta_nuc() once and writes the GC percentage table to
a bgzipped, tabix-indexed TSV file. Pass the resulting path to
nipter_gc_correct(gc_table = ...) to avoid recomputing GC content for
every sample in a large cohort.
Details
The output is a 5-column, tab-delimited TSV.bgz:
chrom, start, end, pct_gc, seq_len.
Coordinates are 0-based half-open intervals (BED convention). Chromosomes
use no chr prefix (1–22, X, Y).
Bins where all bases are N are written with pct_gc = NA.
Examples
if (FALSE) { # \dontrun{
nipter_gc_precompute("hg38.fa", binsize = 50000L, out = "hg38_gc_50k.tsv.bgz")
cg <- nipter_gc_correct(cg, gc_table = "hg38_gc_50k.tsv.bgz")
} # }