% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/All-functions.R
\name{GR2tfbs_db}
\alias{GR2tfbs_db}
\title{Makes a TFBS-gene binding database}
\usage{
GR2tfbs_db(Ref.db, gr.list, distanceMargin = 10,
  outputAsVector = FALSE)
}
\arguments{
\item{Ref.db}{GenomicRanges object containing a database of reference
elements (either Genes or gene-associate Dnase regions) including
a gene_id metacolumn}

\item{gr.list}{List of GR objects containing ChIP-seq peak coordinates
(output of txt2GR).}

\item{distanceMargin}{Maximum distance allowed between a gene or DHS to
assign a gene to a ChIP-seq peak. Set to 10 bases by default.}

\item{outputAsVector}{when 'TRUE', the output is a list of vectors
instrad of a list of GeneSet objects}
}
\value{
List of GeneSe objetcs or vectors, one for every ChIP-Seq,
storing the IDs of the genes to which the TF bound in the ChIP-Seq.
}
\description{
GR2tfbs_db generates a TFBS-gene binding database
through the association of ChIP-Seq peak coordinates (provided
as a GenomicRange object) to overlapping genes or gene-associated
Dnase regions (Ref.db).
}
\examples{
data('DnaseHS_db','gr.list', package='TFEA.ChIP')
GR2tfbs_db(DnaseHS_db, gr.list)
}
