SquareView: Scatter plot of 9-Square

Description Usage Arguments Value Author(s) See Also Examples

View source: R/SquareView.R

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
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

1
2
3
4
file3 = file.path(system.file("extdata", package = "MAGeCKFlute"),
"testdata/mle.gene_summary.txt")
dd = ReadBeta(file3)
SquareView(dd, ctrlname = "dmso", treatname = "plx", label = "Gene")

MAGeCKFlute documentation built on Nov. 8, 2020, 5:40 p.m.