mts_formatMatrix: Format a matrix into a list of data frames that capture gene...

View source: R/mts_formatMatrix.R

mts_formatMatrixR Documentation

Format a matrix into a list of data frames that capture gene functional status

Description

This function transforms an 'impact matrix' into a list of data frames, where each gene is represented by a separate data frame to provide information on the sample name, functional impact status (e.g. high/low impact mutations; high/low methylation levels) and impact group (1 for HIGH, 2 for LOW). This function should be used to format any gene by sample matrix to be used as input to the mts_patternDetection function in order to predict gene dependency relationship patterns.

Usage

mts_formatMatrix(matrix, cores) 

Arguments

matrix

A binary matrix in gene by sample format, where rownames correspond to genes (or probesets) and colnames correspond to sample names. The matrix must have either 1 or 2 values to represent impact groups (1 for HIGH, 2 for LOW).

cores

The number of compute cores to use. Defaults to 1.

Details

Formats an input matrix into the correct format for input into the mts_patternDetection() function.

Value

A list of dataframes, where each gene corresponds to a separate dataframe and contains the impact groups for samples (cell lines). Each dataframe has the following three columns:

Samples

Sample/cell line names associated with the gene (or probesets etc.).

Impact

An indicator for the impact status, which can be "HIGH" or "LOW".

ImpactGroup

The numeric impact assignment for each sample, values of 1 represent "HIGH" impact and 2 represents "LOW" impact.

See Also

mts_patternDetection

Examples

data("MUT_impactMatrix")
Formatted_MUTimpactMatrix = mts_formatMatrix(matrix = MUT_impactMatrix, cores = 1)

MultiSEp documentation built on Aug. 27, 2026, 5:07 p.m.