Label Continuous Phenotype Cells Using MAD Testing
Source:R/25-DEGAS_Screen.R
LabelContinuousCells.RdIdentifies phenotype-associated cells in continuous prediction data using Median Absolute Deviation (MAD) testing across multiple phenotypic dimensions.
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))
} # }