split: Split Motiv Object

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function splits a 'motiv' object according filters.

Usage

1
2
	## S4 method for signature 'motiv,filters'
split(x, f, exact=TRUE,drop=FALSE,verbose=TRUE,...)

Arguments

x

An object of class motiv (usualy provied by motifMatch).

f

A filter or a set of filter for motiv object.

drop

If TRUE, no match motifs will be dropped.

verbose

If FALSE, no output will be print.

exact

If TRUE, search only for perfect name match.

...

Further potential arguments passed to methods.

Details

This function is used to split motifs that correspond to the filters.

Many filter could be pass in argument separated by coma. They will be considered independently (coma is considered as OR).

Value

A list of motiv object.

Author(s)

Eloi Mercier <emercier@chibi.ubc.ca>

See Also

setFilter , filter, combine

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#####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)
summary(foxa1.analysis.jaspar )

#####Filters#####
f.foxa1<-setFilter(name="", tfname="FOXA1", top=3, evalueMax=10^-5)
f.ap1 <- setFilter (tfname="AP1", top=3)
f.foxa1.ap1 <- f.foxa1 | f.ap1 
foxa1.filter <- filter(foxa1.analysis.jaspar, f.foxa1.ap1, exact=FALSE, verbose=TRUE)
foxa1.split <- split(foxa1.analysis.jaspar, c(f.foxa1, f.ap1) , drop=FALSE, exact=FALSE, verbose=TRUE)
foxa1.filter.combine <- combineMotifs(foxa1.filter, c(f.foxa1, f.ap1), exact=FALSE, name=c("FOXA1", "AP1"), verbose=TRUE)

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