prep.lsn.type.matrix: Prepare Lesion Type Matrix

View source: R/prep.lsn.type.matrix.R

prep.lsn.type.matrixR Documentation

Prepare Lesion Type Matrix

Description

Constructs a matrix that summarizes the type(s) of lesions affecting each gene across patients. Each row represents a gene, and each column represents a patient.

Usage

prep.lsn.type.matrix(ov.data, min.ngrp = 0)

Arguments

ov.data

A list of six data.frame objects returned by the find.gene.lsn.overlaps function, containing gene-lesion overlap results.

min.ngrp

Optional integer specifying the minimum number of patients that must be affected by any lesion in a given gene for that gene to be retained in the final matrix. The default is 0, which includes all genes affected by any lesion in at least one patient.

Details

This function produces a matrix with genes as rows and patients as columns. For each gene-patient pair:

  • If the patient has no lesion in the gene, the entry is "none".

  • If the gene is affected by exactly one type of lesion in the patient (e.g., gain OR mutation), the entry is labeled with the corresponding lesion type.

  • If the gene is affected by more than one lesion type in the patient (e.g., gain AND mutation), the entry is labeled as "multiple".

Genes affected in fewer than min.ngrp patients across all lesion types will be excluded if min.ngrp > 0.

Value

A character matrix where:

  • Rows correspond to genes (identified by Ensembl gene IDs).

  • Columns correspond to patient IDs.

  • Entries are "none", a specific lesion type (e.g., "gain", "mutation"), or "multiple".

Author(s)

Abdelrahman Elsayed abdelrahman.elsayed@stjude.org, Stanley Pounds stanley.pounds@stjude.org

References

Pounds, S., et al. (2013). A genomic random interval model for statistical analysis of genomic lesion data.

Cao, X., Elsayed, A. H., & Pounds, S. B. (2023). Statistical Methods Inspired by Challenges in Pediatric Cancer Multi-omics.

See Also

prep.gene.lsn.data, find.gene.lsn.overlaps

Examples

data(lesion_data)
data(hg38_gene_annotation)

# 1) Prepare gene and lesion data:
prep.gene.lsn <- prep.gene.lsn.data(lesion_data, hg38_gene_annotation)

# 2) Identify gene-lesion overlaps:
gene.lsn.overlap <- find.gene.lsn.overlaps(prep.gene.lsn)

# 3) Create lesion type matrix for genes affected in >= 5 patients:
lsn.type.mtx <- prep.lsn.type.matrix(gene.lsn.overlap, min.ngrp = 5)

GRIN2 documentation built on June 17, 2025, 9:11 a.m.