A makepanel functionality with user defined order or when no group is specified. This also caters to mutation data or discrete data, and tries to arrange panlemap by decreasing frequency of features and columns.

makepanel_order(orderl="user", mat, mat.col, mat.type, legend=FALSE,
get.stat=FALSE, NA.flag=FALSE, NA.col="grey", lnrow = 3, lncol = 5,
lcex = 1, legend.vec = NULL, legend.col = NULL, lheight = 1,...)

Arguments

orderl

required. default is "user". "user" means it assumes the given matrix is in user defined order and just plots it as is. "bin" means it sis a binary matrix fully consisting of 0 and 1, and will order it in the order of decreasing sum of row and column.

mat

required. data frame. of values that you want to plot. Make sure they are ordered in the same order as gr vector.

mat.col

required. list. of color values to be coded. names of the list are column names of mat see example below.

mat.type

required. vector. type of data type in mat. 1 = discrete/binary. 2 = continuous .See example below.

NA.flag

logical, default is FALSE. see get.colvector for details

NA.col

default is "grey". see get.colvector for details

get.stat

logical, default is FALSE. Summarizes continuous data as median(range). Categorical variables with 2 categories are summarized as n(%) If TRUE a table with these summary statistics is returned as well.

legend

logical. default is FALSE. if TRUE plots a legend at bottom right corned specifying each color assigned to the categories.

lnrow

numeric. Number of rows in each panelet of the legend. Adjust to fit in plot margins. Default is 3 rows. See example. Only when legend=TRUE

lncol

numeric. Number of columns on each panelet of the legend. Adjust accordingly for legibility. Default is 5 columns.Only when legend=TRUE

lcex

numeric. Magnification of legend labels. Default value is cex=1. Only when legend=TRUE

legend.vec

vector. When legend=TRUE, all values passed as mat.type=1 are passed to be plotted in the legend. If you want to show less information,pass the legend vector of your choice.

legend.col

vector. When legend=TRUE, all values passed as mat.type=1 are given a color and are plotted in the legend. If you want to show less information, pass the legend vector colors of your choice corresponding to legend.vec.

lheight

numeric. If your legend overflows the current panelmap margins, use this to add more space for legend. Default value is 1.Only when legend=TRUE

...

pass optional arguments here

Details

... can pass other parameters. Use it for controlling names and colors of panelets via cex, col. border line type and thickness can be controlled via lty and lwd respectively.

See makepanel

Value

A colored panelemap of discrete/continuous values is plotted ordered according to the input data. if get.stat==TRUE and orderl == "user" tab of summary statistics is returned. See get.stat if(orderl == "bin") tab of summary statistics is returned. See get.stat and mat.order an ordered data matrix is returned

See also

makepanel

Examples

#Simulate a 0 and 1 10x10 matrix mat = matrix(sample(c(0,1),100, replace=TRUE), 10,10) rownames(mat) = paste0("S", 1:10) colnames(mat) = paste0("F", 1:10) mat.type=rep(1, ncol(mat)) cc = c("white", "black") mat.col<-list(); mat.col[[1]] = cc; mat.col = rep(mat.col,ncol(mat)); names(mat.col) = colnames(mat) makepanel_order(orderl="bin", mat=mat, mat.col=mat.col, mat.type=mat.type, legend=TRUE, get.stat=TRUE)
#> $tab #> [,1] #> F10=0 "3(30%)" #> 1 "7(70%)" #> F2=0 "4(40%)" #> 1 "6(60%)" #> F8=0 "4(40%)" #> 1 "6(60%)" #> F9=0 "5(50%)" #> 1 "5(50%)" #> F1=0 "6(60%)" #> 1 "4(40%)" #> F3=0 "6(60%)" #> 1 "4(40%)" #> F4=0 "6(60%)" #> 1 "4(40%)" #> F7=0 "6(60%)" #> 1 "4(40%)" #> F5=0 "7(70%)" #> 1 "3(30%)" #> F6=0 "7(70%)" #> 1 "3(30%)" #> #> $mat.order #> F10 F2 F8 F9 F1 F3 F4 F7 F5 F6 #> S8 1 1 1 0 1 0 1 1 1 1 #> S1 1 0 0 1 0 1 0 1 1 0 #> S2 1 0 1 1 0 0 1 0 0 1 #> S7 1 1 1 1 1 0 0 0 0 0 #> S9 0 1 1 1 0 1 0 1 0 0 #> S3 1 1 0 1 1 0 0 0 0 0 #> S4 0 0 1 0 1 0 1 1 0 0 #> S5 1 0 0 0 0 1 0 0 1 1 #> S6 1 1 0 0 0 0 1 0 0 0 #> S10 0 1 1 0 0 1 0 0 0 0 #>