findid-methods: Find the cell class with the highest/lowest average channel

Description Usage Arguments Details Value Examples

Description

Given tissue samples with different classes, it may be advantageous to single out a class that corresponds to a certain phenotype. These are easiest found by considering the cell class with the highest or lowest average (mean/median) expression of a given tissue, e.g. in epithelial cells keratin is over-expressed while in stromal cells vimentin is under-expressed.

Apply FindID across an entire SPExp

Usage

1
2
3
4
5
FindID(sp, channel, direction = c("higher", "lower"), method = c("mean",
  "median"))

FindIDs(SPE, channel, direction = c("higher", "lower"), method = c("mean",
  "median"))

Arguments

sp

An SPData object

channel

A (partial) channel name

direction

Whether to look for the highest or lowest average

method

The method for average (mean or median)

SPE

An SPExp object

Details

Most normalization routines normalize each class separately. However, this will make each channel N(0,1) within a cell class, so comparison is just noise. This method normalizes the selected channel w.r.t. cell size and concentration, then picks out the highest or lowest average (mean/median, set by method).

channel greps the channel name to find an index containing the string, but make sure that string exists in a channel and only once, otherwise an error will be thrown.

direction If "higher" returns the class with the highest mean/median of the selected channel, while "lower" will return the class with the lowest mean/median.

Value

The class index with the higher average in the channel

A vector of cell classes corresponding to each sample.

Examples

1
2
3
4
5
## Not run: 
## Keratin is higher in epithelial cells:
keratin.class <- FindID(sp, "Keratin", direction="higher", method="median")

## End(Not run)

kieranrcampbell/SpatialStats documentation built on May 20, 2019, 9:24 a.m.