Skip to contents

This function formats genomic coordinates in a human-readable way (e.g., 1Mb, 500kb).

Usage

format_genomic_coord(x, unit_suffix = "b")

Arguments

x

Numeric vector of genomic coordinates

unit_suffix

Suffix to use for the unit (default: "b" for base pairs)

Value

Character vector of formatted coordinates

Examples

if (FALSE) { # \dontrun{
format_genomic_coord(c(1000, 1000000, 1500000))
# [1] "1kb" "1Mb" "1.5Mb"
} # }