format.chromosome.notation: Format chromosome names

View source: R/format-chromosome-utility.R

format.chromosome.notationR Documentation

Format chromosome names

Description

Format chromosome names according to user specifications.

Usage

## S3 method for class 'chromosome.notation'
format(chromosome, chr.prefix, numeric.sex.chr)

Arguments

chromosome

A character vector of chromosome names.

chr.prefix

A logical indicating whether the 'chr' prefix should be used when formatting chromosome name.

numeric.sex.chr

A logical indicating whether the sex chromosomes should be formatted numerically, as opposed to alphabetically.

Value

A character vector of chromosome names formatted according to user specifications.

Examples

numeric.chr <- c(1,2,23,24);
chr.with.prefix <- c('chr1', 'chr2', 'chrX', 'chrY');
format.chromosome.notation(numeric.chr, chr.prefix = TRUE, numeric.sex.chr = FALSE);
format.chromosome.notation(chr.with.prefix, chr.prefix = FALSE, numeric.sex.chr = TRUE);

ApplyPolygenicScore documentation built on April 4, 2025, 12:18 a.m.