gcap.dotplot: Plot CN Mean vs. Frequency Dotplot

View source: R/dotplot.R

gcap.dotplotR Documentation

Plot CN Mean vs. Frequency Dotplot

Description

Plot CN Mean vs. Frequency Dotplot

Usage

gcap.dotplot(
  fCNA,
  filter,
  by = c("gene_id", "band", "chr"),
  unique = FALSE,
  include = c("circular"),
  ...
)

Arguments

fCNA

a fCNA object.

filter

a filter expression based on cn (CN mean) and N (frequency) to add text labels.

by

the level of focal amplicons.

unique

if TRUE, count samples instead of genes.

include

amplicon type to include for plotting.

...

other parameters passing to ggrepel::geom_label_repel().

Value

a ggplot.

Examples


library(gcap)
if (require("ggrepel") && require("cowplot")) {
  data("ascn")
  data = ascn

  # Create fake data
  set.seed(1234)
  data$sample = sample(LETTERS[1:10], nrow(data), replace = TRUE)
  rv = gcap.ASCNworkflow(data, outdir = tempdir(), model = "XGB11")

  p = gcap.dotplot(rv, filter = cn > 60)
  p
  p2 = gcap.dotplot(rv, filter = cn > 60 | N > 15, by = "band")
  p2
  p3 = gcap.dotplot(rv, filter = cn > 60 | N > 50, by = "chr")
  p3
  p4 = gcap.dotplot(rv, filter = cn > 60 | N > 3, by = "band", unique = TRUE)
  p4
}


ShixiangWang/gcaputils documentation built on Feb. 14, 2023, 5:58 a.m.