assignCellType {TOAST} | R Documentation

## Align cell types when reference proportions are known

### Description

Align target proportions with reference proportions by pearson correlation coefficients.

### Usage

    assignCellType(input,reference)

### Arguments

`input` | Input proportiona matrix of dimension N by K.
`reference` | Reference proportion matrix of dimension N by K.

### Value

The aligned proportion matrix, following the cell type ordering of reference proportion matrix.

### Author(s)

Ziyi Li <ziyi.li@emory.edu>

### References

Ziyi Li, Zhijin Wu, Peng Jin, Hao Wu. "Dissecting differential signals in high-throughput data from complex tissues."

### Examples

    ## generate estimated proportion matrix
    estProp <- matrix(abs(runif(50*4,0,1)), 50, 4)
    estProp <- sweep(estProp, 1, rowSums(estProp), "/")

    ## generate reference proportion matrix
    refProp <- matrix(abs(runif(50*4,0,1)), 50, 4)
    refProp <- sweep(refProp, 1, rowSums(refProp), "/")

    estProp_aligned = assignCellType(input = estProp,
    reference = refProp)

[Package TOAST version 1.4.0 Index]