splitGenes: Split Genes By Chromosome (Arm)

View source: R/splitGenes.R

splitGenesR Documentation

Split Genes By Chromosome (Arm)

Description

Split Genes By Chromosome (Arm). Input can be one of a matrix to be split into several matrices or a character vector of gene names to be split into several character vectors.

Usage

splitGenes(x, by = "chr")

Arguments

x

a matrix with gene names as rows or a character vector of gene names.

by

a string; one of 'chr' or 'arm', determining how the matrix or character vector should be split. Default: 'chr'

Value

if a matrix was provided, a list of matrices. If a character vector was provided, a list of character vectors. Both lists will be of length # of chromosome (arms) in the genome in question. Ie. length 24 for H.sapiens.

Examples

m = infercna::useData()
a = splitGenes(x = m)
b = splitGenes(x = rownames(m))
all(sapply(a, nrow) == lengths(b))
names(a)
names(splitGenes(x = m, by = 'arm'))

jlaffy/infercna documentation built on Jan. 26, 2024, 11:24 p.m.