preparePool {ChIPpeakAnno} | R Documentation

## prepare data for permutation test

### Description

prepare data for permutation test peakPermTest

### Usage

    preparePool(TxDb, template, bindingDistribution,
                bindingType = c("TSS", "geneEnd"),
                featureType = c("transcript", "exon"),
                seqn = NA)

### Arguments

`TxDb` | an object of TxDb
`template` | an object of GRanges
`bindingDistribution` | an object of bindist
`bindingType` | the relevant position to features
`featureType` | feature type, transcript or exon.
`seqn` | seqnames. If given, the pool for permutation will be restrict in the given chromosomes.

### Value

a list with two elements, grs, a list of GRanges. N, the numbers of elements should be drawn from in each GRanges.

### Author(s)

Jianhong Ou

### See Also

peakPermTest, bindist

### Examples

        if(Sys.getenv("USER")=="jianhongou"){
            path <- system.file("extdata", package="ChIPpeakAnno")
            peaksA <- toGRanges(file.path(path, "peaks.narrowPeak"),
                                format="narrowPeak")
            peaksB <- toGRanges(file.path(path, "MACS2_peaks.xls"), format="MACS2")
            library(TxDb.Hsapiens.UCSC.hg19.knownGene)
            ppp <- preparePool(TxDb.Hsapiens.UCSC.hg19.knownGene,
                               peaksA, bindingType="TSS",
                               featureType="transcript")
        }

[Package ChIPpeakAnno version 3.14.2 Index]