Skip to contents

This function processes a gene-to-pixel data frame by removing missing values, applying a threshold to filter out low-expression pixels, and approximating zero values.

Usage

threshold(genePixelDF, t1, t2)

Arguments

genePixelDF

A data frame containing gene expression for one gene for each pixel. It should have columns "x" and "y" representing expression levels in two SpatialExperiments.

t1

numeric: Threshold value for gene expression in the first SpatialExperiment (x).

t2

numeric:Threshold value for gene expression in the second SpatialExperiment (y).

Value

A filtered and processed data frame where: - NA values are removed, - Pixels with both x and y values below their respective thresholds are excluded, - Zero values are approximated to 0.001 to avoid numerical instability.