Last data update: 2014.03.03

R: Plot a sequence logo for a given position weight matrix
seqLogoR Documentation

Plot a sequence logo for a given position weight matrix

Description

This function takes the 4xW position weight matrix of a DNA sequence motif and plots the corresponding sequence logo.

Usage

  seqLogo(pwm, ic.scale=TRUE, xaxis=TRUE, yaxis=TRUE, xfontsize=15, yfontsize=15)

Arguments

pwm

numeric The 4xW position weight matrix.

ic.scale

logical If TRUE, the height of each column is proportional to its information content. Otherwise, all columns have the same height.

xaxis

logical If TRUE, an X-axis will be plotted.

yaxis

logical If TRUE, a Y-axis will be plotted.

xfontsize

numeric Font size to be used for the X-axis.

yfontsize

numeric Font size to be used for the Y-axis.

Details

Within each column, the height of a given letter is proportional to its frequency at that position. If ic.scale is TRUE, the height of each column in the plot indicates the information content at that position of the motif. Otherwise, the height of all columns are identical.

Value

None.

Author(s)

Oliver Bembom, bembom@berkeley.edu

Examples

mFile <- system.file("Exfiles/pwm1", package="seqLogo")
m <- read.table(mFile)
pwm <- makePWM(m)
seqLogo(pwm)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(seqLogo)
Loading required package: grid
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/seqLogo/seqLogo.Rd_%03d_medium.png", width=480, height=480)
> ### Name: seqLogo
> ### Title: Plot a sequence logo for a given position weight matrix
> ### Aliases: seqLogo
> ### Keywords: misc
> 
> ### ** Examples
> 
> mFile <- system.file("Exfiles/pwm1", package="seqLogo")
> m <- read.table(mFile)
> pwm <- makePWM(m)
> seqLogo(pwm)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>