| title | author | date | output | ||||
|---|---|---|---|---|---|---|---|
gglogo |
Eric Hare, Heike Hofmann |
July 30, 2019 |
|
R package for creating sequence logo plots
Installation
gglogo is available from CRAN (version 0.1.4):
install.packages("gglogo")The development version is available from Github (0.1.9000):
# install.packages("devtools")
devtools::install_github("heike/gglogo", build_vignettes = TRUE)Getting Started
Load the library
library(gglogo)Load a dataset
data(sequences)A first sequence logo plot
library(ggplot2)
ggplot(data = ggfortify(sequences, peptide)) +
geom_logo(aes(x = position, y = bits, group = element,
label = element, fill = interaction(Polarity, Water)),
alpha = 0.6) +
scale_fill_brewer(palette = "Paired") +
theme(legend.position = "bottom")