GatingResults Class

class flowkit._models.gating_strategy.GatingResults(results_dict, sample_id)

A GatingResults instance is returned from the GatingStrategy gate_samples method as well as the Session get_gating_results method. End users will never create an instance of GatingResults directly, only via these GatingStrategy and Session methods. However, there are several GatingResults methods to retrieve the results.

Public Methods:

__init__(results_dict, sample_id)

get_gate_membership(gate_name[, gate_path])

Retrieve a boolean array indicating gate membership for the events in the GatingResults sample.

get_gate_count(gate_name[, gate_path])

Retrieve event count for the specified gate ID for the gating results sample

get_gate_absolute_percent(gate_name[, gate_path])

Retrieve percent of events, relative to the total sample events, of the specified gate ID for the gating results sample

get_gate_relative_percent(gate_name[, gate_path])

Retrieve percent of events, relative to parent gate, of the specified gate ID for the gating results sample


get_gate_membership(gate_name, gate_path=None)

Retrieve a boolean array indicating gate membership for the events in the GatingResults sample. Note, the same gate ID may be found in multiple gate paths, i.e. the gate ID can be ambiguous. In this case, specify the full gate path to retrieve gate indices.

Parameters:
  • gate_name – text string of a gate name

  • gate_path – A tuple of ancestor gate IDs for the given gate ID. Alternatively, a string path delimited by forward slashes can also be given, e.g. (‘/root/singlets/lymph/live’)

Returns:

NumPy boolean array (length of sample event count)

get_gate_count(gate_name, gate_path=None)

Retrieve event count for the specified gate ID for the gating results sample

Parameters:
  • gate_name – text string of a gate name

  • gate_path – tuple of ancestor gate names

Returns:

integer count of events in gate ID

get_gate_absolute_percent(gate_name, gate_path=None)

Retrieve percent of events, relative to the total sample events, of the specified gate ID for the gating results sample

Parameters:
  • gate_name – text string of a gate name

  • gate_path – tuple of ancestor gate names

Returns:

floating point number of the absolute percent

get_gate_relative_percent(gate_name, gate_path=None)

Retrieve percent of events, relative to parent gate, of the specified gate ID for the gating results sample

Parameters:
  • gate_name – text string of a gate name

  • gate_path – tuple of ancestor gate names

Returns:

floating point number of the relative percent