reoptimize_strategy: reoptimize_strategy

Description Usage Arguments Examples

View source: R/hypergate.R

Description

Optimize a gating strategy given a manual selection of channels

Usage

1
2
reoptimize_strategy(gate, channels_subset, xp, gate_vector, level,
  beta = 1, verbose = FALSE)

Arguments

gate

A return from hypergate

channels_subset

Character vector identifying the channels that will be retained (others are ignored). The form is e.g. c("CD4_min","CD8_max")

xp

Expression matrix as in the hypergate call

gate_vector

Categorical vector as in the hypergate call

level

Level of gate_vector identifying the population of interest

beta

Yield / purity trade-off

verbose

Whether to print information about optimization status

Examples

1
2
3
4
5
6
7
data(Samusik_01_subset)
xp=Samusik_01_subset$xp_src[,Samusik_01_subset$regular_channels]
gate_vector=Samusik_01_subset$labels
hg=hypergate(xp=xp,gate_vector=gate_vector,level=23,delta_add=0)
contribs=channels_contributions(gate=hg,xp=xp,gate_vector=gate_vector,level=23,beta=1)
significant_channels=names(contribs)[contribs>=0.01]
hg_reoptimized=reoptimize_strategy(gate=hg,channels_subset=significant_channels,xp,gate_vector,23)

ebecht/hypergate documentation built on March 9, 2020, 4:05 p.m.