ChIPpeakAnno (version 3.4.0)

peaksNearBDP: obtain the peaks near bi-directional promoters

Description

Obtain the peaks near bi-directional promoters. Also output percent of peaks near bi-directional promoters.

Usage

peaksNearBDP(myPeakList, mart,AnnotationData, MaxDistance=5000, PeakLocForDistance = c("start", "middle", "end"), FeatureLocForDistance = c("TSS", "middle", "start", "end","geneEnd"))

Arguments

myPeakList
GRanges or RangedData: See example below
mart
used if AnnotationData not supplied, a mart object, see useMart of bioMaRt package for details
AnnotationData
annotation data obtained from getAnnotation or customized annotation of class GRanges or annoGR containing additional variable: strand (1 or + for plus strand and -1 or - for minus strand). For example, data(TSS.human.NCBI36), data(TSS.mouse.NCBIM37), data(TSS.rat.RGSC3.4) and data(TSS.zebrafish.Zv8) . If not supplied, then annotation will be obtained from biomaRt automatically using the parameters of mart and featureType TSS
MaxDistance
Specify the maximum gap allowed between the peak and nearest gene
PeakLocForDistance
Specify the location of peak for calculating distance,i.e., middle means using middle of the peak to calculate distance to feature, start means using start of the peak to calculate the distance to feature. To be compatible with previous version, by default using start
FeatureLocForDistance
Specify the location of feature for calculating distance,i.e., middle means using middle of the feature to calculate distance of peak to feature, start means using start of the feature to calculate the distance to feature, TSS means using start of feature when feature is on plus strand and using end of feature when feature is on minus strand, geneEnd means using end of feature when feature is on plus strand and using start of feature when feature is on minus strand. To be compatible with previous version, by default using TSS

Value

A list of 4
peaksWithBDP
annotated Peaks containing bi-directional promoters.RangedData with slot start holding the start position of the peak, slot end holding the end position of the peak, slot space holding the chromosome location where the peak is located, slot rownames holding the id of the peak. In addition, the following variables are included.feature: id of the feature such as ensembl gene IDinsideFeature: upstream: peak resides upstream of the feature; downstream: peak resides downstream of the feature; inside: peak resides inside the feature; overlapStart: peak overlaps with the start of the feature; overlapEnd: peak overlaps with the end of the feature; includeFeature: peak include the feature entirely.distancetoFeature: distance to the nearest feature such as transcription start site. By default, the distance is calculated as the distance between the start of the binding site and the TSS that is the gene start for genes located on the forward strand and the gene end for genes located on the reverse strand. The user can specify the location of peak and location of feature for calculating thisstart_position: start position of the feature such as geneend_position: end position of the feature such as the genestrand: 1 or + for positive strand and -1 or - for negative strand where the feature is locatedshortestDistance: The shortest distance from either end of peak to either end the featurefromOverlappingOrNearest: NearestStart: indicates this PeakLocForDistance is closest to the FeatureLocForDistance
percentPeaksWithBDP
The percent of input peaks containing bi-directional promoters
n.peaks
The total number of input peaks
n.peaksWithBDP
The # of input peaks containing bi-directional promoters

References

Zhu L.J. et al. (2010) ChIPpeakAnno: a Bioconductor package to annotate ChIP-seq and ChIP-chip data. BMC Bioinformatics 2010, 11:237doi:10.1186/1471-2105-11-237

See Also

annotatePeakInBatch, findOverlappingPeaks, makeVennDiagram

Examples

Run this code

if (interactive())
{
    data(myPeakList)
    data(TSS.human.NCBI36)
    annotatedBDP = peaksNearBDP(myPeakList[1:6,], 
                                AnnotationData=TSS.human.NCBI36,
                                MaxDistance=5000,
                                PeakLocForDistance =  "middle", 
                                FeatureLocForDistance = "TSS")
    c(annotatedBDP$percentPeaksWithBDP, annotatedBDP$n.peaks, 
      annotatedBDP$n.peaksWithBDP)
}

Run the code above in your browser using DataCamp Workspace