Evaluate parameter stability with respect to gating sheme

cytostab(
  df_samples_subset,
  protein_names,
  condition,
  group = "donor",
  cell_n_min = Inf,
  cell_n_subsample = 0
)

Arguments

df_samples_subset

Data frame or tibble with proteins counts, cell condition, and group information

protein_names

A vector of column names of protein to use in the analysis

condition

The column name of the condition variable

group

The column name of the group variable

cell_n_min

Remove samples that are below this cell counts threshold

cell_n_subsample

Subsample samples to have this maximum cell count

Value

A data frame

Examples

set.seed(23)
df <- generate_data()
protein_names <- names(df)[3:12]
df <- dplyr::mutate_at(df, protein_names, function(x) asinh(x/5))
stab <- CytoGLMM::cytostab(df,
                           protein_names = protein_names,
                           condition = "condition",
                           group = "donor")
stab
#> # A tibble: 11 × 4
#>    max_abs  mean range protein_name
#>      <dbl> <dbl> <dbl> <chr>       
#>  1    17.3  8.76  17.4 (Intercept) 
#>  2    26.5  9.36  33.9 m01         
#>  3    21.1 10.4   21.5 m02         
#>  4    18.0  8.39  19.5 m03         
#>  5    18.9  9.39  18.9 m04         
#>  6    20.7 10.4   20.7 m05         
#>  7    27.7 11.0   33.1 m06         
#>  8    23.1  9.04  28.3 m07         
#>  9    20.5  9.55  22.3 m08         
#> 10    17.8  7.81  20.4 m09         
#> 11    25.9 10.2   31.2 m10