Show Copy Number Sequence Logos

show_seq_logo(
  x,
  method = c("prob", "bits"),
  simple_version = FALSE,
  ncol = NULL,
  nrow = NULL,
  recode = FALSE,
  indicator = NULL,
  ...
)

Arguments

x

a character vector of sequences or named list of sequences. All sequences must have same width.

method

Height method, can be one of "bits" or "probability" (default: "bits")

simple_version

if TRUE, just use segmental copy number value.

ncol

Number of columns, works only when facet='wrap', see facet_wrap

nrow

Number of rows, same as ncol

recode

if TRUE, it will use default indicator or specified indicator to show the letters in the plot

indicator

a named vector (like a dictory) to change letters one to one in the plot.

...

Additional arguments passed to geom_logo

Value

a ggplot object

Examples

p1 <- show_seq_logo(sapply(split(LETTERS[1:24], 1:4), function(x) paste0(x, collapse = "")))
p1
p2 <- show_seq_logo(sapply(split(LETTERS[1:24], 1:4), function(x) paste0(x, collapse = "")),
  recode = TRUE
)
p2
p3 <- show_seq_logo(sapply(split(LETTERS[1:6], 1:2), function(x) paste0(x, collapse = "")),
  simple_version = TRUE
)