rotate_gate {flowWorkspace} | R Documentation

## Simplified geometric rotation of gates associated with nodes

### Description

Rotate a gate associated with a node of a `GatingHierarchy` or `GatingSet`. This method is a wrapper for `rotate_gate` that enables updating of the gate associated with a node of a `GatingHierarchy` or `GatingSet`.

`rotate_gate` calls `setGate` to modify the provided `GatingHierarchy` or `GatingSet` 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 `GatingHierarchy` or `GatingSet` 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 `flowCore` documentation.

### Usage

    ## S3 method for class 'GatingHierarchy'
    rotate_gate(obj, y, deg = NULL,
      rot_center = NULL, ...)

    ## S3 method for class 'GatingSet'
    rotate_gate(obj, y, deg = NULL, rot_center = NULL,
      ...)

### Arguments

`obj` | A `GatingHierarchy` or `GatingSet` object
`y` | A character specifying the node whose gate should be modified
`deg` | An angle in degrees by which the gate should be rotated in the counter-clockwise direction
`rot_center` | A separate 2-dimensional center of rotation for the gate, if desired. By default, this will be the center for `ellipsoidGate` objects or the centroid for `polygonGate` objects. The `rot_center` argument is currently only supported for `polygonGate` objects.
`...` | not used

### Details

This method allows for geometric rotation of filter types defined by simple geometric gates (`ellipsoidGate`, and `polygonGate`). The method is not defined for `rectangleGate` or `quadGate` objects, due to their definition as having 1-dimensional boundaries.

The angle provided in the `deg` argument should be in degrees rather than radians. By default, the rotation will be performed around the center of an `ellipsoidGate` or the centroid of the area encompassed by a `polygonGate`. The `rot_center` argument allows for specification of a different center of rotation for `polygonGate` objects (it is not yet implemented for `ellipsoidGate` objects) but it is usually simpler to perform a rotation and a translation individually than to manually specify the composition as a rotation around a shifted center.

### See Also

transform_gate `flowCore::rotate_gate`

### Examples

    ## Not run:
    #' # Rotates the original gate 15 degrees counter-clockwise
    scale_gate(gs, node, deg = 15)
    # Rotates the original gate 270 degrees counter-clockwise
    scale_gate(gs, node, 270)

    ## End(Not run)

[Package flowWorkspace version 3.32.0 Index]