motifDistances {MotIV} | R Documentation

## Clustering PWMs Computation

### Description

Set of functions to perfom clustering of PWMs.

### Usage

    	motifDistances(inputPWM, DBscores=jaspar.scores, cc="PCC", align="SWU", top=5, go=1, ge=0.5)
    	motifHclust(x,...)
    	motifCutree(tree,k=NULL, h=NULL)

### Arguments

`inputPWM, DBscores, cc, align, top, go, ge` | Option for the PWMs distances computation. Refere to `motifMatch`.
`x,...` | Arguments to pass to the hclust function. See `hclust`.
`tree, k, h` | Arguments to pass to the cutree function. See `cutree`.

### Details

This function are made to perform motifs clustering.

The ‘motifDistances’ function computes the distances between each pair of motifs using the specified alignment.

The ‘motifHclust’ and ‘motifCutree’ functions are simple redefinition of ‘hclust’ and ‘cutree’.

### Author(s)

Eloi Mercier <emercier@chibi.ubc.ca>

### Examples

    #####Database and Scores#####
    path <- system.file(package="MotIV")
    jaspar <- readPWMfile(paste(path,"/extdata/jaspar2010.txt",sep=""))
    jaspar.scores <- readDBScores(paste(path,"/extdata/jaspar2010_PCC_SWU.scores",sep=""))

    #####Input#####
    data(FOXA1_rGADEM)
    motifs <- getPWM(gadem)
    motifs.trimed <- lapply(motifs,trimPWMedge, threshold=1)

    #####Analysis#####
    foxa1.analysis.jaspar <- motifMatch(inputPWM=motifs,align="SWU",cc="PCC",database=jaspar,DBscores=jaspar.scores,top=5)

    #####Clustering#####
    d <- motifDistances(getPWM(foxa1.analysis.jaspar))
    hc <- motifHclust(d)
    plot(hc)
    f <- motifCutree(hc, k=2)
    foxa1.combine <- combineMotifs(foxa1.analysis.jaspar, f, exact=FALSE, name=c("Group1", "Group2"), verbose=TRUE)

[Package MotIV version 1.40.0 Index]