Description Usage Arguments Value Methods Examples
stdPeakLocation
plots the density of peaks with respect to the
genomic feature (e.g. gene) in
standardized gene coordinates so that genes with different lengths are
comparable.
PeakLocation
produces the same plot in non-standardized coordinates (i.e. distances
are measured in base pairs).
plotMeanCoverage
plots the mean coverage in a series of selected
genomic regions.
1 2 3 4 5 6 7 8 9 10 11 | stdPeakLocation(x, peakDistance=1000, startpos='start_position', endpos='end_position',
strand='strand', distance, main='', xlab='Distance relative to feature length', xaxt='n',
xlim=c(-1,2), densityType="kernel", nbreaks=10, ...)
PeakLocation(x, peakDistance=1000, startpos='start_position', endpos='end_position',
strand='strand', distance, main='', xlab='Distance (bp)',
densityType="kernel", breaks, ...)
plotMeanCoverage(cover, x, upstreambp=1000, downstreambp=5000,
startpos='start_position', endpos='end_position', normalize=FALSE,
smooth=FALSE, span=0.05, main='', xlab='(bp)', ylab='Average coverage', ...)
|
x |
A |
cover |
An |
peakDistance |
Peaks more than |
startpos |
Name of the variable storing the start position of the closest genomic feature. |
endpos |
Name of the variable storing the end position of the closest genomic feature. |
strand |
Name of the variable storing the strand for the closest genomic feature. |
distance |
Name of the variable indicating the distance between the peak and the closest genomic feature. If left missing the distance between the feature start and the mid-point of the peak is computed. |
main |
Graphical parameter passed on to |
xlab |
Graphical parameter passed on to |
ylab |
Graphical parameter passed on to |
xaxt |
Graphical parameter passed on to |
xlim |
In |
densityType |
If we eant a density plot or a histogram. Has to be one of "kernel" (for the density plot) or "hist" for the histogram. |
nbreaks |
Number of breaks to be used. It will not be used if
|
breaks |
This parameter will be passed to the |
upstreambp |
Number of bp upstream of the TSS where the coverage should be computed |
downstreambp |
Number of bp downstream of the TSS where the coverage should be computed |
normalize |
When set to |
smooth |
If set to |
span |
Parameter controlling smoothing, passed on to
|
... |
Further parameters passed on to |
This function produces a density plot.
Methods for stdPeakLocation
, PeakLocation
signature(x = "data.frame")
The data frame should contain
columns named start
and end
indicating the peak location,
txStart
, txEnd
indicating transcription start/end of the
closest gene and strand
indicating the strand.
signature(x = "RangedData")
start(x)
and
end(x)
indicate the peak location. x
should contain
variables x[['txStart']]
, x[['txEnd']]
indicating the
transcription start/end of the closest gene and
x[['strand']]
indicating the strand.
Methods for plotMeanCoverage
signature(cover="RleList", x="RangedData")
cover
contains the coverage and x
the genomic regions of interest.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #Generate synthetic peaks
set.seed(1)
st <- runif(100,1,1000)
en <- st+runif(length(st),25,100)
peaks <- RangedData(IRanges(st,en),space='chr1')
#Assign distance to closest gene
#(typically one would call annotatePeakInBatch
#from package ChIPpeakAnno to do this)
peaks[['start_position']] <- start(peaks) + runif(nrow(peaks),-500,1000)
peaks[['end_position']] <- peaks[['start_position']] + 500
peaks[['distance']] <- peaks[['start_position']] - start(peaks)
peaks[['strand']] <- sample(c('+','-'),nrow(peaks),replace=TRUE)
PeakLocation(peaks,peakDistance=1000)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.