Learn R Programming

ChIPpeakAnno (version 3.6.5)

preparePool: 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.

See Also

peakPermTest, bindist

Examples

Run this code
    if(interactive()){
        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")
    }

Run the code above in your browser using DataLab