Downloading XHMM
The XHMM program and source code is currently available to download under the GPL (GNU General Public License) v3.Git repository
The XHMM Git repository contains the core C++ code in addition to various useful scripts. Specifically, the always up-to-date "development" zip file is found here.The scripts include tools for:
- Visualization of the PCA and the called CNVs
- Conversion of XHMM's .xcnv format to PLINK's .cnv format
Installing XHMM
XHMM was developed assuming compilation on Linux with gcc version 4.4. Other requirements are the pthread and lapack C libraries.[Also, to modify the command-line options, it is necessary to install Gengetopt (recommended version 2.22 or higher).]
Uncompress the xhmm zip file, where you want to install it: unzip master.zip Change to the xhmm directory: cd statgen-xhmm-* Run make to install the software (which starts by automatically compiling the included hmm++ library): make
Installing / using the XHMM R scripts
The XHMM R code is now available as an R library. There are still two options for using the scripts:Newer (preferred) option
-
Install the xhmmScripts package via one of the following methods (you only need to do this once):
- Compile it from the main XHMM source code downloaded from the Git repository above:
cd statgen-xhmm-* make R
Then, run in R:install.packages(list.files(path=".", pattern="xhmmScripts_.+\\.tar\\.gz"), repos=NULL, type="source")
- Download and install the package from CRAN using the install.packages() command in R:
install.packages("xhmmScripts")
- Download it from the xhmmScripts page at CRAN.
Then, run in R:
install.packages(list.files(path=".", pattern="xhmmScripts_.+\\.tar\\.gz"), repos=NULL, type="source")
- Compile it from the main XHMM source code downloaded from the Git repository above:
-
To use the R code, preface your R scripts with:
library(xhmmScripts)
Older option
Directly source the R code found in the downloaded source code, by running the following at the top of your R scripts:XHMM_PATH = "./" XHMM_SCRIPTS_PATH = paste(XHMM_PATH, "/sources/scripts/R_functions", sep="") source(paste(XHMM_SCRIPTS_PATH, "/sourceDir.R", sep="")) sourceDir(XHMM_SCRIPTS_PATH, trace = FALSE, recursive = TRUE) library(gplots) library(plotrix)