view_motifs {universalmotif}R Documentation

Plot motif logos.

Description

Show sequence logo. If given a list of more than one motif, then the motifs are aligned with the first in the list.

Usage

view_motifs(motifs, use.type = "ICM", method = "MPCC", tryRC = TRUE,
  min.overlap = 6, min.mean.ic = 0.5, relative_entropy = FALSE,
  normalise.scores = FALSE, ...)

Arguments

motifs

See convert_motifs() for acceptable motif formats.

use.type

character(1) One of c('PCM', 'PPM', 'PWM', 'ICM').

method

character(1) One of c('PCC', 'MPCC', 'EUCL', 'MEUCL', 'SW', 'MSW', 'KL', 'MKL'). See compare_motifs().

tryRC

logical(1) Check if motif reverse complement leads to a better alignment. See compare_motifs().

min.overlap

numeric(1) Minimum alignment overlap between motifs. If min.overlap < 1, this represents the minimum fraction between the two motifs during alignment. See compare_motifs().

min.mean.ic

numeric(1) Minimum information content between the two motifs for an alignment to be scored. This helps prevent scoring alignments between low information content regions of two motifs. See compare_motifs().

relative_entropy

logical(1) For ICM calculation. See convert_type().

normalise.scores

logical(1) Favour alignments which leave fewer unaligned positions. See compare_motifs().

...

Additional options for ggseqlogo::geom_logo().

Details

Since the ggseqlogo package can only plot individual characters and not strings, plotting the multifreq slot is not supported. See the examples section for plotting the multifreq slot using the Logolas package.

Value

A ggplot object.

Author(s)

Benjamin Jean-Marie Tremblay, b2tremblay@uwaterloo.ca

References

Dey KK, Xie D, Stephens M (2017). “A new sequence logo plot to highlight enrichment and depletion.” bioRxiv, p.226597.

Wagih O (2017). ggseqlogo: A 'ggplot2' Extension for Drawing Publication-Ready Sequence Logos. R package version 0.1, https://CRAN.R-project.org/package=ggseqlogo.

See Also

compare_motifs(), add_multifreq()

Examples

## plotting multifreq motifs:
## Not run: 
  motif <- create_motif()
  motif <- add_multifreq(motif, sample_sites(motif))
  Logolas::logomaker(motif["multifreq"][[as.character(2)]], type = "Logo",
                     color_type = "per_symbol")

## End(Not run)


[Package universalmotif version 1.2.0 Index]