Skip to contents

This function adds or updates scaling parameters for a given fluorophore in a userm object. It validates the input fluor name, scaling method, and numeric parameters, then stores them in the Scale_df field of the Userm object.

Usage

AddScale(Userm, fluor, min = -100, max = 1000, scale = "Linear", cofactor = 10)

Arguments

Userm

A userm object created by CreateUserm, containing fluor and detector information.

fluor

A character string specifying the fluorophore to update.

min

A numeric value specifying the minimum intensity threshold. Default is -100.

max

A numeric value specifying the maximum intensity threshold. Default is 1000.

scale

A character string specifying the scaling method. Must be one of "Linear", "Log10", or "Arcsinh". Default is "Linear".

cofactor

A positive numeric value used for scaling (only used for "Arcsinh"). Default is 10.

Value

The updated Userm object with new scaling parameters for the specified fluorophore.

Examples

if (FALSE) { # \dontrun{
A <- matrix(runif(20), nrow = 4, ncol = 5)
rownames(A) <- paste0("D", 1:4)
colnames(A) <- paste0("F", 1:5)
Userm <- CreateUserm(A)
Userm <- AddScale(Userm, fluor = "F1", min = 0, max = 5000, scale = "Arcsinh", cofactor = 5)
} # }