% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/deepblue.R
\name{deepblue_enrich_regions_overlap}
\alias{deepblue_enrich_regions_overlap}
\title{enrich_regions_overlap}
\usage{
deepblue_enrich_regions_overlap(query_id = NULL, background_query_id = NULL,
  datasets = NULL, genome = NULL, user_key = deepblue_options("user_key"))
}
\arguments{
\item{query_id}{- A string (Query ID)}

\item{background_query_id}{- A string (query_id containing the regions that will be used as the background data.)}

\item{datasets}{- A struct (a map where each key is an identifier and the value is a list containing experiment names or query_ids (you can use both together).)}

\item{genome}{- A string (the target genome)}

\item{user_key}{- A string (users token key)}
}
\value{
request_id - A string (Request ID - Use it to retrieve the result with info() and get_request_data(). The result is a list containing the datasets that overlap with the query_id regions.)
}
\description{
Enrich the regions based on regions overlap analysis.
}
\examples{
query_id = deepblue_select_experiments(
  experiment_name="S00VEQA1.hypo_meth.bs_call.GRCh38.20150707.bed")

filtered_query_id = deepblue_filter_regions(
  query_id = query_id,
  field = "AVG_METHYL_LEVEL",
  operation = "<",
  value = "0.0025",
  type="number")

rg_10kb_tilling = deepblue_tiling_regions(
    size = 1000,
    genome = "hg19")

# We could have included more Epigenetic Marks here
epigenetic_marks <- c("h3k27ac", "H3K27me3", "H3K4me3")

histones_datasets = c()
for (i in 1:length(epigenetic_marks)) {
  experiments_list <- deepblue_list_experiments(
    epigenetic_mark=epigenetic_marks[[i]],
    type="peaks",
    genome="grch38",
    project="BLUEPRINT Epigenome");

    experiment_names = deepblue_extract_names(experiments_list)
    histones_datasets[[epigenetic_marks[[i]]]] = experiment_names
}

deepblue_enrich_regions_overlap(
  query_id=filtered_query_id,
  background_query=rg_10kb_tilling,
  datasets=histones_datasets,
  genome="grch38")

}
\seealso{
Other Enrich the genome regions: \code{\link{deepblue_enrich_regions_fast}},
  \code{\link{deepblue_enrich_regions_go_terms}}
}
