Shift the location of a gate associated with a node of a
GatingSet. This method is a wrapper for
shift_gate that enables
updating of the gate associated with a node of a
gs_pop_set_gate to modify the provided
directly so there is no need to re-assign its output. The arguments will be essentially identical to the
flowCore method, except for the specification of the target gate. Rather than being called on an
object of type
flowCore::filter, here it is called on a
object with an additional character argument for specifying the node whose gate should be transformed.
The rest of the details below are taken from the
A character specifying the node whose gate should be modified
Either a numeric scalar or numeric vector. If it is scalar, this is just the desired shift of the gate in
its first dimension. If it is a vector, it specifies both
A numeric scalar specifying the desired shift of the gate in its second dimension.
A numeric vector specifying where the center or centroid should be moved (rather than specifiying
This method allows for geometric translation of filter types defined by simple geometric gates
The method provides two approaches to specify a translation. For
rectangleGate objects, this will
max bounds by the same amount in each specified dimension. For
objects, this will simply shift the divinding boundary in each dimension. For
ellipsoidGate objects, this
will shift the center (and therefore all points of the ellipse). For
polgonGate objects, this will simply
shift all of the points defining the polygon.
The method allows two different approaches to shifting a gate. Through the
a direct shift in each dimension can be provided. Alternatively, through the
center argument, the gate
can be directly moved to a new location in relation to the old center of the gate. For
this center is the intersection of the two dividing boundaries (so the value of the
boundary slot). For
rectangleGate objects, this is the center of the rectangle defined by the intersections of the centers
of each interval. For
ellipsoidGate objects, it is the center of the ellipsoid, given by the
polygonGate objects, the centroid of the old polygon will be calculated and shifted to the new
location provided by
center and all other points on the polygon will be shifted by relation to the centroid.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
## Not run: # Moves the entire gate +500 in its first dimension and 0 in its second dimension shift_gate(gs, node, dx = 500) #Moves the entire gate +250 in its first dimension and +700 in its second dimension shift_gate(gs, node, dx = 500, dy = 700) # Same as previous shift_gate(gs, node, c(500,700)) # Move the gate based on shifting its center to (700, 1000) shift_gate(gs, node, center = c(700, 1000)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.