Skip to contents

This function creates a binary matrix where each entry is 1 if the marker's raw score exceeds a specified threshold, and 0 otherwise. The thresholds can be customized for each marker using a vector. If no vector is provided, a default threshold of 100 is used for all markers. The binary matrix is added as an additional layer in the data object.

Usage

createBinaryMatrix(data, thresholds = 100, matrix_name = "binary_exp_matrix")

Arguments

data

An object of class CygnusObject containing an expression matrix.

thresholds

Numeric vector specifying the thresholds for each marker. If a single number is provided, it is used for all markers. Default is 100.

matrix_name

Character string specifying the name for the new binary matrix layer. Default is "binary_exp_matrix".

Value

The data object with an additional layer containing the binary expression matrix.