write.grin.xlsx: Write GRIN Results to an Excel File

View source: R/write.grin.xlsx.R

write.grin.xlsxR Documentation

Write GRIN Results to an Excel File

Description

Writes selected components of GRIN analysis results to a multi-sheet Excel workbook. The workbook contains GRIN statistical results, input lesion and annotation data, chromosome sizes, an interpretation sheet describing the output columns, and a summary of the statistical methods and references.

The gene.lsn.data component is intentionally excluded from the Excel workbook because gene-lesion overlap tables can become too large for an Excel worksheet.

Usage

write.grin.xlsx(grin.result, output.file)

Arguments

grin.result

A list returned by grin.stats containing GRIN analysis results. The object must include gene.hits, lsn.data, gene.data, and chr.size.

output.file

A character string specifying the path and filename of the output Excel workbook. The filename must end with ".xlsx".

Details

The function exports the principal GRIN results and input data while excluding gene.lsn.data, which may exceed the size supported by an Excel worksheet for large analyses.

An interpretation worksheet is generated automatically to describe the exported data sheets and the columns in gene.hits. Descriptions are generated dynamically according to the lesion types and constellation statistics present in the GRIN results.

A methods.paragraph worksheet is also included with a concise description of the GRIN statistical methodology and relevant references.

Value

Invisibly returns NULL. The function writes an Excel workbook to output.file containing the following worksheets:

  • gene.hits: GRIN statistical results, including lesion counts, subject counts, individual lesion-type p- and q-values, and available constellation statistics.

  • lsn.data: Input genomic lesion data used in the analysis.

  • gene.data: Input gene annotation data used in the analysis.

  • chr.size: Input chromosome size data.

  • interpretation: Descriptions of the exported worksheets and result columns.

  • methods.paragraph: Summary of the GRIN statistical methods and references.

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. Bioinformatics, 29(17), 2088-2095.

Cao, X., Elsayed, A. H., & Pounds, S. B. (2023). Statistical Methods Inspired by Challenges in Pediatric Cancer Multi-omics.

See Also

grin.stats

Examples

data(lesion_data)
data(hg38_gene_annotation)
data(hg38_chrom_size)

# Run GRIN analysis
grin.results <- grin.stats(
  lesion_data,
  hg38_gene_annotation,
  hg38_chrom_size
)

# Write GRIN results to a temporary Excel workbook
tmp_file <- tempfile(fileext = ".xlsx")

write.grin.xlsx(
  grin.results,
  output.file = tmp_file
)

unlink(tmp_file)

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