SquareView {MAGeCKFlute} | R Documentation

## Scatter plot of 9-Square

### Description

Plot a scatter plot with Control beta score as x-axis and Treatment beta score as y-axis, and colored treatment related genes.

### Usage

    SquareView(beta, ctrlname = "Control", treatname = "Treatment",
      label = 0, label.top = TRUE, top = 5, genelist = c(),
      x_cutoff = NULL, y_cutoff = NULL, intercept = NULL,
      groups = c("midleft", "topcenter", "midright", "bottomcenter"),
      groupnames = paste0("Group", 1:length(groups)), main = NULL,
      filename = NULL, width = 6, height = 4, ...)

### Arguments

`beta` | Data frame, including columns of ctrlname and treatname, with Gene Symbol as rowname.
`ctrlname` | A character, specifying the names of control samples.
`treatname` | A character, specifying the name of treatment samples.
`label` | An integer or a character specifying the column used as the label, default value is 0 (row names).
`label.top` | Boolean, whether label the top selected genes, default label the top 10 genes in each group.
`top` | Integer, specifying the number of top selected genes to be labeled. Default is 5.
`genelist` | Character vector, specifying labeled genes.
`x_cutoff` | An one or two-length numeric vector, specifying the cutoff used for x-axis.
`y_cutoff` | An one or two-length numeric vector, specifying the cutoff used for y-axis.
`intercept` | An one or two-length numeric vector, specifying the intercept of diagonal.
`groups` | A character vector, specifying which group to be colored. Optional groups include "topleft", "topcenter", "topright", "midleft", "midright", "bottomleft", "bottomcenter", "bottomright".
`groupnames` | A character vector, specifying group names.
`main` | As in 'plot'.
`filename` | Figure file name to create on disk. Default filename="NULL", which means don't save the figure on disk.
`width` | As in ggsave.
`height` | As in ggsave.
`...` | Other available parameters in function 'ggsave'.

### Value

An object created by `ggplot`, which can be assigned and further customized.

### Author(s)

Wubing Zhang

### See Also

`ScatterView`

### Examples

    data(mle.gene_summary)
    # Read beta score from gene summary table in MAGeCK MLE results
    dd = ReadBeta(mle.gene_summary)
    SquareView(dd, ctrlname = "dmso", treatname = "plx", label = "Gene")

[Package MAGeCKFlute version 1.4.3 Index]