% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{get_region_cov}
\alias{get_region_cov}
\title{Check or compute the region coverage from the datasets in brainflowprobes}
\usage{
get_region_cov(
  REGION,
  COVERAGE = NULL,
  VERBOSE = TRUE,
  PD = brainflowprobes::pd
)
}
\arguments{
\item{REGION}{Either a single hg19 genomic sequence including the chromosome,
start, end, and optionally strand separated by colons (e.g.,
'chr20:10199446-10288068:+'), or a string of sequences. Must be character.
Chromosome must be proceeded by 'chr'.}

\item{COVERAGE}{The output of \link{brainflowprobes_cov} for the input
\code{REGION}. Defaults to \code{NULL} but it can be pre-computed and saved
separately since this is the step that takes the longest to run. Also, this
is the only step that depends on rtracklayer's functionality for reading
BigWig files which does not run on Windows OS. So it could be run on a
non-Windows machine, saved, and then shared with Windows users.}

\item{VERBOSE}{A logical value indicating whether to print updates from the
process of loading the data from the BigWig files.}

\item{PD}{A list of data.frames with the \code{sumMapped} and \code{files}
columns. Defaults to the data included in this package.}
}
\value{
If \code{COVERAGE} is provided and all checks pass, then this function
returns \code{COVERAGE}. Otherwise, it computes a new region coverage data.frame
list using \link{brainflowprobes_cov}.
}
\description{
This utility function checks the user-provided region data.frame coverage
list (\code{COVERAGE}) or computes a new one using \link{brainflowprobes_cov}.
This is used by \link{four_panels} and \link{plot_coverage}.
}
\examples{

## If all checks pass, then it returns the COVERAGE
stopifnot(identical(
    get_region_cov(COVERAGE = four_panels_example_cov),
    four_panels_example_cov
))
}
\author{
Leonardo Collado-Torres
}
