Create Binary Expression Matrix Based on Thresholds
Source:R/dataExploration.R
createBinaryMatrix.Rd
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.
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".