## Not run:
# data(GvHD)
# #select raw flow data
# fs<-GvHD[1:3]
#
# #transform the raw data
# tf <- transformList(colnames(fs[[1]])[3:6], asinh, transformationId="asinh")
# fs_trans<-transform(fs,tf)
#
# #add transformed data to a gatingset
# gs <- GatingSet(fs_trans)
# gs
# getNodes(gs[[1]]) #only contains root node
#
# #add one gate
# rg <- rectangleGate("FSC-H"=c(200,400), "SSC-H"=c(250, 400),
# filterId="rectangle")
#
# nodeID<-add(gs, rg)#it is added to root node by default if parent is not specified
# nodeID
# getNodes(gs[[1]]) #the second population is named after filterId of the gate
#
# #add a quadGate
# qg <- quadGate("FL1-H"=2, "FL2-H"=4)
# nodeIDs<-add(gs,qg,parent="rectangle")
# nodeIDs #quadGate produces four population nodes
# getNodes(gs[[1]]) #population names are named after dimensions of gate if not specified
#
# #add a boolean Gate
# bg<-booleanFilter(`CD15 FITC-CD45 PE+`|`CD15 FITC+CD45 PE-`)
# bg
# nodeID2<-add(gs,bg,parent="rectangle")
# nodeID2
# getNodes(gs[[1]])
# #do the actual gating
# recompute(gs)
#
# #plot one gate for one sample
# plotGate(gs[[1]],"rectangle")
# plotGate(gs[[1]],nodeIDs) #may be smoothed automatically if there are not enough events after gating
#
# #plot gates across samples using lattice plot
# plotGate(gs,nodeID)
# #plot all gates for one sample
# plotGate(gs[[1]])#boolean gate is skipped by default
# plotGate(gs[[1]],bool=TRUE)
#
# #plot the gating hierarchy
# require(Rgraphviz)
# plot(gs[[1]])
# #remove one node causing the removal of all the descendants
# Rm('rectangle', gs)
# getNodes(gs[[1]])
# ## End(Not run)
Run the code above in your browser using DataLab