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