simplexplot {CAMTHC} | R Documentation

## The plot of scatter simplex

### Description

This function shows scatter simplex of mixture expressions.

### Usage

    simplexplot(data, A, MGlist = NULL, corner.order = NULL,
      data.col = "gray", corner.col = "red", ...)

### 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.
`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.

### 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

    #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"))

[Package CAMTHC version 1.0.0 Index]