Installation

Basic installation (on a local machine)

  1. Install anaconda3

  2. Create enviornment

conda create --name <env_name>
  1. Activate environment

source activate <env_name>
  1. Install required conda packages

conda install pip pandas scipy
  1. Install PCNtoolkit (plus dependencies)

pip install pcntoolkit

Alternative installation (on a shared resource)

  1. Make sure conda is available on the system. Otherwise install it first from https://www.anaconda.com/

conda --version
  1. Create a conda environment in a shared location

conda create -y python==3.7.7 numpy mkl blas --prefix=/shared/conda/<env_name>
  1. Activate the conda environment

conda activate /shared/conda/<env_name>
  1. Install other dependencies

conda install -y pandas scipy
  1. Install pip dependencies

pip --no-cache-dir install nibabel sklearn torch glob3
  1. Clone the repo

git clone https://github.com/amarquand/PCNtoolkit.git
  1. Install in the conda environment

cd PCNtoolkit/
python3 setup.py install
  1. Test

python -c "import pcntoolkit as pk;print(pk.__file__)"

Quickstart usage

For normative modelling, functionality is handled by the normative.py script, which can be run from the command line, e.g.

python normative.py -c /path/to/training/covariates -t /path/to/test/covariates -r /path/to/test/response/variables /path/to/my/training/response/variables