Skip to contents

This function processes junction abundance data from multiple samples to create a splicing modality inclusion matrix (M1). It merges event data, handles start and end coordinate groups, ensures matrix compatibility, and includes robust error handling.

Usage

make_m1(junction_ab_object, min_counts = 1, verbose = FALSE)

Arguments

junction_ab_object

A named list where each element represents a sample's junction abundance data. Each element must contain eventdata and a sparse matrix.

min_counts

Numeric (default 1). Minimum count threshold for filtering events. Events with total counts below this threshold will be removed.

verbose

Logical (default FALSE). If TRUE, prints detailed progress messages during processing.

Value

A list containing the processed data from all samples:

m1_inclusion_matrix

A matrix representing the processed inclusion values for all events across all samples.

event_data

A data.table containing the merged and grouped metadata for each event.

Details

The function requires the following libraries: data.table, and Matrix.

Examples

# Example usage
junction_abundance_object <- load_toy_SJ_object()
result <- make_m1(junction_abundance_object)
m1_matrix <- result$m1_inclusion_matrix
event_metadata <- result$event_data