ggseqlogo (version 0.1)

ggseqlogo: Quick sequence logo plot

Description

ggseqlogo is a shortcut for generating sequence logos. It adds the ggseqlogo theme theme_logo by default, and facets when multiple input data are provided. It serves as a convenient wrapper, so to customise logos beyond the defaults here, please use geom_logo.

Usage

ggseqlogo(data, facet = "wrap", scales = "free_x", ncol = NULL,
  nrow = NULL, ...)

Arguments

data

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

facet

Facet type, can be 'wrap' or 'grid'

scales

Facet scales, see facet_wrap

ncol

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

nrow

Number of rows, same as ncol

...

Additional arguments passed to geom_logo

Examples

Run this code
# NOT RUN {
# Load sample data
data(ggseqlogo_sample)

# Plot a single DNA sequence logo
p1 = ggseqlogo( seqs_dna[[1]] )
print(p1)

# Plot multiple sequence logos at once
p2 = ggseqlogo( seqs_dna )
print(p2)
# }

Run the code above in your browser using DataCamp Workspace