RGLab / flowWorkspace

flowWorkspace
GNU Affero General Public License v3.0
45 stars 21 forks source link

How to disable data transformation by getData? #310

Closed Close-your-eyes closed 2 years ago

Close-your-eyes commented 4 years ago

I am trying to pull out the expression matrices of a gated subpopulation (in FlowJo) in R.

So, I am using flowWorkspace (not a reproducible example, but an outline of what I did):

wsp <- openWorkspace() gs <- parseWorkspace(wsp, ...) plotGate(gs[[i]], "CD8+") <- at this stage the dotplot looks very similar as in flowjo (same axes, same ranges)

fs <- getData(gs, "...") exprs.mat <-exprs(fs[[i]])

Now, in exprs.mat and maybe also in fs that data has been transformed/normalized/scaled but I cannot figure out why and how etc. This axes (ranges) are totally diffenrent than before. Want I actually want though is the compensated data as I see them in FlowJo and also as I see them above when using plotGate.

What do I have to do?

gfinak commented 4 years ago

Data are transformed as soon as you call parseworkspace. Please don't use plotGate it is deprecated. Use ggcyto instead. The latest branch of the flow tools, gs_pop_get_data has an argument inverse.trans or inverse_trans (check the docs) that will return the data on the original scale.

gfinak commented 4 years ago

The relevant commit is #287