| grin.stats | R Documentation |
Executes the Genomic Random Interval (GRIN) statistical framework to determine whether genomic loci, such as genes or regulatory regions, are affected by genomic lesions more frequently than expected by chance. The function evaluates the enrichment of individual lesion types and, when multiple lesion types are present, constellations of complementary lesion types affecting the same locus.
By default, GRIN models each lesion type using the complete genomic interval of each locus and the complete size of the corresponding chromosome. Optionally, selected lesion types can be evaluated using exon-level gene and chromosome target sizes when the analysis is restricted to exonic lesions.
grin.stats(
lsn.data,
gene.data,
chr.size,
exons.annotation = NULL,
exon.chrom.size = NULL,
exon_level = NULL
)
lsn.data |
A
For single nucleotide variants, |
gene.data |
A
The rows in |
chr.size |
A |
exons.annotation |
An optional
When a user-provided |
exon.chrom.size |
An optional |
exon_level |
An optional character vector specifying lesion types that
should be modeled using exon-level gene and chromosome target sizes. Each
value must exactly match a category in |
GRIN uses a null probability model in which each lesion is assumed to occur uniformly along the chromosome on which it was observed. Under this model, the overlap of each lesion with a locus of interest is an independent Bernoulli trial with success probability proportional to the sum of the lengths of the lesion and the locus and inversely proportional to the chromosome length.
For each subject, the probabilities of all lesions belonging to that
subject are combined to calculate the probability that at least one of
the subject's lesions affects the locus.These subject-specific probabilities
are convolved across subjects to obtain the null probability distribution for
the number of subjects with at least one lesion affecting the locus.
Statistical significance is determined by comparing the observed number of
affected subjects with this null distribution. GRIN also evaluates the significance of the observed total
number of lesion hits. P-values are adjusted for multiple testing using the Benjamini-Hochberg
false discovery rate procedure together with the Pounds and Cheng estimator
of the proportion of true null hypotheses,
pi.hat = min(1, 2 * mean(p)).
The genomic target space depends on the lesion type. For lesion types not
specified in exon_level, GRIN uses the complete locus interval from
gene.data and complete chromosome length from chr.size. For
lesion types specified in exon_level, GRIN instead uses the summed
exon length of each gene from exons.annotation and the genome-wide
exon target size of the chromosome from exon.chrom.size. This
provides an exon-specific target space for analyses restricted to exonic
variants.
When multiple lesion types are present, GRIN additionally calculates ordered constellation p-values and q-values to evaluate evidence that a locus is affected by one, two, or more complementary lesion types.
A list containing the following components:
A data.frame containing one row per gene or locus,
including lesion-hit counts (nhit.*), affected-subject counts
(nsubj.*), and their corresponding lesion-specific p-values and
q-values (p.nhit.*, q.nhit.*, p.nsubj.*, and
q.nsubj.*). When multiple lesion types are present, ordered
constellation p-values and q-values (p1.*, p2.*, ...,
q1.*, q2.*, ...) are also returned.
Input lesion data with the internal lsn.row
index added.
Input gene or locus annotation data with the internal
gene.row index added.
A data.frame containing detected gene-lesion
overlaps and their corresponding gene, lesion, and subject information.
Chromosome-size reference used for standard GRIN calculations.
A data.frame indexing genes or loci by
chromosome.
A data.frame indexing lesion groups by lesion
type, chromosome, and subject.
Numeric vector containing gene-level exon target
sizes. Returns NULL when exon-level analysis was not requested.
A data.frame containing chromosome-level
exon target sizes. Returns NULL when exon-level analysis was not
requested.
Character vector identifying lesion types modeled using
exon-level target sizes. Returns NULL when exon-level analysis was
not requested.
Abdelrahman Elsayed abdelrahman.elsayed@stjude.org and Stanley Pounds stanley.pounds@stjude.org
Pounds, S., et al. (2013). A genomic random interval model for statistical analysis of genomic lesion data.
Pounds, S., and Cheng, C. (2006). Robust estimation of the false discovery rate.
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,
count.hits,
prob.hits,
get.ensembl.annotation
data(lesion_data)
data(hg38_gene_annotation)
data(hg38_chrom_size)
data(example_exon_annotation)
data(hg38_exon_chrom_size)
# Example 1: Run GRIN using standard gene and chromosome target sizes
grin.results <- grin.stats(
lsn.data = lesion_data,
gene.data = hg38_gene_annotation,
chr.size = hg38_chrom_size
)
# Example 2: Model mutations using exon-level target sizes
grin.exon.results <- grin.stats(
lsn.data = lesion_data,
gene.data = hg38_gene_annotation,
chr.size = hg38_chrom_size,
exons.annotation = example_exon_annotation,
exon.chrom.size = hg38_exon_chrom_size,
exon_level = "mutation"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.