browseMotifs {motifStack} | R Documentation

## browse motifs

### Description

browse motifs in a web browser

### Usage

    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

    if(interactive() || Sys.getenv("USER")=="jianhongou"){
     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 <- mapply(pfms, names(pfms), FUN=function(.ele, .name){
                      new("pfm",mat=.ele, name=.name)})
     browseMotifs(pfms)
    }

[Package motifStack version 1.38.0 Index]