reoptimize_strategy {hypergate} | R Documentation |
reoptimize_strategy
Description
Optimize a gating strategy given a manual selection of channels
Usage
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
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)
[Package hypergate version 0.8.5 Index]