| Title: | Building Gene-Peak Network for ATAC-RNA Integration |
|---|---|
| Description: | GPlinksR constructs gene-peak regulatory networks for ATAC-RNA integration by combining enhancer-based, promoter-based, and proximity (closest-gene) mappings. The package accepts direct peak and gene vectors as well as container-based inputs through a wrapper for common Bioconductor object classes. Enhancer-gene links are obtained from the PEREGRINE enhancer-gene datasets provided by AnnoQ, while promoter and gene coordinates are retrieved from EnsDb.Hsapiens.v86. |
| Authors: | Xinran Wang [aut, cre] (ORCID: <https://orcid.org/0009-0000-1805-3280>), Kelly Street [ctb], Huaiyu Mi [ctb], Bryan Queme [ctb] |
| Maintainer: | Xinran Wang <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.99.0 |
| Built: | 2026-06-23 02:45:35 UTC |
| Source: | https://github.com/BiocStaging/GPlinksR |
Build Gene-Peak Network (Enhancer, Promoter, Closest)
build_gp_links(pk, gn, ver = 19, enh_file = NULL)build_gp_links(pk, gn, ver = 19, enh_file = NULL)
pk |
Either: (1) A character vector of genomic coordinates ("chr1:1000-1200"), or (2) A data.frame containing peak coordinates with columns "chr","start","end" or a "PeakRegion" column ("chr1:1000-1200" style). |
gn |
Character vector of gene symbols (HGNC official symbols, e.g. "TP53", "FMNL2"). |
ver |
Integer (17, 18, or 19) - PANTHER enhancer-gene link version. |
enh_file |
Optional local path to enhancer-gene link file (.tsv). |
A data.frame with columns: Peak, Gene, Src. Closest-gene mappings are based on distance from each peak to gene TSS.
data("gp_example_inputs", package = "GPlinksR") data("gp_example_links", package = "GPlinksR") pk <- gp_example_inputs$pk[seq_len(3)] gn <- gp_example_inputs$gn[seq_len(4)] head(gp_example_links) if (interactive()) { gp <- build_gp_links(pk, gn) head(gp) }data("gp_example_inputs", package = "GPlinksR") data("gp_example_links", package = "GPlinksR") pk <- gp_example_inputs$pk[seq_len(3)] gn <- gp_example_inputs$gn[seq_len(4)] head(gp_example_links) if (interactive()) { gp <- build_gp_links(pk, gn) head(gp) }
Wrapper around build_gp_links() that extracts peak coordinates and gene
symbols from a MultiAssayExperiment or SingleCellExperiment,
then runs the standard GPlinksR workflow.
build_gp_links_wrapper( x, peak_experiment = NULL, gene_experiment = NULL, peak_col = NULL, gene_col = NULL, ver = 19, enh_file = NULL )build_gp_links_wrapper( x, peak_experiment = NULL, gene_experiment = NULL, peak_col = NULL, gene_col = NULL, ver = 19, enh_file = NULL )
x |
A |
peak_experiment |
For |
gene_experiment |
For |
peak_col |
Optional |
gene_col |
Optional |
ver |
Integer (17, 18, or 19). PEREGRINE enhancer-gene link version. |
enh_file |
Optional local path to enhancer-gene link file ( |
Peak features are extracted from rowRanges(), rowData(), or row
names. Gene symbols are extracted from rowData() or row names.
A data.frame with columns returned by build_gp_links().
if (requireNamespace("SingleCellExperiment", quietly = TRUE) && requireNamespace("SummarizedExperiment", quietly = TRUE)) { sce <- SingleCellExperiment::SingleCellExperiment( assays = list(counts = matrix(seq_len(12), nrow = 3)), rowData = S4Vectors::DataFrame(symbol = c("TP53", "GATA1", "SPI1")) ) SingleCellExperiment::altExp(sce, "ATAC") <- SummarizedExperiment::SummarizedExperiment( assays = list(counts = matrix(seq_len(12), nrow = 3)), rowData = S4Vectors::DataFrame( PeakRegion = c( "chr1:1000-1200", "chr1:5000-5200", "chr2:9000-9300" ) ) ) sce # Example wrapper call: # build_gp_links_wrapper( # x = sce, peak_experiment = "ATAC", gene_col = "symbol" # ) }if (requireNamespace("SingleCellExperiment", quietly = TRUE) && requireNamespace("SummarizedExperiment", quietly = TRUE)) { sce <- SingleCellExperiment::SingleCellExperiment( assays = list(counts = matrix(seq_len(12), nrow = 3)), rowData = S4Vectors::DataFrame(symbol = c("TP53", "GATA1", "SPI1")) ) SingleCellExperiment::altExp(sce, "ATAC") <- SummarizedExperiment::SummarizedExperiment( assays = list(counts = matrix(seq_len(12), nrow = 3)), rowData = S4Vectors::DataFrame( PeakRegion = c( "chr1:1000-1200", "chr1:5000-5200", "chr2:9000-9300" ) ) ) sce # Example wrapper call: # build_gp_links_wrapper( # x = sce, peak_experiment = "ATAC", gene_col = "symbol" # ) }
Download Enhancer-Gene Link File from PANTHER Peregrine Database
get_peregrine_file(version = 19)get_peregrine_file(version = 19)
version |
Integer (17, 18, or 19). Which PANTHER enhancer-gene link version to download. |
The full path to the downloaded .tsv file stored in the
BiocFileCache.
if (interactive()) { f <- get_peregrine_file(19) f readLines(f, n = 3) }if (interactive()) { f <- get_peregrine_file(19) f readLines(f, n = 3) }
A small example dataset for demonstrating GPlinksR workflows.
The object contains 300 peak coordinates and 100 gene symbols suitable for
examples and vignettes. The first few entries are curated so that the
vignette examples produce enhancer-, promoter-, and closest-based links from
the packaged data.
data(gp_example_inputs)data(gp_example_inputs)
A list with two elements:
pkA character vector of 300 peak coordinates in
"chr:start-end" format.
gnA character vector of 100 gene symbols.
data(gp_example_inputs) length(gp_example_inputs$pk) length(gp_example_inputs$gn)data(gp_example_inputs) length(gp_example_inputs$pk) length(gp_example_inputs$gn)
A precomputed example gene-peak link table corresponding to the curated
leading entries in gp_example_inputs. The table includes enhancer-,
promoter-, and closest-based links and is used in the vignette to display
representative output without rerunning external downloads.
data(gp_example_links)data(gp_example_links)
A data.frame with 7 rows and 3 columns:
PeakPeak coordinate in "chr:start-end" format.
GeneGene symbol linked to the peak.
SrcLink source, one of "enh", "prom", or
"clo".
data(gp_example_links) head(gp_example_links) table(gp_example_links$Src)data(gp_example_links) head(gp_example_links) table(gp_example_links$Src)