Page 1 of 1

normalization of marker expression viSNE

PostPosted: Tue Jun 14, 2022 10:26 pm
by juliam
Hi All!

How to do normalization of marker expression on viSNE?
(to have it in range of 0 - 1 for all markers)

Is there such function on Cytobank?

Otherwise sb has code to share to do it in R?

best ,

Re: normalization of marker expression viSNE

PostPosted: Wed Jun 15, 2022 5:48 am
by BjornZ
Hi Julia,

The version of t-SNE in CellEngine has an option to normalize markers that is enabled by default. See #3, 5th bullet point for documentation: ... algorithms.


Disclosure: I work for the company that makes and sells CellEngine.

Re: normalization of marker expression viSNE

PostPosted: Wed Jun 15, 2022 9:17 am
by sgranjeaud
It is quite easy to normalize the data as shown below. The main point is to read the FCS files and write them back once normalized.

IIRC Cytobank is based on the scaling of the channel. Check its documentation or ask support.

CellEngine and OMIQ have straight forward functionality to do it. Don't know about other software.

# let's some data in matrix form
mat_exprs = as.matrix(iris[,-5])
# get the range of each column aka dim 2
minmax = apply(mat_exprs, 2, range, na.rm = TRUE)
diff(minmax)  # the difference between max and min for each column
# remove offset, ie minimal value in each column
mat_norm = sweep(mat_exprs, 2, minmax[1,], "-")
# divide by the difference
mat_norm = sweep(mat_norm, 2, diff(minmax), "/")
# check
apply(mat_norm, 2, range, na.rm = TRUE)
# alternatively, quantile might be useful at targeting a fraction of values
# use the following command as minmax, 5th and 99th percentiles
apply(mat_exprs, 2, quantile, probs = c(0.05, 0.99), na.rm = TRUE)