format_chr: Format chromosome names

View source: R/utils.R

format_chrR Documentation

Format chromosome names

Description

Transform 1 to 22, X, Y and MT into chr1 to chr22, chrX, chrY and chMT. Regex needed because some chr are named CHR17_... and we do not want chrCHR17

Usage

format_chr(chr)

Arguments

chr

a vector of chromosome names

Value

the formatted vector of chromosome names (eg: "chr1" instead of "1")


MCorentin/vargen documentation built on Feb. 6, 2024, 2:32 p.m.