Initializes and populates a gating tree based on user-defined criteria, handling decision-making through multiple layers of a gating hierarchy. This function integrates gating rules, applies negative gating definitions, and assesses cell population statistics to manage the flow cytometry data analysis process.
Usage
createGatingTreeObject(
x,
select_markers = FALSE,
graphics = FALSE,
markers = NULL,
maxDepth = 3,
min_cell_num = 25,
expr_group = NULL,
ctrl_group = NULL,
verbose = TRUE
)
Arguments
- x
An object, expected to be of class 'FlowObject', containing the initial data and parameters for gating.
- select_markers
Logical; if TRUE, allows the user to select markers interactively.
- graphics
Logical; if TRUE, enables graphical selection of markers.
- markers
Optional; a vector of markers to be included if not choosing interactively.
- maxDepth
Integer; the maximum depth of the gating tree, controlling how many levels of decision nodes can be created.
- expr_group
Optional; a character to specify the experimental group. If NULL, this is determined interactively.
- ctrl_group
Optional; a character to specify the control group. If NULL, this is determined interactively.
Value
Modifies the input object by adding a 'GatingTreeObject' that contains the entire structure of gating decisions and nodes.
Details
The function first checks for the type of the input object to ensure it matches expected classes. It then extracts necessary data and parameters from the object, such as negative gating thresholds and sample definitions. Depending on the options, it may allow interactive selection of markers. The function constructs a hierarchical tree where each node represents a gating decision based on statistical calculations like entropy and enrichment, which are used to determine the next steps in the gating process or to terminate the process.
The gating process involves: - Merging data with sample definitions. - Calculating initial gating statistics. - Recursively creating child nodes based on gating outcomes and thresholds. - Dynamically managing markers and gating paths based on user-defined depth and available data.
See also
Other GatingTree:
GatingTreeToDF()
,
PlotDeltaEnrichment()
,
PruneGatingTree()
,
addChildNode()
,
add_prune()
,
apply_gating_conditions()
,
baseline_entropy()
,
calculate_enrichment()
,
calculate_entropy()
,
collect_all_enrichment()
,
collect_all_entropy()
,
collect_history()
,
collect_leaf_enrichment()
,
collect_markers()
,
convertToDataTree()
,
convert_to_diagrammer()
,
count_nodes()
,
createChildNode()
,
findNodeByPath()
,
find_and_update_nodes()
,
gating_entropy()
,
general_node_rule()
,
generate_marker_names()
,
getNode()
,
prune_tree()
,
recursiveAddChildNode()