motifDistance: Clustering PWMs Computation

Description Usage Arguments Details Author(s) Examples

Description

Set of functions to perfom clustering of PWMs.

Usage

1
2
3
	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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
#####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)

alyst/MotIV documentation built on May 12, 2019, 2:33 a.m.