alex.waterfall.prep {GRIN2} | R Documentation |
Prepare Lesion and Expression Data for Waterfall Plots
Description
Prepares matched lesion and expression data for a selected gene to be used with the alex.waterfall.plot
function.
Usage
alex.waterfall.prep(alex.data, alex.kw.results, gene, lsn.data)
Arguments
alex.data |
Output from |
alex.kw.results |
Kruskal Wallis test results for gene expression by lesion group, as returned by |
gene |
Gene of interest, specified by either its gene symbol or Ensembl ID. |
lsn.data |
Lesion data in GRIN-compatible format. A data frame with five required columns: |
Details
This function extracts and combines lesion and expression data for a specified gene across patients. It returns a data table showing each patient's lesion status and expression level for the gene. It also extracts the corresponding Kruskal Wallis test result and all lesions that affect the gene from the lesion data.
Value
A list with the following components:
gene.lsn.exp |
A data table with three columns: |
lsns |
A data table of all lesions affecting the gene of interest, extracted from the input lesion data (GRIN-compatible format). |
stats |
A one-row data frame containing the Kruskal Wallis test result for the gene, from |
gene.ID |
The gene name (symbol or Ensembl ID) provided as input. |
Author(s)
Abdelrahman Elsayed abdelrahman.elsayed@stjude.org, 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
alex.prep.lsn.expr
, KW.hit.express
Examples
data(expr_data)
data(lesion_data)
data(hg38_gene_annotation)
# Prepare matched expression and lesion data
alex.data <- alex.prep.lsn.expr(expr_data, lesion_data,
hg38_gene_annotation, min.expr = 1, min.pts.lsn = 5)
# Run Kruskal Wallis test
alex.kw.results <- KW.hit.express(alex.data, hg38_gene_annotation, min.grp.size = 5)
# Prepare lesion and expression data for waterfall plot of WT1
WT1.waterfall.prep <- alex.waterfall.prep(alex.data, alex.kw.results, "WT1", lesion_data)