simplexplot {CAMTHC} | R Documentation |
This function shows scatter simplex of mixture expressions.
simplexplot(data, A, MGlist = NULL, corner.order = NULL, data.col = "gray", corner.col = "red", ...)
data |
A data set that will be internally coerced into a matrix. Each row is a gene and each column is a sample. Data should be in non-log linear space with non-negative numerical values (i.e. >= 0). Missing values are not supported. All-zero rows will be removed internally. |
A |
Prior/Estimated proportion matrix. |
MGlist |
A list of vectors, each of which contains known markers and/or CAM-detected markers for one subpopulation. |
corner.order |
The order to show simplex corners counterclockwise. |
data.col |
The color for data points. The default is "gray". |
corner.col |
The color for corner points. The default is "red". |
... |
All other arguments are passed to the plotting command. |
This function can show the scatter simplex and detected marker genes
in a 2D plot. The corners in the high-dimensional simplex will still locate
at extreme points of low-dimensional simplex. These corners will follow the
order set by corner.order
to display in the plot counterclockwise.
A plot to the current device.
#obtain data, A matrix, marker genes data(ratMix3) data <- ratMix3$X A <- ratMix3$A pMGstat <- MGstatistic(ratMix3$S, c("Liver","Brain","Lung")) pMGlist.FC <- lapply(c("Liver","Brain","Lung"), function(x) rownames(pMGstat)[pMGstat$idx == x & pMGstat$OVE.FC > 10]) #plot simplex for data simplexplot(data, A) simplexplot(data, A, MGlist = pMGlist.FC) #Color marker genes in simplex plot #set differnt corner order and colors simplexplot(data, A, MGlist = pMGlist.FC, corner.order = c(2,1,3), data.col = "blue", corner.col = c("red","orange","green"))