count.hits: Count Gene Lesion Hits

View source: R/count.hits.R

count.hitsR Documentation

Count Gene Lesion Hits

Description

Computes the number of genomic lesions ("hits") affecting each gene by lesion category. It also calculates the number of unique subjects whose lesions overlap each gene by lesion type.

Usage

count.hits(ov.data)

Arguments

ov.data

A list of six data.frame objects generated by the find.gene.lsn.overlaps() function, containing gene-lesion overlap data and supporting indices.

Details

This function summarizes the output of find.gene.lsn.overlaps() by generating two key matrices:

  • nsubj.mtx: For each gene, the number of unique subjects with at least one overlapping lesion of each type.

  • nhit.mtx: For each gene, the total number of overlapping lesions (hits), regardless of subject redundancy, categorized by lesion type.

For example, if the gene NOTCH1 is affected by three separate mutations in the same subject, that subject will be counted once in nsubj.mtx, but all three hits will be counted in nhit.mtx.

Value

A list containing the following components:

lsn.data

Original input lesion data.

lsn.index

A data.frame indexing the rows in gene.lsn.data that correspond to each lesion.

gene.data

Original input gene annotation data.

gene.index

A data.frame indexing the rows in gene.lsn.data that correspond to each chromosome.

nhit.mtx

A data.frame where rows correspond to genes and columns to lesion types. Each value is the number of hits (lesions) of a certain type affecting the gene.

nsubj.mtx

A data.frame with the same structure as nhit.mtx, but showing the number of unique subjects with at least one hit of each lesion type per gene.

gene.lsn.data

A data.frame where each row represents a gene overlapped by a lesion. Includes gene name (gene) and subject ID (ID).

glp.data

A data.frame ordered by gene and lesion start positions. The cty column encodes event boundaries: 1 = gene start, 2 = lesion start, 3 = lesion end, 4 = gene end.

Author(s)

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

References

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.

See Also

prep.gene.lsn.data, find.gene.lsn.overlaps

Examples

data(lesion_data)
data(hg38_gene_annotation)

# Prepare gene and lesion data for GRIN analysis:
prep.gene.lsn <- prep.gene.lsn.data(lesion_data, hg38_gene_annotation)

# Identify overlapping gene-lesion events:
gene.lsn.overlap <- find.gene.lsn.overlaps(prep.gene.lsn)

# Count the number of subjects and lesions (hits) affecting each gene:
count.nsubj.nhits <- count.hits(gene.lsn.overlap)

GRIN2 documentation built on June 17, 2025, 9:11 a.m.