Description Usage Arguments Details Value
This function plots a HiC plot. The function uses global variables provided default by the pileup.r script.
1 | HiC.Plot(plotData, plotTitle, arrowYes = 0, offsetf = 1)
|
plotData |
Data input in a matrix format. |
plotTitle |
Title of the plot. |
ArrowYes |
Boolean, 1 = arrows at CHiP peaks, 0 = No arrows. |
HiC.Plot <- function(plotData,plotTitle,arrowYes=0,offsetf=1) {
palette(paste0(colfunc(r*log2(maxC)),"FF"))
plot(1,1,xlim=c(-zoomC1,zoomC1), ylim=c(-zoomC*(0.5*mirrorPlot),minY*1.5),
ylab=yAxisTitle,xlab=xAxisTitle,yaxt="n",xaxt="n",yaxs="i",xaxs ="i") # added *2 to fit inverted plot
axis(2, at = ylabel,labels = y2label, las = 2)
axis(1, at = xlabel,labels = xlabel, las = 1)
points(((plotData$V1-0.5)*resKB+(plotData$V2-plotData$V1+offsetf)*resKB*offset)-zoomC,
((plotData$V2)*resKB-(plotData$V1)*resKB)-zoomC,
pch=18,
cex=sz,col=r*log2(plotData$V3))
title(main=plotTitle,line = -plotTitleOffset)
if(arrowYes == 1){
arrows(minarrowmax,arrowposx,minarrowmin,arrowposx,col="black",lwd=1,length=.025,code = 3)
arrows(maxarrowmin,arrowposx,maxarrowmax,arrowposx,col="black",lwd=1,length=.025,code = 3)
}
}
A HiC plot.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.