% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/plotReadsGC.R
\name{plotReadsGC-methods}
\alias{plotReadsGC-methods}
\alias{plotReadsGC,SummarizedExomePeak-method}
\alias{plotReadsGC}
\title{Method plotReadsGC}
\usage{
plotReadsGC(
  sep,
  bsgenome = NULL,
  txdb = NULL,
  save_pdf_prefix = NULL,
  fragment_length = 100,
  binding_length = 25,
  effective_GC = FALSE,
  pool_replicates = FALSE,
  save_dir = "."
)

\S4method{plotReadsGC}{SummarizedExomePeak}(
  sep,
  bsgenome = NULL,
  txdb = NULL,
  save_pdf_prefix = NULL,
  fragment_length = 100,
  binding_length = 25,
  effective_GC = FALSE,
  pool_replicates = FALSE,
  save_dir = "."
)
}
\arguments{
\item{sep}{a \code{\link{SummarizedExomePeak}} object.}

\item{bsgenome}{a \code{\link{BSgenome}} object for the genome sequence, it could be the name of the reference genome recognized by \code{\link{getBSgenome}}.}

\item{txdb}{a \code{\link{TxDb}} object for the transcript annotation, it could be the name of the reference genome recognized by \code{\link{makeTxDbFromUCSC}}.}

\item{save_pdf_prefix}{a \code{character}, if provided, a pdf file with the given name will be saved under the current directory; Default \code{= NULL}.}

\item{fragment_length}{a \code{numeric} value for the expected fragment length in the RNA-seq library; Default \code{= 100}.}

\item{binding_length}{a \code{numeric} value for the expected antibody binding length in IP samples; Default \code{= 25}.}

\item{effective_GC}{a \code{logical} value of whether to calculate the weighted GC content by the probability of reads alignment; default \code{= FALSE}.}

\item{pool_replicates}{a \code{logical} value of whether to pool the replicates in the local regression fit; default \code{= FALSE}.}

\item{save_dir}{a \code{character} for the directory to save the plot; default ".".}
}
\value{
a \code{ggplot} object
}
\description{
\code{plotReadsGC} visualizes the local regression curves between the normalized reads abundance and the local GC content.
}
\details{
The read abundances of both the control and the modification site regions are plotted,
the read counts are normalized using the following method:

\deqn{normalized feature abundance = ( ( read count / size factor) / region length ) * 500}

 By default, it will use the sequencing depth size factor defined in the \code{\link{SummarizedExomePeak}} object,
 if the sequencing depth size factor is not found, new size factors will be estimated with the default method in \code{\link{estimateSeqDepth}}.
}
\examples{

### Load the example SummarizedExomPeak object
f1 = system.file("extdata", "sep_ex_mod.rds", package="exomePeak2")

sep <- readRDS(f1)

### Visualize the linear relationships between GC content and normalized reads count
plotReadsGC(sep)

}
