ggfortify: Convert sequence data to a format suitable for logo plots

Description Usage Arguments Value Examples

Description

Convert sequence data to a format suitable for logo plots

Usage

1
2
ggfortify(data, sequences, treatment = NULL, weight = NULL,
  method = "shannon")

Arguments

data

data frame with the sequences

sequences

variable containing the sequences

treatment

co-variate(s) used in collecting sequence data

weight

numeric variable of weights

method

either "shannon" or "frequency" for Shannon information or relative frequency of element by position.

Value

data frame with position, element and information value

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(ggplot2)
data(sequences)

ggplot(data = ggfortify(sequences, "peptide", treatment = "class")) +
  geom_logo(aes(x = class, y = bits, fill = Water, label = element)) + 
  facet_wrap(~position)
  
ggplot(data = ggfortify(sequences, "peptide", treatment = "class")) +
  geom_logo(aes(x = class, y = bits, fill = Polarity, label = element)) + 
  facet_wrap(~position, ncol = 18) + 
  theme(legend.position = "bottom")


Search within the gglogo package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.