browseMotifs: browse motifs

Description Usage Arguments Value Examples

View source: R/browseMotifs.R

Description

browse motifs in a web browser

Usage

1
2
3
4
5
6
browseMotifs(pfms, phylog,
                      layout=c("tree", "cluster", "radialPhylog"),
                      nodeRadius=2.5, baseWidth=12, baseHeight=30,
                      xaxis=TRUE, yaxis=TRUE,
                      width=NULL, height=NULL,
                      ...)

Arguments

pfms

a list of pfm

phylog

layout type. see GraphvizLayouts

layout

layout type. Could be tree, cluster or radialPhylog.

nodeRadius

node radius, default 2.5px.

baseWidth,baseHeight

width and height of each alphabet of the motif logo.

xaxis,yaxis

plot x-axis or y-axis or not in the motifs.

width

width of the figure

height

height of the figure

...

parameters not used

Value

An object of class htmlwidget that will intelligently print itself into HTML in a variety of contexts including the R console, within R Markdown documents, and within Shiny output bindings.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library("MotifDb")
matrix.fly <- query(MotifDb, "Dmelanogaster")
motifs <- as.list(matrix.fly)
motifs <- motifs[grepl("Dmelanogaster-FlyFactorSurvey-", names(motifs), fixed=TRUE)]
names(motifs) <- gsub("Dmelanogaster_FlyFactorSurvey_", "", 
                     gsub("_FBgn[0-9]+$", "", 
                          gsub("[^a-zA-Z0-9]","_", 
                               gsub("(_[0-9]+)+$", "", names(motifs)))))
motifs <- motifs[unique(names(motifs))]
pfms <- sample(motifs, 10)
pfms <- lapply(names(pfms), function(.ele, pfms){new("pfm",mat=pfms[[.ele]], name=.ele)},pfms)
browseMotifs(pfms)

motifStack documentation built on Nov. 1, 2018, 4:27 a.m.