KW.hit.express: Associate Lesion Groups with Gene Expression

View source: R/KW.hit.express.R

KW.hit.expressR Documentation

Associate Lesion Groups with Gene Expression

Description

Performs the Kruskal-Wallis test to evaluate associations between genomic lesion groups and expression levels of the corresponding genes.

Usage

KW.hit.express(
  alex.data,
  gene.annotation,
  min.grp.size = NULL
)

Arguments

alex.data

Output from the alex.prep.lsn.expr function. A list containing:

  • alex.expr: Gene expression data with genes represented by Ensembl gene IDs in rows and subjects in columns.

  • alex.lsn: Lesion-group data for the same genes and subjects and in the same order as alex.expr.

  • alex.row.mtch: A data frame containing the matched Ensembl gene IDs from the expression and lesion data.

gene.annotation

A gene annotation data frame, either supplied by the user or retrieved using get.ensembl.annotation. It must contain the columns "gene" (Ensembl gene ID), "chrom" (chromosome), "loc.start" (gene start position), and "loc.end" (gene end position).

min.grp.size

Optional numeric value specifying the minimum number of subjects required in a lesion group for that group to be included in the Kruskal-Wallis test. For a gene to be tested, at least two groups must each contain at least min.grp.size subjects. Genes that do not satisfy this requirement are retained in the output with an NA Kruskal-Wallis p value.

Details

For each matched gene, the function compares expression values across the lesion groups defined in alex.lsn using the Kruskal-Wallis test. Expression values are obtained from the corresponding gene in alex.expr.

Subjects without a genomic lesion affecting the gene are represented by the lesion group "none". Subjects affected by more than one lesion type in the same gene may be represented by the group "multiple", as defined during preparation of the lesion matrix.

In addition to the Kruskal-Wallis p value, the function reports the number of subjects and the mean, median, and standard deviation of expression for each lesion group represented in the input data.

Kruskal-Wallis p values are adjusted for multiple testing using the Benjamini-Hochberg false discovery rate procedure implemented by p.adjust.

Value

A data frame containing gene annotation information and lesion-expression association results. Each row corresponds to a matched gene. Results include:

  • p.KW: Kruskal-Wallis test p value.

  • q.KW: FDR-adjusted q value.

  • Columns ending in _n.subjects: number of subjects in each lesion group.

  • Columns ending in _mean: mean expression within each lesion group.

  • Columns ending in _median: median expression within each lesion group.

  • Columns ending in _sd: standard deviation of expression within each lesion group.

Genes that do not meet the minimum group-size requirement are retained with NA values for p.KW and q.KW.

Author(s)

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

References

Kruskal, W. H., & Wallis, W. A. (1952). Use of Ranks in One-Criterion Variance Analysis. Journal of the American Statistical Association, 47(260), 583-621.

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

Examples

data(expr_data)
data(lesion_data)
data(hg38_gene_annotation)

# Prepare matched lesion-expression data (genes x subjects)
alex.data <- alex.prep.lsn.expr(expr_data,
                                lesion_data,
                                hg38_gene_annotation,
                                min.expr = 1,
                                min.pts.lsn = 5)

# Perform Kruskal-Wallis test between lesion groups and expression levels
alex.kw.results <- KW.hit.express(alex.data,
                                  hg38_gene_annotation,
                                  min.grp.size = 5)

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