View source: R/prep.binary.lsn.mtx.R
prep.binary.lsn.mtx | R Documentation |
Constructs a binary matrix representing the presence or absence of specific lesion types affecting individual genes across patients. Each row corresponds to a gene-lesion type combination, and each column corresponds to a patient.
prep.binary.lsn.mtx(ov.data, min.ngrp = 0)
ov.data |
A list of six |
min.ngrp |
Optional integer specifying the minimum number of patients that must be affected by a given gene-lesion combination to be retained in the output matrix. The default is |
The function processes the overlap results from find.gene.lsn.overlaps
and constructs a binary matrix with dimensions: (gene and lesion type) by patient.
Each row is labeled using the format <gene.ID>_<lesion.type>
(e.g., ENSG00000118513_gain
for a gain affecting the MYB gene). For each gene-lesion combination, a patient receives a value of 1
if affected by that specific lesion type in the corresponding gene, and 0
otherwise.
Rows representing rare lesions (i.e., affecting fewer patients than min.ngrp
) are excluded from the final matrix if min.ngrp > 0
.
A binary matrix (as a data.frame
) where:
Rows correspond to gene-lesion combinations (gene.ID_lesion.type
).
Columns correspond to patient IDs.
Entries are binary: 1
if the patient is affected by such a specific type of lesion in that gene, 0
otherwise.
Abdelrahman Elsayed abdelrahman.elsayed@stjude.org, Stanley Pounds stanley.pounds@stjude.org
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.
prep.gene.lsn.data
, find.gene.lsn.overlaps
data(lesion_data)
data(hg38_gene_annotation)
# 1) Prepare gene-lesion input 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 binary lesion matrix including only lesion-gene pairs affecting >= 5 patients:
lsn.binary.mtx <- prep.binary.lsn.mtx(gene.lsn.overlap, min.ngrp = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.