gate-methods: DEPRECATED - use gate_chr, gate_int instead inside a...

Description Usage Arguments Details Value Examples

Description

gate() takes as input a 'tbl' formatted as | <DIMENSION 1> | <DIMENSION 2> | <...> | and calculates the rotated dimensional space of the feature value.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
gate(
  .data,
  .element,
  .dim1,
  .dim2,
  .color = NULL,
  .shape = NULL,
  .size = NULL,
  opacity = 1,
  how_many_gates = 1,
  gate_list = NULL,
  name = "gate",
  action = "add",
  ...
)

## S3 method for class 'spec_tbl_df'
gate(
  .data,
  .element,
  .dim1,
  .dim2,
  .color = NULL,
  .shape = NULL,
  .size = NULL,
  opacity = 1,
  how_many_gates = 1,
  gate_list = NULL,
  name = "gate",
  action = "add",
  ...
)

## S3 method for class 'tbl_df'
gate(
  .data,
  .element,
  .dim1,
  .dim2,
  .color = NULL,
  .shape = NULL,
  .size = NULL,
  opacity = 1,
  how_many_gates = 1,
  gate_list = NULL,
  name = "gate",
  action = "add",
  ...
)

Arguments

.data

A tibble

.element

A column symbol. The column that is used to calculate distance (i.e., normally genes)

.dim1

A column symbol. The x dimension

.dim2

A column symbol. The y dimension

.color

A column symbol. Color of points

.shape

A column symbol. Shape of points

.size

A column symbol. Size of points

opacity

A number between 0 and 1. The opacity level of the data points

how_many_gates

An integer. The number of gates to label

gate_list

A list of gates. It is returned by gate function as attribute \"gate\". If you want to create this list yourself, each element of the list is a data frame with x and y columns. Each row is a coordinate. The order matter.

name

A character string. The name of the new column

action

A character string. Whether to join the new information to the input tbl (add), or just get the non-redundant tbl with the new information (get).

...

Further parameters passed to the function gatepoints::fhs

Details

\lifecycle

maturing

This function allow the user to label data points in inside one or more 2D gates. This package is based on on the package gatepoints.

Value

A tbl object with additional columns for the inside gate information. additional columns for the rotated dimensions. The rotated dimensions will be added to the original data set as '<NAME OF DIMENSION> rotated <ANGLE>' by default, or as specified in the input arguments.

A tbl object with additional columns for the reduced dimensions. additional columns for the rotated dimensions. The rotated dimensions will be added to the original data set as '<NAME OF DIMENSION> rotated <ANGLE>' by default, or as specified in the input arguments.

A tbl object with additional columns for the reduced dimensions. additional columns for the rotated dimensions. The rotated dimensions will be added to the original data set as '<NAME OF DIMENSION> rotated <ANGLE>' by default, or as specified in the input arguments.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
  if(interactive()){

    tidygate::tidygate_data %>%
    gate( .element = c(`ct 1`, `ct 2`), Dim1, Dim2 )

  }



library(magrittr)

tidygate::tidygate_data  %>%
 gate(
   .element = c(`ct 1`, `ct 2`),
   Dim1, Dim2,
   gate_list = tidygate::gate_list
 )

tidygate documentation built on Jan. 20, 2022, 5:12 p.m.