Learn R Programming

sigminer (version 1.0.6)

show_cn_components: Show Copy Number Components

Description

Show mixture fit model components ("Macintyre" ("M") method) or standard classified components ("Wang" ("W") method) for copy number data.

Usage

show_cn_components(
  parameters,
  method = "Macintyre",
  show_weights = TRUE,
  log_segsize = TRUE,
  log_y = FALSE,
  auto_transform = TRUE,
  return_plotlist = FALSE,
  base_size = 12,
  nrow = 2,
  align = "hv",
  ...
)

Arguments

parameters

a data.frame contain parameter components, obtain this from sig_tally function.

method

method for feature classfication, can be one of "Macintyre" ("M") and "Wang" ("W").

show_weights

default is TRUE, show weights for each component. Only used when method is "Macintyre".

log_segsize

default is TRUE, show log10 based segsize, only works for input from "Macintyre" ("M") method.

log_y

logical, if TRUE, show log10 based y axis, only works for input from "Wang" ("W") method.

auto_transform

default is TRUE, it will auto increase the SD for components for showing them better in the plot. Only used when method is "Macintyre".

return_plotlist

if TRUE, return a list of ggplot objects but a combined plot.

base_size

overall font size.

nrow

(optional) Number of rows in the plot grid.

align

(optional) Specifies whether graphs in the grid should be horizontally ("h") or vertically ("v") aligned. Options are "none" (default), "hv" (align in both directions), "h", and "v".

...

other options pass to plot_grid function of cowplot package.

Value

a ggplot object

Examples

Run this code
# NOT RUN {
load(system.file("extdata", "toy_copynumber_tally_M.RData",
  package = "sigminer", mustWork = TRUE
))
p1 <- show_cn_components(cn_tally_M$parameters)
p1
p2 <- show_cn_components(cn_tally_M$parameters, show_weights = FALSE)
p2

load(system.file("extdata", "toy_copynumber_tally_W.RData",
  package = "sigminer", mustWork = TRUE
))
p3 <- show_cn_components(cn_tally_W$parameters, method = "W")
p3
# }

Run the code above in your browser using DataLab