get_enhancer_clusters: Obtain enhancer clusters

View source: R/get_enhancer_clusters.R

get_enhancer_clustersR Documentation

Obtain enhancer clusters

Description

Given a list of peaks, obtain clusters.

Usage

get_enhancer_clusters(
  gr,
  n_sites = 3,
  iterations = 500,
  percentile = 0.25,
  genome = "hg38",
  rm = c("chrX", "chrY"),
  nthreads = 6
)

Arguments

gr

Character with the name of the file containing peaks or GRanges object.

n_sites

Minimum number of sites to consider a region enhancer cluster.

iterations

Number of iterations for obtaining distance cutoff.

percentile

Percentile of random distances to use for stitching peaks into the same cluster. Default: 0.25.

genome

Character indicating the name of the genome to use. Default: hg38.

rm

Names of chromosomes to remove. Default: chrX and chrY.

nthreads

Number of threads to use for the analysis.

Details

To define enhancer clusters, input sites are first randomized iterations times over the genome over idividual chromosomes). Then the percentile percentile of inter-site distances of randomized is calculated for each chromosome. Next, clusters are defined as any group of ≥ n_sites sites in which all adjacent sites are separated by less than the abovementioned percentile distance.

Value

GRanges object containing the coordinates for the enhancer clusters and the following mcols:

  • clustIDUnique identifier for the enhancer cluster.

  • n_sitesNumber of sites in gr that are included in that specific cluster.

  • distance_cutoffDistance used as cutoff for including regions in the same cluster.


mireia-bioinfo/meowmics documentation built on July 29, 2023, 10 p.m.