|
|
# Access openBIS from MATLAB
|
|
|
|
|
|
## Preamble
|
|
|
openBIS is a research data management system developed by ETH SIS. Data stored in openBIS can be accessed directly via the web UI or programmatically using APIs. For example, pyBIS is a project that provides a Python 3 module for interacting with openBIS.
|
|
|
MATLAB is a high-level numerical computing environment that is popular in many areas of science. It is therefore desirable to have the possibility to access data in openBIS directly from MATLAB. This repository provides a MATLAB script that demonstrates how this can be achieved by calling the pyBIS module directly from MATLAB.
|
|
|
|
|
|
## Setup
|
|
|
#### OS X
|
|
|
On OS X, the setup has been tested with a Miniconda Python distribution.
|
|
|
1. Download and install Miniconda3 (using Python 3.6 version)
|
|
|
2. Install pyBIS with pip: `pip install pybis`
|
|
|
3. Open MATLAB and set the Python executable (modify path according to your system): `pyversion /Users/Henry/miniconda3/bin/python`
|
|
|
|
|
|
#### Windows 10
|
|
|
On Windows using the Anaconda or Miniconda approach did not work (For some reason, MATLAB could not find the Python modules). On the other hand, using the standard Python 3.6 installation worked.
|
|
|
1. Download and install Python 3.6 (from python.org)
|
|
|
2. During the installation, make sure Python is added to the Path and registered as default Python interpreter.
|
|
|
3. Open a command prompt and install pyBIS with pip: `pip install pybis`
|
|
|
3. Open MATLAB and set the Python executable: `pyversion 3.6`
|
|
|
|
|
|
#### Notes
|
|
|
- Currently only tested with Python 3.6 / MATLAB R2018a
|
|
|
|
|
|
## Usage
|
|
|
Please have a look at the script MatlabPybis_example.m for a documented example. The pyBIS documentation is available here: https://sissource.ethz.ch/sispub/pybis/blob/master/src/python/PyBis/README.md
|
|
|
|
|
|
## Outlook |