Parameter_Calculate: Adaptive Parameter Tuning for Single-Cell Data Annotation in...

View source: R/Probability_parameter.R

Parameter_CalculateR Documentation

Adaptive Parameter Tuning for Single-Cell Data Annotation in SlimR

Description

This function automatically determines optimal min_expression, specificity_weight, and threshold parameters for single-cell data analysis based on dataset characteristics using adaptive algorithms derived from empirical analysis of single-cell datasets.

Usage

Parameter_Calculate(
  seurat_obj,
  features = NULL,
  assay = NULL,
  cluster_col = NULL,
  n_celltypes = 50,
  verbose = TRUE
)

Arguments

seurat_obj

A Seurat object containing single-cell data

features

Character vector of feature names (genes) to analyze. If NULL, will use highly variable features from the Seurat object.

assay

Name of assay to use (default: default assay)

cluster_col

Column name in metadata containing cluster information

n_celltypes

Expected number of cell types in marker database (default: 50). Used for threshold recommendation calculation.

verbose

Whether to print progress messages (default: TRUE)

Value

A list containing:

  • min_expression: Recommended expression threshold

  • specificity_weight: Recommended specificity weight

  • threshold: Recommended probability threshold for candidate selection

  • dataset_features: Extracted dataset characteristics

  • parameter_rationale: Explanation of parameter choices

See Also

Other Section_3_Automated_Annotation: Celltype_Annotation(), Celltype_Annotation_PerCell(), Celltype_Calculate(), Celltype_Calculate_PerCell(), Celltype_Verification(), Celltype_Verification_PerCell(), percell_workflow

Examples

## Not run: 
SlimR_params <- Parameter_Calculate(
  seurat_obj = sce,
  features = c("CD3E", "CD4", "CD8A"),
  assay = "RNA",
  cluster_col = "seurat_clusters",
  n_celltypes = 98,
  verbose = TRUE
  )

## End(Not run)


SlimR documentation built on Feb. 5, 2026, 5:08 p.m.