% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summarize.R
\name{summarize}
\alias{summarize}
\title{Summarize Data}
\usage{
summarize(gr1, gr2, value1, value2, cutoff1 = 10, cutoff2 = 60)
}
\arguments{
\item{gr1}{A GenomicRanges object to be compared}

\item{gr2}{A GenomicRanges object to be compared}

\item{value1}{The value of gr1 to be compared}

\item{value2}{The value of gr2 be compared}

\item{cutoff1}{The first cutoff value for the number of reads (default:10)}

\item{cutoff2}{The second cutoff value for the number of reads (default:60)}
}
\value{
A data frame containing a summary of the GenomicRanges object
}
\description{
Summarizes pdr, epipolymorphism, and shannon values over the annotation regions
}
\examples{
p1.GR<-GRanges(seqnames = Rle(c("chr22"), c(5)),
ranges = IRanges(c(327,821,838,755,761), end = c(364,849,858,773,781)),
strand = Rle(strand(c("-", "+", "+", "+", "-"))),
values.loci = c("327:350:361:364","821:837:844:849",
"838:845:850:858","755:761:771:773","761:771:773:781"),
values.read1 = c(92,72,68,176,176),values.meth1=c(84,93,94,96,95),
values.shannon=c(0.4,0.5,0.5,0.2,0.5),values.pdr=c(0.6,0.25,0.23,0.15,0.17),
values.epipoly=c(0.48,0.42,0.38,0.27,0.3))

p2.GR<-GRanges(seqnames = Rle(c("chr22"), c(5)),
ranges = IRanges(c(327,821,838,755,761), end = c(364,849,858,773,781)),
strand = Rle(strand(c("-", "+", "+", "+", "-"))),
values.loci = c("327:350:361:364","821:837:844:849",
"838:845:850:858","755:761:771:773","761:771:773:781"),
values.read1 = c(107,102,102,76,76),values.meth1=c(88,66,69,71,94),
values.shannon=c(0.12,0.25,0.54,0.23,0.25),
values.pdr=c(0.38,1,0.97,1,0.13),
values.epipoly=c(0.57,0.42,0.28,0.18,0.23))

GR.List<-list(p1=p1.GR,p2=p2.GR)
summary <- summarize(gr1 = GR.List[[1]], gr2 = GR.List[[2]],
value1 = 'pdr', value2 = 'epipoly',
cutoff1 = 10, cutoff2 = 60)
}