Skip to contents

Calculate the Log-ratio of highest mean expression vs. mean noise.

Usage

getMaxRatio(
  seu_obj = NULL,
  features = NULL,
  expMat = "path_to_expMat",
  platform = NULL
)

Arguments

seu_obj

A Seurat object including assays for target genes ('RNA') and control probes ('ControlProbe').

features

An optional vector of gene identifiers for which to perform the calculation. If NULL, the calculation includes all genes in the RNA assay.

expMat

Path to exprMatrix file.

platform

The platform from which the data originates. Valid options are 'Xenium', 'CosMx', and 'Merscope'.

Value

A data frame with sample_id, platform, and the calculated value of the log-ratio.

Details

The function identifies the maximum mean expression value among the specified features (or all features if none are specified) and calculates its log-ratio to the mean expression value of negative control probes. This log-ratio reflects the dynamic range of the dataset, indicating the spread between the highest signal and background noise levels, which is critical for assessing data quality and sensitivity of detection in spatial transcriptomics.