View source: R/prep.binary.lsn.mtx.R
| prep.binary.lsn.mtx | R Documentation |
Constructs a binary lesion matrix representing the presence or absence of specific lesion types affecting individual genes across patients. Each row represents a gene-lesion type combination, and each column represents a patient.
prep.binary.lsn.mtx(ov.data,
min.ngrp = 0)
ov.data |
GRIN gene-lesion overlap results, typically the output from
the |
min.ngrp |
Optional integer specifying the minimum number of patients
required in both the affected and unaffected groups for a gene-lesion type
combination to be retained. The default is |
The function uses the gene-lesion overlaps in ov.data$gene.lsn.hits to
construct a binary matrix with gene-lesion type combinations as rows and
patients as columns.
Each row is labeled using the format gene_lesion.type (for example,
ENSG00000118513_gain). For each gene-lesion type combination, a patient
receives a value of 1 if affected by that lesion type in the corresponding
gene and 0 otherwise.
When min.ngrp > 0, a row is retained only when both the affected group
(1) and unaffected group (0) contain at least min.ngrp patients. This
can be useful when the resulting binary matrix is used for downstream
analyses that require a minimum number of patients in each comparison group.
A numeric binary matrix in which:
Rows represent gene-lesion type combinations
(gene_lesion.type).
Columns represent patient IDs.
Entries are 1 when the patient is affected by the specified lesion
type in that gene and 0 otherwise.
Abdelrahman Elsayed abdelrahman.elsayed@stjude.org and Stanley Pounds stanley.pounds@stjude.org
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 a binary lesion matrix requiring at least 5 patients
# in both the affected and unaffected groups
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.