motifGrob: Motif Grob

View source: R/plotMotifLogo.R

motifGrobR Documentation

Motif Grob

Description

This function create a motif grob.

Usage

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 = "sans", 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


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)


jianhong/motifStack documentation built on Jan. 31, 2024, 5:03 a.m.