find_variable_events: Calculate the Sum Deviance for Inclusion and Exclusion...

View source: R/feature_selection.R

find_variable_eventsR Documentation

Calculate the Sum Deviance for Inclusion and Exclusion Matrices

Description

Calculate the Sum Deviance for Inclusion and Exclusion Matrices

Usage

find_variable_events(
  m1_matrix,
  m2_matrix = NULL,
  min_row_sum = 50,
  n_threads = 1,
  verbose = FALSE,
  ...
)

Arguments

m1_matrix

A matrix representing the inclusion matrix. Rows are events, columns are barcodes.

m2_matrix

A matrix representing the exclusion matrix. Rows are events, columns are barcodes.

min_row_sum

A numeric value specifying the minimum row sum threshold for filtering events. Defaults to 50.

n_threads

If the module OpenPM is available for your device, the function suggests using multi-thread processing for even faster computation.

verbose

Logical. If TRUE, prints progress and informational messages. Default is FALSE.

...

Additional arguments to be passed.

Value

A data.table containing the events and their corresponding sum deviance values.

Examples

# loading the toy dataset
toy_obj <- load_toy_M1_M2_object()

# getting HVE (high variable events)
 HVE <- find_variable_events(toy_obj$m1, toy_obj$m2)

 # printing the results
 print(HVE[order(-sum_deviance)])

splikit documentation built on May 13, 2026, 9:08 a.m.