Calculates the size (length in base pairs) of each genomic window from a vector of window identifiers in "chr_start_end" format.
calculate_window_sizes(genome_window_vector)A numeric vector containing the size of each window in base pairs, calculated as (end position - start position)
The function:
Splits each window identifier into its components
Extracts start and end positions
Calculates window size as the difference between end and start
Assumes window identifiers are properly formatted with underscore separators and numeric start/end positions
if (FALSE) { # \dontrun{
windows <- c("chr1_1000_2000", "chr1_2000_5000", "chr2_1000_3000")
sizes <- calculate_window_sizes(windows)
# Returns: c(1000, 3000, 2000)
} # }