exportAsRangedData {MotIV} | R Documentation

## Export MotIV Results

### Description

Export your

### Usage

    exportAsRangedData(x, y, correction=TRUE)

### Arguments

`x` | An object of class `motiv`.
`y` | The rGADEM type object associated with the `motiv` object.
`correction` | If `TRUE`, corrects the position according to the alignment.

### Details

Use this function to export the results into a `RangedData` object.

### Value

An object of type `RangedData`.

### 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)
    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)

    #####Plots#####
    #plot(foxa1.filter.combine, ncol=2,top=5, rev=FALSE, main="FOXA1", bysim=TRUE)
    #plot(foxa1.filter.combine ,gadem,ncol=2, type="distribution", correction=TRUE, group=FALSE, bysim=TRUE, strand=FALSE, sort=TRUE, main="FOXA1")
    #plot(foxa1.filter.combine ,gadem,type="distance", correction=TRUE, group=TRUE, bysim=TRUE, main="FOXA1", strand=FALSE, method=3, xlim=c(-100,100), darg=list(bw=8))

    #####RangedData#####
    foxa1.rd <- exportAsRangedData(foxa1.filter.combine["FOXA1"], gadem)
    ap1.rd <- exportAsRangedData(foxa1.filter.combine["AP1"], gadem)

[Package MotIV version 1.40.0 Index]