GenerateGates: Generate gates based on pair of thresholds (minimum main...

View source: R/GenerateGates.R

GenerateGatesR Documentation

Generate gates based on pair of thresholds (minimum main value and maximum of other values)

Description

Given a minimal value for the matching signature and maximum value for other signature, generate gates of the form: celltypeA = signatureA > min.main.value & signaturesNotA < max.other.value, celltypeB = signatureB > min.main.value & signaturesNotB < max.other.value, etc.

Usage

GenerateGates(
  signatures,
  min.main.value = 40,
  max.other.value = 25,
  population.names = NA,
  display.gates = T
)

Arguments

signatures

A list of signatures (in which case names of the list are used), or directly a vector of signature names.

min.main.value

numeric(1). The minimal value for the signature matching the cell category. Default: 40.

max.other.value

numeric(1). The maximal value for the signatures not matching the cell category. Default: 25.

population.names

character(n). The name of the cell categories. Must be given in the same order as the name of the signatures with which they are associated. NA will use the signature names as population names.

display.gates

logical(1). Should the gates generated (i.e. a string) be shown rather than returned silently. Default: TRUE.

Details

The format of the gates returned is fit to be used directly in ClassifyManual(), or can serve as a template to edit manually before using for ClassifyManual().

Value

Returns a string, character(1).

Examples

MyGates <- GenerateGates(c("SignA","SignB","SignC"), min.main.value=1, max.other.value=0.1, population.names=c("CellA","CellB","CellC"))

nbroguiere/burgertools documentation built on Jan. 30, 2024, 3:48 a.m.