Skip to contents

Identifies phenotype-associated cells in continuous prediction data using Median Absolute Deviation (MAD) testing across multiple phenotypic dimensions.

Usage

LabelContinuousCells(pred_dt, verbose = TRUE)

Arguments

pred_dt

A data.table containing prediction scores for multiple phenotypic conditions. Must contain a 'cell_id' column and one or more columns with prediction scores for different phenotypes.

verbose

Logical, whether to print messages.

Value

The input pred_dt with an additional column:

  • label - Character vector with cell classifications: "Positive" (significant in at least one phenotype) or "Other"

Note

The function assumes that all columns except 'cell_id' contain prediction scores for different phenotypes. It provides progress information and warnings for edge cases like empty results.

See also

mad.test() for the underlying statistical test used for phenotype significance assessment.

Other DEGAS: DoDEGAS(), LabelBinaryCells(), LabelSurvivalCells(), Vec2sparse(), predClassBag.optimized(), readOutputFiles.optimized(), runCCMTL.optimized(), runCCMTLBag.optimized(), writeInputFiles.optimized()

Examples

if (FALSE) { # \dontrun{
# Create example prediction data with multiple phenotypes
pred_data <- data.table(
  cell_id = paste0("cell_", 1:1000),
  phenotype_A = rnorm(1000),
  phenotype_B = rexp(1000),
  phenotype_C = runif(1000)
)

# Identify phenotype-associated cells
result <- LabelContinuousCells(pred_data)

# Check classification results
table(result$label)

# View the proportion of positive cells
prop.table(table(result$label))
} # }