simplexplot2 | R Documentation |
This function shows scatter simplex of mixture expressions.
simplexplot2(
data,
A,
MGlist = NULL,
data.extra = NULL,
col = "gray",
pch = 1,
cex = 0.8,
mg.col = "red",
mg.pch = 1,
mg.cex = 1.2,
ex.col = "black",
ex.pch = 19,
ex.cex = 1.5,
...
)
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. |
data.extra |
Extra data points to be shown in the simplex plot, e.g.
the points associated with prior/estimated proportion vectors. The format
should be consistent with |
col |
The color for data points. The default is "gray". |
pch |
The symbol/character for data points. The default is 1. |
cex |
The symbol/character expansion for data points. The default is 0.8. |
mg.col |
The colors for marker genes. Marker genes of one subpopulation could have their own color if a vector is provided. The default is "red". |
mg.pch |
The symbols/characters for marker genes. Marker genes of one subpopulation could have their own symbol/character if a vector is provided. The default is 1. |
mg.cex |
The symbol/character expansion for marker genes. The default is 1.2. |
ex.col |
The colors for extra data points. Each data point could have its own color if a vector is provided. The default is "black". |
ex.pch |
The symbols/characters for extra data points. Each data point could have its own symbol/character if a vector is provided. The default is 19. |
ex.cex |
The symbol/character expansion for extra data points. The default is 1.5. |
... |
All other arguments are passed to the plotting command. |
corner.order |
The order to show simplex corners counterclockwise. |
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.
A plot to the current device.
#obtain data, A matrix, marker genes
data(ratMix3)
data <- ratMix3$X
A <- ratMix3$A
#Find marker genes
MGlist <- cotMG(data, rASest3$S, cos.thres = 0.99)
#plot simplex for data
simplexplot2(data, A)
simplexplot2(data, A, MGlist = MGlist) #Color marker genes in the plot
simplexplot2(data, A, MGlist = MGlist,
data.extra = t(A)) #show the location of proportion vectors in the plot
#set different colors
simplexplot2(data, A, MGlist = MGlist,
col = "blue", mg.col = c("red","orange","green"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.