qixnat - XNAT facade

Feature List

  1. XNAT facade API.
  2. XNAT list, transfer and delete utilities.


qixnat depends on the pyxnat module, which can in turn can be tricky to install. Furthermore, the pyxnat installation guide is itself insufficient to install pyxnat dependencies consistently in all environments. Consequently, the following installation steps must be followed to ensure a correct build:

  1. On Linux only, install the libxslt dev package. For Ubuntu or other Debian-based systems, execute:

    sudo aptitude install libxslt-dev

    For Red Hat, execute:

    sudo yum install libxslt-dev
  2. Anaconda is recommended for ensuring package and library consistency. Install Anaconda in $HOME/anaconda on your workstation according to the Anaconda Installation Instructions. Preferably, install the Anaconda Accelerate add-on as well. Note that a Anaconda Accelerate Academic User License is available.

  3. Add $HOME/anaconda/bin to your PATH, if necessary:

    export PATH=$HOME/anaconda/bin:$PATH
  4. Make an Anaconda virtual environment initialized with pip, e.g.:

    conda create --name qin pip
  5. Activate the Anaconda environment, e.g.:

    source activate qin

    As a convenience, you can initialize this environment at login by prepending Anaconda and your virtual environment to PATH in your shell login script. E.g., for Linux or Mac OS X, open an editor on $HOME/.bashrc or $HOME/.bash_profile and add the following lines:

    # Prepend the Anaconda base applications.
    export PATH=$HOME/anaconda/bin:$PATH
    # Prepend the virtual environment.
    source activate qin

and refresh your environment:

. $HOME/.bash_profile
  1. Install the qixnat dependencies hosted by Anaconda:

    wget -q --no-check-certificate -O \
      - https://www.github.com/ohsu-qin/qixnat/raw/master/requirements_conda.txt \
      | xargs conda install --yes
  2. On Mac only, reinstall the lxml package using the -f force option to work around a lxml install issue:

    conda install -f lxml
  3. Install the qixnat package:

    pip install qixnat


Run the following command for the utility options:

cpxnat --help
lsxnat --help
rmxnat --help

The primary read API interface of interest is the XNAT facade class.


See the qipipe Development Guide for project download, testing and documentation.