chromosome2integer: Converts chromosome to integer

Description Usage Arguments Details Value Author(s) Examples

View source: R/functions.R

Description

Coerces character string for chromosome in the pd. annotation packages to integers

Usage

1
2

Arguments

chrom

A one or 2 letter character string (e.g, "1", "X", "Y", "MT", "XY")

intChrom

An integer vector with values 1-25 possible

Details

This is useful when sorting SNPs in an object by chromosome and physical position – ensures that the sorting is done in the same way for different objects.

Value

integer2chromosome returns a vector of character string indicating the chromosome the same length as intChrom. chromosome2integer returns a vector of integers the same length as the number of elements in the chrom vector.

Author(s)

R. Scharpf

Examples

1
2
	chromosome2integer(c(1:22, "X", "Y", "XY", "M"))
	integer2chromosome(chromosome2integer(c(1:22, "X", "Y", "XY", "M")))

oligoClasses documentation built on Nov. 8, 2020, 5:32 p.m.