powered by
Utility function to translate a factor into colors
fac2col( x, s = 1, v = 1, shuffle = FALSE, min.group.size = 1, return.details = FALSE, unclassified.cell.color = "gray50", level.colors = NULL )
vector or list of colors
input factor
numeric The "saturation" to be used to complete the HSV color descriptions (default=1) See ?rainbow in Palettes, grDevices
numeric The "value" to be used to complete the HSV color descriptions (default=1) See ?rainbow in Palettes, grDevices
boolean If TRUE, shuffles columns with shuffle(columns) (default=FALSE)
integer Exclude groups of size less than the min.group.size (default=1)
boolean If TRUE, returns a list list(colors=y, palette=col). Otherwise, just returns the factor (default=FALSE)
Color for unclassified cells (default='gray50')
(default=NULL)
genes = factor(c("BRAF", "NPC1", "PAX3", "BRCA2", "FMR1")) fac2col(genes)
Run the code above in your browser using DataLab