This page walks through the installation of
ModelArray package and necessary dependent packages/libraries.
We’ll directly install
ModelArray from GitHub. Please notice that, this is only fully tested and supported on Linux Ubuntu system and macOS system. If you are a Windows user, you will face errors when running with more than one CPU cores (
n_cores = 2 or above). You may install a Linux subsystem or virtual machine on your Windows computer.
We will first set up the conda environment, then install some dependent packages and libraries, and finally install
We first create a conda environment
modelarray for installing the companion software
ConFixel etc. We’ll install python version 3.9:
foo@bar:~$ conda create --name modelarray python=3.9 foo@bar:~$ conda activate modelarray
ConFixel uses function
mrconvert from MRtrix, so please make sure MRtrix has been installed. It can either be installed via
conda in this conda environment we just created, or be compiled from source. See MRtrix’s webpage for more. Type
mrview in the terminal to check whether MRtrix installation is successful.
Because ModelArray works with the Hierarchical Data Format 5 (HDF5) file format, we need to make sure necessary libraries of HDF5 are installed in the system.
If you’re on Linux Ubuntu system: First, please check if
libhdf5-dev has been installed in the system:
foo@bar:~$ ldconfig -p | grep libhdf5*
If you got more than one line of outputs, congrats, you have
libhdf5-dev installed. Otherwise, please install it via:
foo@bar:~$ sudo apt-get update -y foo@bar:~$ sudo apt-get install -y libhdf5-dev
Homebrew to install:
foo@bar:~$ brew install hdf5
For details you may refer to the webpage here
# We first activate the conda environment we just created: foo@bar:~$ conda activate modelarray # Then install ConFixel: foo@bar:~$ cd ~/myProject foo@bar:myProject$ git clone https://github.com/PennLINC/ConFixel.git foo@bar:myProject$ cd ConFixel foo@bar:myProject$ pip install . # You may remove the original source code if you are an end user instead of a developer: foo@bar:myProject$ cd .. foo@bar:myProject$ rm -r ConFixel
ModelArray requires R >=4.1.2, and we currently only tests ModelArray on R 4.1.2. If you have already installed it, you can skip this step. If you don’t, you may download it from CRAN.
RStudio provides a good IDE for using R. However it’s optional to install RStudio. If you haven’t got one but want to install it, you may download it from here.
ModelArray R package’s source code is available on GitHub. To install it in R:
# First, load library "devtools": library(devtools) # if you got error, it means you don't have devtools installed, please install it by: install.packages("devtools") # Then, install ModelArray: devtools::install_github("PennLINC/ModelArray")
Now, ModelArray is ready to use:
(Optional) Other potential packages only needed for downloading demo data in
There are several potential packages only needed for downloading demo data in
vignette("walkthrough") page. You may skip this step if you will not use the demo data.
If you don’t have them, please install them first. For macOS system, you may try out
brew to install them. For Linux Ubuntu system, you may try out
sudo apt-get to install them.