RGLab / CytoML

A GatingML Interface for Cross Platform Cytometry Data Sharing
GNU Affero General Public License v3.0
29 stars 14 forks source link

Get untransformed data with getData #47

Closed hartmannfj closed 5 years ago

hartmannfj commented 5 years ago

Hi all,

I am reading in an xml file created from cytobank with read.gatingML.cytobank() and subsequently create a gatingSet with cytobank2GatingSet(). When I then call getData on this gatingSet, the channels that are used for gating get transformed, whereas other channels stay untransformed.

Is there an easy way to prevent transformation when calling getData()?

Cheers, Felix

mikejiang commented 5 years ago

Data is transformed during cytobank2GatingSet instead of getData call. In order to get raw scale, you will have to do the inverse transform on your own. e.g.

fs <-  getData(gs)
#since cytobank has one set of global transformation defined for entire GatingSet
#we can safely extract the trans from the first sample
trans.inv <- getTransformation(gs[[1]], inverse = TRUE) 
translist <- transformList(names(trans.inv), trans.inv)
fs.raw <- transform(fs, translist)
hartmannfj commented 5 years ago

Thanks for the quick answer, works great!