Learn R Programming

CNAnorm (version 1.18.0)

chromosomesPosition: Accessors methods for Function ratio in Package `CNAnorm'

Description

chrs returns/set the name of chromosomes/contigs

arms retruns the name of the chromosome and arm. A data frame containing ideogram information has to be provided. See ?hg19_hs_ideogr for an example

pos returns/set the position of starting window. Be careful! If you need to change data, it is better to change the input data and start over.

Usage

chrs(object) "pos"(object, show = "start") "arms"(object, banding_df)

Arguments

object
An object of Class "CNAnorm"
show
The position to show: 'start', 'end'
banding_df
A data frame with infromation about ideogram

Value

and arms return a character vector, pos returns a numeric vector

See Also

gcNorm, CNAnorm-class, hg19_hs_ideogr

Examples

Run this code
data(LS041)
data(hg19_hs_ideogr)
CN <- dataFrame2object(LS041)
dataFrameNames <- as.character(LS041$Chr)
objectNames <- chrs(CN)
armNames <- arms(CN, hg19_hs_ideogr)
# check the names are, indeed, the same
all(dataFrameNames == objectNames)
# make shorter names, drop the first three letters ('chr')
shortNames <- substr(chrs(CN),4,nchar(chrs(CN)))
chrs(CN) <- shortNames


# retrieve all new names
unique(chrs(CN))
unique(armNames)

Run the code above in your browser using DataLab