plotMotifLogoStackWithTree {motifStack} | R Documentation

## plot sequence logos stack with hierarchical cluster tree

### Description

plot sequence logos stack with hierarchical cluster tree

### Usage

    plotMotifLogoStackWithTree(pfms, hc, treewidth=1/8, trueDist=FALSE, ...)

### Arguments

`pfms` | a list of position frequency matrices, pfms must be a list of class pfm
`hc` | an object of the type produced by stats::hclust
`treewidth` | the width to show tree
`trueDist` | logical flags to use hclust height or not.
`...` | other parameters can be passed to plotMotifLogo function

### Value

none

### Examples

      #####Input#####
      pcms<-readPCM(file.path(find.package("motifStack"), "extdata"),"pcm$")
      motifs<-lapply(pcms,pcm2pfm)

      #####Clustering#####
      jaspar.scores <- MotIV::readDBScores(file.path(find.package("MotIV"),
                                     "extdata", "jaspar2010_PCC_SWU.scores"))
      d <- MotIV::motifDistances(lapply(motifs, pfm2pwm))
      hc <- MotIV::motifHclust(d, method="average")

      ##reorder the motifs for plotMotifLogoStack
      motifs<-motifs[hc$order]
      ##do alignment
      motifs<-DNAmotifAlignment(motifs)
      ##plot stacks
      plotMotifLogoStack(motifs, ncex=1.0)
      plotMotifLogoStackWithTree(motifs, hc=hc)

[Package motifStack version 1.28.0 Index]