EnrichSquare {MAGeCKFlute} | R Documentation

## Enrichment analysis for selected treatment related genes

### Description

Do enrichment analysis for selected treatment related genes in 9-squares

### Usage

    EnrichSquare(
      beta,
      id = "Gene",
      keytype = "Symbol",
      x = "Control",
      y = "Treatment",
      pvalue = 0.05,
      enrich_method = "ORT",
      organism = "hsa",
      limit = c(1, 120),
      filename = NULL,
      out.dir = ".",
      width = 6.5,
      height = 4,
      verbose = TRUE,
      ...
    )

### Arguments

`beta` | Data frame, with columns of "Gene", "group", and "Diff".
`id` | A character, indicating the gene column in the data.
`keytype` | A character, "Symbol" or "Entrez".
`x` | A character, indicating the x-axis in the 9-square scatter plot.
`y` | A character, indicating the y-axis in the 9-square scatter plot.
`pvalue` | Pvalue cutoff.
`enrich_method` | One of "ORT"(Over-Representing Test) and "HGT"(HyperGemetric test).
`organism` | "hsa" or "mmu".
`limit` | A two-length vector (default: c(1, 120)), specifying the min and max size of pathways for enrichent analysis.
`filename` | Suffix of output file name. NULL(default) means no output.
`out.dir` | Path to save plot to (combined with filename).
`width` | As in ggsave.
`height` | As in ggsave.
`verbose` | Boolean.
`...` | Other available parameters in ggsave.

### Value

A list containing enrichment results for each group genes. Each item in the returned list has two sub items:

`gridPlot` | an object created by `ggplot`, which can be assigned and further customized.
`enrichRes` | a enrichResult instance.

### Author(s)

Wubing Zhang

[Package MAGeCKFlute version 1.8.0 Index]