exportResults-methods {exomePeak2} | R Documentation

## Method exportResults

### Description

Method exportResults

Export the (Differential) Modification Peaks/Sites and their associated Statistics

### 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
    )

    ## S4 method for signature 'SummarizedExomePeak'
    exportResults(
      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

`sep` | a `SummarizedExomePeak` object.
`format` | a `character` for the exported format, could be a vector that contains `c("CSV", "BED", "RDS")`. `CSV` export a comma separated values (CSV) table with the genomic location and LFC statistics. `BED` export a BEDGraph file with the score column = -log2(adjusted p value). `RDS` export the RDS file of the `SummarizedExperiment` object.
`table_style` | a `character` for the style of the CSV table being exported, could be one in `c("bed","granges")`. `bed` the genomic locations in the table are represented by BEDgraph style. `granges` the genomic locations in the table are represented by GRanges style.
`save_dir` | a `character` for the name of the directory being saved; Default `= "exomePeak2_output"`.
`cut_off_pvalue` | a `numeric` value for the p value cutoff in the exported result; Default `= NULL`.
`cut_off_padj` | a `numeric` value for the adjusted p value cutoff in the exported result; Default `= 0.05`.
`cut_off_log2FC` | a `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 `= 0`.
`min_num_of_positive` | a `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.
`expected_direction` | a `character` for the expected differential modification direction, could be one in `c("hyper", "hypo", "both")`. `hyper` only report the peaks/sites with interactive LFC > 0. `hypo` only report the peaks/sites with interactive LFC < 0. `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".
`inhibit_filter` | a `logical` of whether to remove all the filters, this option is useful when quantification on single based site annotation; Default `= FALSE`.
`reads_count` | a `logical` of whether to export the reads count for each sample; Default `= TRUE`.
`GC_sizeFactors` | a `logical` of whether to export the GC content correction size factors; Default `= TRUE`.

### Value

none, a folder will be saved on the disk.

### 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)

[Package exomePeak2 version 1.2.0 Index]