This function will link peak to genes based on correlation analysis. We here modified the code from the ArchR package of the addPeak2GeneLinks function to make it compatible with matrix input. For more details, please refer to https://www.archrproject.com/reference/addPeak2GeneLinks.html.
Author: Jeffrey Granja

PeakToGene(
  peak.mat,
  gene.mat,
  genome = "hg19",
  max.dist = 250000,
  method = "corrleation"
)

Arguments

peak.mat

A matrix containing chromatin accessibility data

gene.mat

A matrix containing gene expression data

genome

Which genome to use. Currently available are: hg19, hg38, mm9, and mm10

max.dist

The maximum distance between a peak and a gene. Default: 250000 bp

method

Which method to use to measure the association between peak and gene. Available are: "correlation", "glm"

Value

A data frame containing all peak-to-gene links