Description Usage Arguments Details See Also Examples
Visualizing mutational landscape of SMGs.
1 | oncoprinter(mat,cols,legend.panel)
|
mat |
A data frame or mutation matrix to be visualized. |
cols |
A vector of colors used. |
legend.panel |
A data frame of 2 columns. (1) Mutation tag matched in |
See the following example for more info about inputs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | library(lxctk)
data("SMG", package="lxctk")
data("LandscapeColor", package="lxctk")
data("icgc.hcc", package="lxctk") ## ICGC liver cancer data and SMGs selected for NMF clustering.
genes <- names(sort(colSums(icgc.hcc[,Smgs_for_nmf]>2), decreasing=TRUE)) ## Sort by frequency
d <- icgc.hcc[,genes]
#image.color.lixc <- c('white','grey88','#644B39','forestgreen','#FF8B00','#9867CC','#DB1C00', 'black')
## Set the 1st element of image.color.lixc to get rid of background color
image.color.lixc <- c(NA,'grey88','#644B39','forestgreen','#FF8B00','#9867CC','#DB1C00', 'black')
y <- sort.data.frame.by.index(d, rep(0,nrow(d)))
#y <- sort.data.frame.by.index(d, data$nmf_clustid) ## Sort by black of rows specified in nmf_clustid.
legend.panel <- rbind(data.frame(V1=8,V2='TERT.promoter'), legend.panel)
## If there are too many samples, set the following to get colors shown up.
## Especially when figure is saved in pdf format.
#options(grid.lwd=0) ## default is 0.001
#options(land.image.legend.ncol=3) ## reset column number of legend, default is 6.
#pdf('oncoprinter.pdf', width=6.5, height=6)
oncoprinter(y, image.color.lixc, legend.panel)
#dev.off()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.