codon_usage_plot: Plot codon_usage

codon_usage_plotR Documentation

Plot codon_usage

Description

Plot codon_usage

Usage

codon_usage_plot(
  res,
  score_column = res$relative_to_max_score,
  ylab = "Ribo-seq library",
  legend.position = "none",
  limit = c(0, max(score_column)),
  midpoint = limit/2,
  monospace_font = TRUE
)

Arguments

res

a data.table of output from a codon_usage function

score_column

numeric, default: res$relative_to_max_score. Which parameter to use as score column.

ylab

character vector, names for libraries to show on Y axis

legend.position

character, default "none", do not display legend.

limit

numeric, 2 values for plot color limits. Default: c(0, max(score_column))

midpoint

numeric, default: limit/2. midpoint of color limit.

monospace_font

logical, default TRUE. Use monospace font, this does not work on systems (require specific font packages), set to FALSE if it crashes for you.

Value

a ggplot object

See Also

Other codon: codon_usage(), codon_usage_exp()

Examples

df <- ORFik.template.experiment()[9:10,] # Subset to 2 Ribo-seq libs
## For multiple libs
res2 <- codon_usage_exp(df, outputLibs(df, type = "pshifted", output.mode = "list"),
                 min_counts_cds_filter = 10)
# codon_usage_plot(res2, monospace_font = TRUE) # This gives check error
codon_usage_plot(res2, monospace_font = FALSE) # monospace font looks better

Roleren/ORFik documentation built on Dec. 18, 2024, 11:39 p.m.