Description Usage Arguments Value Examples
browse motifs in a web browser
1 2 3 4 5 6 7 8 9 10 11 12 13 |
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 |
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.