View source: R/prep.lsn.type.matrix.R
prep.lsn.type.matrix | R Documentation |
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.
prep.lsn.type.matrix(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 any lesion in a given gene for that gene to be retained in the final matrix. The default is |
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
.
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"
.
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 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.