Skip to content

ashleyzhou972/PhiMRF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhiMRF

R package for Poisson Hierarchical Markov Random Field model for analysis of spatial dependency on count data.

Hierarchical Markov Random Field model captures spatial dependency in gene expression, demonstrating regulation via the 3D genome

Naihui Zhou, Iddo Friedberg, Mark S. Kaiser

bioRxiv 2019.12.16.878371;

doi: https://doi.org/10.1101/2019.12.16.878371

Package Features

Spatial dependency for count data.

Spatial neighborhoods are represented by networks, and thus not limited to regular lattices.

Fast and parallel computation.

The MCMC process is written in C and takes advantage of BLAS and LAPACK routines. OpenMP enables parallel computation.

Large matrices friendly.

The package has special functions that handles large matrices that would otherwise crash your R.

To apply PhiMRF on gene expression and HiC data, see bioMRF.

Model Description

See Vignettes

Installation

Update: Docker image now available through Github packages!

The Docker image has all prerequisites and the PhiMRF R package already installed and ready to use.

Prerequisites

Lapacke is a C interface to LAPACK routines. To install on linux if you don't already have lapack and openblas:

sudo apt install liblapack3 
sudo apt install liblapack-dev 
sudo apt install libopenblas-base 
sudo apt install libopenblas-dev 
sudo apt install liblapacke-dev 
sudo apt install liblapack-dev

See here for instructions for Windows.

Rmath enables the use of common R functions such as rnorm() in C.

Here is a brief outline:

  1. Find your R home directory by running R.home() within R.

  2. Go to your R home directory ($R_HOME) and see if the the directory $R_HOME/src/nmath/standalone/ exists

  1. Link the Rmath library to the default path
ln -s $R_HOME/src/nmath/standalone/libRmath.so  /usr/lib/libRmath.so

Detailed installation instructions for Rmath can be found here for Linux, MacOS and Windows.

3. Check if you have the required libraries

In a command-line console, type:

ldconfig -p | grep liblapacke
ldconfig -p | grep libRmath
ldconfig -p | grep liblapack
ldconfig -p | grep libblas

Installing the package in R

Install the package in R using the devtools package.

library(devtools)
devtools::install_github("https://github.com/ashleyzhou972/PhiMRF")

About

R package for Poisson Hierarchical Markov Random Field model for analysis of spatial dependency on count data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published