add_pop_init {openCyto}R Documentation

Clear history of add_pop calls for a given GatingSet or GatingSetList

Description

Repeated calls to the load_gs method in the same session will yield indistinguishable objects that can result in overlapping history of add_pop calls. This method allows for the history to be cleared if the user would like to reload the GatingSet and start fresh. Calling add_pop_init without an argument will clear the entire add_pop history.

Usage

add_pop_init(GatingSet)
add_pop_init(GatingSetList)
add_pop_init()

Examples

## Not run: 
# load in a GatingSet
gs <- load_gs(path)
# Add some nodes using add_pop
add_pop(gs, gating_method = "mindensity", dims = "CCR7,CD45RA", parent = "cd4-cd8+", pop = "CCR7+/-CD45RA+/-")
add_pop(gs, gating_method = "polyFunctions", parent = "cd8", gating_args = "cd8/IFNg:cd8/IL2:cd8/TNFa")
# Remove the effect of the last add_pop call using remove_pop (note that the first call's effects remain)
remove_pop(gs)
# Re-load the GatingSet to start over
gs <- load_gs(path)

# At this point, gs will still see the history of the first add_pop call above
# which will cause problems for later calls to remove_pop.
# To fix that, just call add_pop_init() to start a clean history
add_pop_init(gs)
# Now you can continue using add_pop and remove_pop from scratch
add_pop(gs, gating_method = "mindensity", dims = "CCR7,CD45RA", parent = "cd4-cd8+", pop = "CCR7+/-CD45RA+/-")

## End(Not run)


[Package openCyto version 1.22.2 Index]