Note that the gate is added to root node by default if parent is not specified. We can add our first rectangleGate: rg <- rectangleGate("FSC-H"=c(200,400), "SSC-H"=c(250, 400), filterId="rectangle")
It will also store the transformation in the GatingSet and can be used to inverse-transform the data. Now we can transform GatingSet with transformerList object. TransList <- transformerList(chnls, trans.obj)Īlternatively, the overloaded estimateLogicle method can be used directly on GatingHierarchy to generate a transformerList object automatically. Once transformer object is created, we must convert it to transformerList for GatingSet to use.
User can construct the transform object by simply one-line of code. These are all very commonly used transformations in flow data analysis. Optionally breaks and format function can be supplied to further customize the appearance of axis labels.īesides doing all these by hand, we also provide some buildin transformations: asinhtGml2_trans, flowJo_biexp_trans, flowJo_fasinh_trans and logicle_trans. The inverse transformation is required so that the gates and data can be visualized in transformed scale with axis label still remains in the raw scale. Trans.obj <- trans_new("myAsinh", trans.func, inv.func) Then we can transform it with any transformation defined by user through trans_new function of scales package. New: You can now pass a list of compensation objects with elements named by sampleNames(gs) to achieve sample-specific compensations. Then compensate it: cfile <- system.file("extdata","compdata","compmatrix", package="flowCore")Ĭomp.mat <- read.table(cfile, header=TRUE, skip=2, check.names = FALSE) Then construct a \code: gs <- GatingSet(fs) GatingSet provides methods to build a gating tree from raw FCS files and add or remove flowCore gates(or populations) to or from it.įirstly,we start from a flowSet that contains three ungated flow samples: data(GvHD) Is transformed using a channel–specific function from the list.
GetTransformations returns a list of functions to beĪpplied to different dimensions of the data.Ībove, the transformation is applied to this sample, the appropriate dimension # stop("'deriv' must be between 0 and 3") If we have metadata associated with the experiment, it can be attached to the GatingSet. More details about gate visualization can be found here. Second argument is the node path of any depths as long as it is uniquely identifieable. We can plot individual gates: note the scale of the transformed axes. # name Population Parent Count ParentCount We can retrieve the population statistics : getPopStats(gs) # Polygonal gate 'APC' with 14 vertices in dimensions and We only need to know the path to, and filename of the flowJo workspace. We represent flowJo workspaces using flowJoWorkspace objects. The following section walks through opening and importing a flowJo workspace. You will have to save them in XML workspace format. The GatingSet can be built from scratch within R or imported from flowJo XML workspaces (i.e.xml or. By this we mean, accessing the samples, groups, transformations, compensation matrices, gates, and population statistics in the gating tree, which is represented as GatingSet object in R. The purpose of this package is to provide the infrastructure to store, represent and exchange the gated flow data.