plot_ggseqlogo: Visualize a given (PWM) matrix as a sequence logo.

Description Usage Arguments Value See Also Examples

View source: R/plot_ggheatmap.R

Description

Visualize a given (PWM) matrix as a sequence logo.

Usage

1
2
3
4
5
6
7
8
(
  pwm_mat,
  method = "bits",
  pos_lab = NULL,
  pdf_name = NULL,
  bits_yax = "full",
  fixed_coord = FALSE
)

Arguments

pwm_mat

Matrix (usually a PWM, but can be any non-normalized matrix) to be represented as a sequence logo.

method

For ggseqlogo; either of 'custom', 'bits', or 'probability'. Default is 'bits'.

pos_lab

Labels for sequence positions, should be of same length as that of the sequences. Default value is NULL, when the positions are labeled from 1 to the length of the sequences.

pdf_name

Name of the file which will be saved as PDF.

bits_yax

Specify 'full' if the information content y-axis limits should be 0-2 or 'auto' for a suitable limit. The 'auto' setting adjusts the y-axis limits according to the maximum information content of the sequence logo. Default is 'full'.

fixed_coord

Set this to TRUE to use a fixed aspect ratio for the plot. Default is FALSE.

Value

A ggplot2 object so you can simply call print or save on it later. If pdf_name is given, it is also saved in addition to returning the ggplot object.

See Also

plot_ggheatmap for plotting PWMs as heatmaps, plot_ggseqlogo_of_seqs for visualizing a collection of sequences by their sequence logo.

Other visualization functions: plot_ggheatmap(), viz_bas_vec_heatmap_seqlogo(), viz_seqs_acgt_mat_from_seqs()

Examples

1
2
3
4
5
6
7
res <- readRDS(system.file("extdata", "example_archRresult.rds", 
         package = "archR", mustWork = TRUE))

pwm <- archR::make_dinuc_PWMs(get_clBasVec_m(res,iter=1)[,1], 
                        add_pseudo_counts = FALSE)

(pwm_mat = pwm, fixed_coord = TRUE)

snikumbh/archR documentation built on July 5, 2021, 8:46 a.m.