plotOccupancyProfile {ChIPanalyser} | R Documentation |
plotOccupancyProfile
plots the predicted profiles.
If provided, this functions will also plot ChIP-seq profiles,
PWMScores, DNAAccessibility, accuracy estimates and gene information.
plotOccupancyProfile(predictedProfile,setSequence, chipProfile = NULL,DNAAccessibility = NULL, occupancy = NULL,PWM=FALSE, occupancyProfileParameters = NULL,geneRef = NULL,axis=TRUE,...)
predictedProfile |
|
setSequence |
|
chipProfile |
|
DNAAccessibility |
|
occupancy |
|
PWM |
|
occupancyProfileParameters |
|
geneRef |
|
axis |
|
... |
Any other graphical Parameter of the following : col, density, border, lty, lwd, cex, cex.axis, xlab, ylab, xlim, ylim, las and axislables. Each Parameter will be parsed in the same order as the arguments to this function. If the name of the argument is specified, the argument value will be parsed to the correct internal plotting. See examples below |
Once the predicted ChIP-seq like profiles have been computed,
it is possible to plot these profiles. The important aspect to keep in mind
with plotOccupancyProfile
is that in only computes one profile
at a time. This means that the output of previous functions should be
subsetted carefully. This leaves to the user more flexibility in what
and how profiles should be plotted. Keep in mind that the output of
different function are more or less nested.
Returns a porfile plot with "Occupancy" on the y axis and DNA position on the the X- axis. If the orange line is the predicted profile, the grey shaded area represents real ChIP-seq data. The yellow boxes represent regions on NON-accessible DNA. On the lower part of the plot, gene information is plotted with respect to the strand they are localised on. Finally, the blue vertical lines represent sites of either high Occupancy or high PWM score depending on which had been selected. The minimal plot will only contain the predicted profile. The more data is provided the more will be plotted.
Patrick C.N. Martin <pm16057@essex.ac.uk>
Zabet NR, Adryan B (2015) Estimating binding properties of transcription factors from genome-wide binding profiles. Nucleic Acids Res., 43, 84–94.
#Data extraction data(ChIPanalyserData) # path to Position Frequency Matrix PFM <- file.path(system.file("extdata",package="ChIPanalyser"),"BCDSlx.pfm") #As an example of genome, this example will run on the Drosophila genome if(!require("BSgenome.Dmelanogaster.UCSC.dm3", character.only = TRUE)){ source("https://bioconductor.org/biocLite.R") biocLite("BSgenome.Dmelanogaster.UCSC.dm3") } library(BSgenome.Dmelanogaster.UCSC.dm3) DNASequenceSet <- getSeq(BSgenome.Dmelanogaster.UCSC.dm3) #Building data objects GPP <- genomicProfileParameters(PFM=PFM,BPFrequency=DNASequenceSet) OPP <- occupancyProfileParameters() # Computing Genome Wide GenomeWide <- computeGenomeWidePWMScore(DNASequenceSet = DNASequenceSet, genomicProfileParameters = GPP) #Compute PWM Scores PWMScores <- computePWMScore(DNASequenceSet = DNASequenceSet, genomicProfileParameters = GenomeWide, setSequence = eveLocus, DNAAccessibility = Access) #Compute Occupnacy Occupancy <- computeOccupancy(AllSitesPWMScore = PWMScores, occupancyProfileParameters = OPP) #Compute ChIP profiles chipProfile <- computeChipProfile(setSequence = eveLocus, occupancy = Occupancy, occupancyProfileParameters = OPP) #Plotting Profile plotOccupancyProfile(predictedProfile=chipProfile[[1]][[1]], setSequence=eveLocus, chipProfile = eveLocusChip[[1]], DNAAccessibility = Access, occupancy = AllSitesAboveThreshold(Occupancy)[[1]][[1]], occupancyProfileParameters = OPP, geneRef =geneRef) ## Changing graphical Parameters #### In this examples #### ### predictedProfile will be reduce ### chipProfile will be blue ### and DNAAccessibility will be green plotOccupancyProfile(predictedProfile=chipProfile[[1]][[1]], setSequence=eveLocus, chipProfile = eveLocusChip[[1]], DNAAccessibility = Access, occupancy = AllSitesAboveThreshold(Occupancy)[[1]][[1]], occupancyProfileParameters = OPP, geneRef =geneRef,col=c("red","blue","green")) ### If name is specified plotOccupancyProfile(predictedProfile=chipProfile[[1]][[1]], setSequence=eveLocus, chipProfile = eveLocusChip[[1]], DNAAccessibility = Access, occupancy = AllSitesAboveThreshold(Occupancy)[[1]][[1]], occupancyProfileParameters = OPP, geneRef =geneRef,col=c("DNAAccessibility"="red","blue","green"))