order.index.gene.data: Order and Index Gene Annotation Data

View source: R/order.index.gene.data.R

order.index.gene.dataR Documentation

Order and Index Gene Annotation Data

Description

Orders gene annotation data by chromosome and genomic coordinates and creates an index identifying the rows corresponding to each chromosome. This helper function is used to prepare gene annotation data for downstream GRIN overlap analyses.

Usage

order.index.gene.data(gene.data)

Arguments

gene.data

A data.frame containing gene annotation information, either provided by the user or obtained using get.ensembl.annotation. The data frame must contain the following columns:

"gene"

Gene identifier, typically an unversioned Ensembl gene ID.

"chrom"

Chromosome identifier on which the gene is located.

"loc.start"

Gene start position in base pairs.

"loc.end"

Gene end position in base pairs.

Details

Genes are ordered by chromosome, start position, and end position. Consecutive rows belonging to the same chromosome are represented by a single entry in gene.index, which records the first and last corresponding row in the ordered gene annotation data.

A gene.row column is added to the ordered gene annotation data and is used internally by downstream GRIN functions.

Value

A list with two components:

gene.data

The input gene annotation data ordered by chromosome, loc.start, and loc.end, with an added gene.row column.

gene.index

A data.frame with three columns: chrom, row.start, and row.end, identifying the range of rows corresponding to each chromosome in the ordered gene annotation data.

Author(s)

Abdelrahman Elsayed abdelrahman.elsayed@stjude.org and 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, get.ensembl.annotation

Examples

data(hg38_gene_annotation)

# Order gene annotation data and create chromosome-specific row indices
ordered.genes <- order.index.gene.data(hg38_gene_annotation)


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