chr2int: Convert chromosome string to integer

Description Usage Arguments Value Examples

Description

Convert chromosome string to integer.

Usage

1
chr2int(x, prefix = NULL)

Arguments

x

Character vector of chromosome strings to be converted to integer.

prefix

Prefix to be removed from chromosome strings before conversion.

Value

Returns chromosome numbers associated with chromosome strings in x as integers.

Examples

1
2
3
4
library(genFun)

chr2int(c("1", "MT", "X", "Y"))
chr2int(c("chr1", "chrMT", "chrX", "chrY"), prefix = "chr")

cbaumbach/genFun documentation built on May 13, 2019, 1:47 p.m.