The Illumina Open Source InterOp Library provides several ways to obtain the library for your system including pre-compiled binaries for select platforms as well as a procedure to build the library from the source code.
Download Binary
It is recommended to start from one of the binary distributions found under releases. Binary distributions are available for:
- Windows
- Linux
- Mac OSX
In addition to the binary archive below, there are language specific packages including:
- Wheel for Python
Note, we only distribute from GitHub currently, and not PyPi or NuGet.org. These should be compatible with most Linux Versions, Mac OSX and Windows. We support Python 3.8 to 3.12.
Binary Archive (C++, C#, Python, Java)
Python
For Pythons users, a Wheel package is available on Github Releases or PyPI:
Supported versions for binary distribution: 3.8 to 3.12.
Test the installation
If you see this error:
RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
Then upgrade numpy and try again.
Build from Source
This section describes the prerequisites for building the source, describes how to download the source and how to build the source. Carefully consider the prerequisites before trying to build from the source.
Prerequisites
The following are the minimum requirements to build the source:
The following optional features have the corresponding requirements:
- Running unit tests
- Google Test - This is automatically downloaded if not found or specified
- Wrapping the library for C#
- Wrapping the library for Python
- SWIG 3.x or later
- Python installed with the shared library (.so or .dll)
- NumPy installed
- Running C# Unit Tests:
- NUnit - NUNIT_ROOT may have to be specified
- Building the documentation
- Clone the Source Code from the Version Control Repository
Tips for Prerequisites
- CMake and SWIG will likely need to be installed from the source on Linux
- On Windows, CMake will likely need to know the location of SWIG, see Example configurations below
- When using Visual Studio, use 2015 or later.
- Use Anaconda or Miniconda version of Python (with NumPy installed)
Download the Source
If you must build from source, getting the LatestStableRelease is strongly recommended. This build is more rigorously tested and will have less stringent build requirements.
If the latest stable version does not meet your needs, then you may consider using the LatestVersion.
Clone the Latest Source
The code may be "cloned" using the git version control program as follows:
After cloning the code, you may update your code for any changes made since you lasted cloned by running the following commands:
Build the Source
The following code will work for most platforms, as summarized below:
Note, replace <install-dir> with the directory you wish to install InterOp
Step by step explanation for above summary
The user should create a directory outside of interop to build the binary, here we called it Build
. After entering the directory, the user can configure the build system with:
Note, the user can obtain a list of the available generators using (for an alternative to the default): Note, replace <install-dir> with the directory you wish to install InterOp
The default CMake generator for Windows is 32-bit. This can be changed by specifying the appropriate generator using the -G
flag:
The binary can be built in a platform independent manner with the following command:
Finally, the headers, libraries and applications can be installed into the target directory with the following command:
Finally, the headers, libraries and applications can be installed into the target directory with the following command:
Configure the Source
There are several configuration options that you may wish to consider:
Option Name | Description |
---|---|
ENABLE_BACKWARDS_COMPATIBILITY | Compile code for c++98 otherwise it compiles for c++11 |
ENABLE_DOCS | Build documentation with Doxygen |
ENABLE_SWIG | Build third-party language bindings, e.g. C# |
ENABLE_TEST | Build unit tests (depends on Boost) |
ENABLE_APPS | Build command line programs |
ENABLE_STATIC | Build static libraries instead of dynamic |
GTEST_ROOT | Optional. Location of GTest installation. If not set, then it will auto download |
CMake also has several built-in options that you may use:
Option Name | Description |
---|---|
CMAKE_BUILD_TYPE | Type of build: Debug, Release, RelWithDebInfo |
CMAKE_INSTALL_PREFIX | Directory to install InterOp |
More options can be found at: https://cmake.org/cmake/help/v3.4/manual/cmake-variables.7.html
These options should set as follows when configuring CMake
If you need to reconfigure the build, it is recommended that you delete everything in the build directory first.
The optional C# binding has the following options that may (or may not) need to be set. These need to be set if the configuration fails to find the appropriate executable or you wish to change the version of the C# compiler.
Option Name | Description |
---|---|
CSHARP_MONO_VERSION | Version of the mono compiler |
CSHARP_DOTNET_VERSION | Version of DOT NET to use (v2.0.50727, v3.5 or v4.0.30319) |
NUNIT_ROOT | Prefix of NUnit unit test library. Necessary to set only if auto download fails |
SWIG_EXECUTABLE | Location of SWIG executable |
When you build the C# DLL, you currently need to run the CMake configure and build steps twice. The first step generates the C# *.cs files and the second builds the DLL from these files.
Example configurations
Using pre-downloaded Google Test packages assuming:
- The packages have already been unarchived - The packages were placed at the same level as InterOp
Build C# binding using SWIG on Windows assuming:
- Visual Studio is installed - Using latest .NET Version 4.x - SWIG could not be found automatically, but is installed in c:\Swig
Prerequisite Installation
Certain systems (i.e. Linux) make installation very simple, the following instructions can help with installing the prerequisites on these systems.
Debian (Ubuntu)
Install CMake:
Install Mono:
Install SWIG: