% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/exportResults.R
\name{exportResults-methods}
\alias{exportResults-methods}
\alias{exportResults,SummarizedExomePeak-method}
\alias{exportResults}
\title{Method exportResults}
\usage{
exportResults(
  sep,
  format = c("CSV", "BED", "RDS"),
  table_style = c("bed", "granges"),
  save_dir = "exomepeaks_result",
  cut_off_pvalue = NULL,
  cut_off_padj = 0.1,
  cut_off_log2FC = 0,
  min_num_of_positive = 30,
  expected_direction = c("both", "hyper", "hypo"),
  inhibit_filter = FALSE,
  reads_count = TRUE,
  GC_sizeFactors = TRUE
)

\S4method{exportResults}{SummarizedExomePeak}(
  sep,
  format = c("CSV", "BED", "RDS"),
  table_style = c("bed", "granges"),
  save_dir = "exomePeak2_output",
  cut_off_pvalue = NULL,
  cut_off_padj = 0.1,
  cut_off_log2FC = 0,
  min_num_of_positive = 100,
  expected_direction = c("both", "hyper", "hypo"),
  inhibit_filter = FALSE,
  reads_count = TRUE,
  GC_sizeFactors = TRUE
)
}
\arguments{
\item{sep}{a \code{\link{SummarizedExomePeak}} object.}

\item{format}{a \code{character} for the exported format, could be a vector that contains \code{c("CSV", "BED", "RDS")}.

\describe{
 \item{\strong{\code{CSV}}}{
 export a comma separated values (CSV) table with the genomic location and LFC statistics.
 }

 \item{\strong{\code{BED}}}{
 export a BEDGraph file with the score column = -log2(adjusted p value).
 }

 \item{\strong{\code{RDS}}}{
 export the RDS file of the \code{\link{SummarizedExperiment}} object.
 }
}}

\item{table_style}{a \code{character} for the style of the CSV table being exported, could be one in \code{c("bed","granges")}.

\describe{
 \item{\strong{\code{bed}}}{
 the genomic locations in the table are represented by BEDgraph style.
 }

 \item{\strong{\code{granges}}}{
 the genomic locations in the table are represented by GRanges style.
 }
}}

\item{save_dir}{a \code{character} for the name of the directory being saved; Default \code{= "exomePeak2_output"}.}

\item{cut_off_pvalue}{a \code{numeric} value for the p value cutoff in the exported result; Default \code{= NULL}.}

\item{cut_off_padj}{a \code{numeric} value for the adjusted p value cutoff in the exported result; Default \code{= 0.05}.}

\item{cut_off_log2FC}{a \code{numeric} value for the log2 fold change cutoff of the exported result,
only the sites with abs(LFC) larger than this value are kept; Default \code{= 0}.}

\item{min_num_of_positive}{a \code{numeric} value for the minimum number of reported sites.
If the number of remaining sites is less than this number after filtering, additional sites will be reported by the increasing order of the p value to meet this number.}

\item{expected_direction}{a \code{character} for the expected differential modification direction, could be one in \code{c("hyper", "hypo", "both")}.

\describe{
 \item{\strong{\code{hyper}}}{
 only report the peaks/sites with interactive LFC > 0.
 }

 \item{\strong{\code{hypo}}}{
 only report the peaks/sites with interactive LFC < 0.
 }

 \item{\strong{\code{both}}}{
 report the peaks/sites in both directions.
 }
}

This argument is useful when the treated group involves the perturbation of a known writer or eraser protein; Default "both".}

\item{inhibit_filter}{a \code{logical} of whether to remove all the filters, this option is useful when quantification on single based site annotation; Default \code{= FALSE}.}

\item{reads_count}{a \code{logical} of whether to export the reads count for each sample; Default \code{ = TRUE}.}

\item{GC_sizeFactors}{a \code{logical} of whether to export the GC content correction size factors; Default \code{ = TRUE}.}
}
\value{
none, a folder will be saved on the disk.
}
\description{
Method exportResults

Export the (Differential) Modification Peaks/Sites and their associated Statistics
}
\examples{

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

sep <- readRDS(f1)

### Save the modification peaks/sites statistics on the current directory.
exportResults(sep)

}
