===================== INSTRUCTIONS ============================== This document contains instructions for installing and using the MDM package for R. 1. Install Currently we only provide the MDM source package. Thus, it is limited to UNIX and Mac OS. In addition to the C compiler (typically included in UNIX and Mac OS), the GSL (GNU Scientific Library) should be installed on the machine since MDM requires GSL during the compilation. To install MDM, download the source package: MDM_1.0.tar.gz, start R and use the following function to install the package >install.packages(pkgs=filename,repos=NULL) where "filename" should be replaced with the corresponding file name (MDM_1.0.tar.gz) with the correct path. Alternatively, at the UNIX command line, you may type "R CMD INSTALL PACKAGE_DIRECTORY/MDM_1.0.tar.gz" where PACKAGE_DIRECTORY is the folder containing MDM_1.0.tar.gz. 2. Usage #Load the packages into R >library(MDM) #Read the details about the package >?MDM #Read the details about function MCDIST. >?MCDIST 3. Example Using the example data file: simdata #load the example dataset that is included in the package > data(simdata) #Run MCDIST to detect the true chromatin interactions #Note: The defaul setting are burnin = 10, iter = 1000 in the MDM function and it gives very similar results compared with the one using 6 million iterations in this example. However, the number of iterations should be large in practice. >n=length(simdata$count) >output=MCDIST(count=simdata$count,rmcd=simdata$mc/simdata$distance, init1=list("z"=rep(1,n),"lambda1"=rep(30.0,n),"lambda0"=rep(1.0,n),"pi"=rep(0.5,n)), init2=list("d"=0.5,"sigma2"=10.0,"r0"=5.0,"b"=1.0), proposal=list("d"=0.036,"r0"=0.015,"b"=0.054,"lambda1"=0.6,"lambda0"=1.1)) #Look at the classification results >output$result$interaction.type #Obtain the MCMC trace plots >trace.MCDIST(output) #The usage of other functions in this package is similar to the above two. Please see the related help files for their examples. ----------------------------------------------------------------- If you have any questions, please email Liang Niu at niu.13@osu.edu.