Given two GRanges objects, this function calculates the overlaps between them. Based on the calculated overlaps, this function relies upon regioneR to perform permutation test to assess the significance of overlaps between the two GRanges objects. Finally, a p-value will be calculated. Usually, we perform comparison for the enhancer set of an eRegulon against a series of ChIP-seq peaks in the same tissues or cell lines.

intersect_peaks(x, y, n.times = 100, alternative = "greater")

Arguments

x

The first GRanges object or data.frame.

y

The first GRanges object or data.frame.

n.times

The number of times of permutation, 1000 by default.

alternative

The direction of alternative hypothesis, "greater" by default.

Value

Return a numeric p-value.

References

Li, Y., Ma, A., Wang, Y., Wang, C., Chen, S., Fu, H., Liu, B. and Ma, Q., 2022. Enhancer-driven gene regulatory networks inference from single-cell RNA-seq and ATAC-seq data. bioRxiv, pp.2022-12.

Gel, B., Díez-Villanueva, A., Serra, E., Buschbeck, M., Peinado, M. A., & Malinverni, R. (2016). regioneR: an R/Bioconductor package for the association analysis of genomic regions based on permutation tests. Bioinformatics, 32(2), 289-291.