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 lesion type matrix summarizing the genomic lesion type(s) 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

GRIN gene-lesion overlap results, typically the output from the find.gene.lsn.overlaps function.

min.ngrp

Optional integer specifying the minimum number of patients affected by any lesion type in a given gene for that gene to be retained in the output matrix. The default is 0, which retains all genes represented in the gene-lesion overlap data.

Details

The function uses the gene-lesion overlaps in ov.data$gene.lsn.hits to construct a character matrix with genes as rows and patients as columns.

For each gene-patient combination:

  • "none" indicates that no lesion overlaps the gene in that patient.

  • A specific lesion type indicates that only one distinct lesion type affects the gene in that patient.

  • "multiple" indicates that more than one distinct lesion type affects the same gene in that patient.

Multiple lesions of the same type affecting the same gene in a patient are represented by that lesion type rather than "multiple".

When min.ngrp > 0, genes affected by any lesion type in fewer than min.ngrp patients are excluded from the final matrix.

Value

A character matrix in which:

  • Rows represent genes.

  • Columns represent patient IDs.

  • Entries are "none", a specific lesion type, or "multiple".

Author(s)

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

References

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, prep.binary.lsn.mtx

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 at least 5 patients
lsn.type.mtx <- prep.lsn.type.matrix(gene.lsn.overlap,
                                     min.ngrp = 5)


GRIN2 documentation built on Aug. 22, 2026, 5:09 p.m.