simplexplot: The plot of scatter simplex

Description Usage Arguments Details Value Examples

Description

This function shows scatter simplex of mixture expressions.

Usage

1
2
3
4
simplexplot(data, A, MGlist = NULL, data.extra = NULL,
  corner.order = 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, ...)

Arguments

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 data, so prior/estimated proportion matrix needs to be transposed before as the input.

corner.order

The order to show simplex corners counterclockwise.

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.

Details

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.

Value

A plot to the current device.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#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 the plot
simplexplot(data, A, MGlist = pMGlist.FC,
    data.extra = t(A)) #show the location of proportion vectors in the plot

#set different corner order and colors
simplexplot(data, A, MGlist = pMGlist.FC, corner.order = c(2,1,3),
            col = "blue", mg.col = c("red","orange","green"))

Lululuella/CAMTHC documentation built on May 5, 2019, 2:39 a.m.