order.index.lsn.data: Order and Index Lesion Data

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

order.index.lsn.dataR Documentation

Order and Index Lesion Data

Description

Orders lesion data by lesion type, chromosome, and patient identifier and creates an index identifying contiguous rows for each lesion type-chromosome-patient combination. This helper function prepares lesion data for downstream GRIN overlap analyses.

Usage

order.index.lsn.data(lsn.data)

Arguments

lsn.data

A data.frame containing lesion data in GRIN-compatible format with the following columns:

"ID"

Patient identifier.

"chrom"

Chromosome identifier on which the lesion is located.

"loc.start"

Lesion start position in base pairs.

"loc.end"

Lesion end position in base pairs.

"lsn.type"

Lesion type assigned to the genomic alteration.

Details

Lesions are ordered by lesion type, chromosome, and patient identifier. Consecutive rows sharing the same lesion type, chromosome, and patient are represented by a single entry in lsn.index.

For example, if a patient has one lesion of a given type on a chromosome, row.start and row.end are identical. If multiple lesions of the same type occur on that chromosome for the same patient, the index spans the corresponding rows.

An lsn.row column is added to the ordered lesion data and is used internally by downstream GRIN functions.

Value

A list with two components:

lsn.data

The input lesion data ordered by lesion type, chromosome, and patient identifier, with an added lsn.row column.

lsn.index

A data.frame with five columns: lsn.type, chrom, ID, row.start, and row.end, identifying the range of rows corresponding to each lesion type-chromosome-patient combination.

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

Examples

data(lesion_data)

# Order lesion data and create lesion type-chromosome-patient row indices
ordered.lsn <- order.index.lsn.data(lesion_data)


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