% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/region_info.R
\name{region_info}
\alias{region_info}
\title{Print relevant info about candidate probe sequence.}
\usage{
region_info(
  REGION,
  CSV = TRUE,
  SEQ = TRUE,
  OUTDIR = tempdir(),
  CODING_ONLY = FALSE
)
}
\arguments{
\item{REGION}{Either a single hg19 genomic sequence including the chromosome,
start, end, and optionally strand separated by colons (e.g.,
\code{'chr20:10199446-10288068:+'}), or a string of sequences to be annotated.
Must be character. Chromosome must be proceeded by 'chr'.}

\item{CSV}{A \code{logical(1)} value indicating if the results should be exported
in a .csv file.}

\item{SEQ}{A `logical(1)`` value indicating if the base sequence should be
returned.}

\item{OUTDIR}{If a .csv file is to be exported, this parameter indicates the
path where the file should be saved. By default the file will be
saved in a temporary directory.}

\item{CODING_ONLY}{A logical vector of length 1 specifying whether to
subset the Annotated Genes to only the coding genes. That is, whether to
subset the genes by whether they have a non-NA \code{CSS} value. The Annotated
Genes are downloaded with \code{\link[GenomicState:GenomicStateHub]{GenomicState::GenomicStateHub()}}.}
}
\value{
This function annotates all input sequences using
\code{\link[bumphunter:matchGenes]{bumphunter::matchGenes()}}. It returns a data frame where each
row is a genomic sequence specified in REGION. The columns
c('seqnames', 'start', 'end', 'width', 'strand') list the chromosome,
range, sequence length, and strand of the REGION. The columns c('name',
'annotation', 'description', 'region', 'distance', 'subregion',
'insideDistance', 'exonnumber', 'nexons', 'UTR', 'geneL', 'codingL',
'Geneid', 'subjectHits') are described in
\code{\link[bumphunter:matchGenes]{bumphunter::matchGenes()}} documentation.

If SEQ=TRUE, a column 'Sequence' will be included. This is recommended for
sending the probe sequence to be synthesized.

If CSV=TRUE, a .csv file called region_info.csv will be saved to a
temporary directory unless otherwise specified in \code{OUTDIR}.
}
\description{
\code{region_info} returns annotation of a single potential probe sequence or
list of sequences and, if specified, prints the resuts in a .csv file.
}
\examples{
x <- region_info("chr20:10286777-10288069:+", CSV = FALSE)
head(x)

## You can easily transform this data.frame to a GRanges object
GenomicRanges::GRanges(x)

y <- region_info(c(
    "chr20:10286777-10288069:+",
    "chr18:74690788-74692427:-",
    "chr19:49932861-49933829:-"
),
CSV = FALSE, SEQ = FALSE
)
head(y)

candidates <- c(
    "chr20:10286777-10288069:+",
    "chr18:74690788-74692427:-",
    "chr19:49932861-49933829:-"
)
region_info(candidates, CSV = FALSE)

## Explore the effect of changing CODING_ONLY
## Check how the "distance", "name", "Geneid" among other values change
region_info("chr10:135379301-135379311:+", CSV = FALSE)
region_info("chr10:135379301-135379311:+", CSV = FALSE, CODING_ONLY = TRUE)
\dontrun{
region_info(candidates, OUTDIR = "/path/to/directory/")

region_info("chr20:10286777-10288069:+", OUTDIR = "/path/to/directory")
}
}
\author{
Amanda J Price
}
