morphology_corr: Corrects morphology based on scatter or uptake control.

View source: R/morphology_corr_master.R

morphology_corrR Documentation

Corrects morphology based on scatter or uptake control.

Description

Corrects morphology based on scatter or uptake control.

Usage

morphology_corr(
  fcb,
  uptake = NULL,
  channel,
  method = c("earth", "knijnenburg", "lm"),
  predictors = c("FSC-A", "SSC-A"),
  subsample = 20000,
  ret.model = TRUE,
  verbose = FALSE,
  ...
)

Arguments

channel

The name (string) of the channel to be corrected, ie. the column name in 'fcb_df'

subsample

Integer, number of cells to sample (with replacement) for the morphology correction, defaults to 10,000.

fcb_df

the barcoded dataframe, post compensation and preprocessing

bc_single_level

Optional: a dataframe consisting of all cells barcoded with a single level of the barcoding dye

opt

String, Morphology correction apporach, either "regression" (default) or "control dye"

trans

String, transformation to apply to the barcoding channels, defaults to arcsinh, also log10

updateProgress

used in reactive context (shiny) to return progress information to GUI

cofactor_bc1

Numeirc, Cofactor used for the arcsinh transformation on the barcoding channels

cofactor_update

Numeric, Cofactor used for the arcsinh transformation of the uptake channel

uptake_channel

String, uptake channel if "control dye" option is used as morphology correction method

output

what to return

Value

numeric vector of length nrow(fcb_df) representing the morphology corrected channel or a list containing the vector and the model used to correct it.


bjreisman/DebarcodeR documentation built on Oct. 22, 2022, 1:50 a.m.