# oct4 and p53 data are log2 transformed and quantile-normalized intensities
# Analyze the Oct4 data (average resolution is about 280 bps)
data(oct4)
### sort oct4 data, first by chromosome then by genomic position
oct4 = oct4[order(oct4[,1],oct4[,2]),]
# calculate the enrichment measurements --- the limma t-statistics
oct4lmt = lmtstat(oct4[,5:6],oct4[,3:4])
# prepare the data used for the Ising model
oct4Y = cbind(oct4[,1],oct4lmt)
# Apply the second-order Ising model to the ChIP-chip data
oct4res=iChip2(Y=oct4Y,burnin=1000,sampling=5000,winsize=2,sdcut=2,beta=1.25)
# check the enriched regions detected by the Ising model using
# posterior probability (pp) cutoff at 0.9 or FDR cutoff at 0.01
enrichreg(pos=oct4[,1:2],enrich=oct4lmt,pp=oct4res$pp,cutoff=0.9,
method="ppcut",maxgap=500)
enrichreg(pos=oct4[,1:2],enrich=oct4lmt,pp=oct4res$pp,cutoff=0.01,
method="fdrcut",maxgap=500)
# Analyze the p53 data (average resolution is about 35 bps)
# uncommenting the following code for running
# data(p53)
# must sort the data first
# p53 = p53[order(p53[,1],p53[,2]),]
# p53lmt = lmtstat(p53[,9:14],p53[,3:8])
# p53Y = cbind(p53[,1],p53lmt)
# p53res=iChip2(Y=p53Y,burnin=1000,sampling=5000,winsize=2,sdcut=2,beta=2.5)
# enrichreg(pos=p53[,1:2],enrich=p53lmt,pp=p53res$pp,cutoff=0.9,
# method="ppcut",maxgap=500)
# enrichreg(pos=p53[,1:2],enrich=p53lmt,pp=p53res$pp,cutoff=0.01,
# method="fdrcut",maxgap=500)
Run the code above in your browser using DataLab