motifGrob: Motif Grob

Description Usage Arguments Value Author(s) Examples

View source: R/plotMotifLogo.R

Description

This function create a motif grob.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
motifGrob(
  pfm,
  x = unit(0.5, "npc"),
  y = unit(0.5, "npc"),
  width = unit(1, "npc"),
  height = unit(1, "npc"),
  angle = 0,
  ic.scale = TRUE,
  default.units = "native",
  name = NULL,
  gp = gpar(fontfamily = "Helvetica-Bold", fontface = "bold")
)

Arguments

pfm

an object of pfm

x

A numeric vector or unit object specifying x-values.

y

A numeric vector or unit object specifying y-values.

width

A numeric vector or unit object specifying width.

height

A numeric vector or unit object specifying height.

angle

A numeric value indicating the angle of rotation of the motif. Positive values indicate the amount of rotation, in degrees, anticlockwise from the positive x-axis.

ic.scale

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

default.units

A string indicating the default units to use if x, y, width, or height are only given as numeric vectors.

name

A character value to uniquely identify the motifGrob once it has been pushed onto the grob tree.

gp

A gpar object, typically the output from a call to the function gpar. The list will be used as parameter of plotMotifLogoA.

Value

An gTree object.

Author(s)

Jianhong Ou

Examples

1
2
3
4
5
pcm<-matrix(runif(40,0,100),nrow=4,ncol=10)
pfm<-pcm2pfm(pcm)
rownames(pfm)<-c("A","C","G","T")
motif <- new("pfm", mat=pfm, name="bin_SOLEXA")
motifGrob(motif)

motifStack documentation built on Nov. 8, 2020, 7:43 p.m.