codon_usage_plot | R Documentation |
Plot codon_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
)
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. |
a ggplot object
Other codon:
codon_usage()
,
codon_usage_exp()
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.