From BioLib
Jump to: navigation, search

BioLib brings together a set of opensource C/C++ libraries and makes them available to all Bio* languages: BioPerl, BioRuby, BioPython, BioJAVA and Bioconductor.

Biolib was involved with the 2009 Google Summer of Code (GSoC) in collaboration with our friends at NESCent, and had two projects funded:

  • Pjotr Prins worked with student Adam A. Smith on mapping Bio++ to Biolib
  • Chris Fields worked with student Xin Shuai on mapping the libsequence library to Biolib.

In 2010 we hope to be continue working with GSoC. If you are interested in contributing as a mentor or student, please introduce yourself on the Biolib mailing list. For the Blogs of former students see and

Please read the GSoC page at the Open Bioinformatics Foundation and the main Google Summer of Code page for more details about the program.

2010 Project ideas

Mapping JAVA libraries to Perl/Ruby/Python using Biolib+SWIG+JNI


Biolib provides the infrastructure to map existing C/C++ libraries to Perl/Ruby/Python, with R and JAVA planned for. Using this approach thousands of C functions have been mapped to these interpreted languages, which is a valuable addition to any bioinformatician's toolkit. Currently we are working on generated documentation (from SWIG and Doxygen) as well as adding tested multi-platform support (Linux, OS/X and Windows). We recognize there is an *exciting* possibility to access JAVA libraries through the JNI. One example is described here. This means we can access JAVA libraries from Perl/Ruby/Python when a C JNI interface is written and this, in turn, is mapped using SWIG. It may even be possible to write the JNI mapping directly using SWIG macro's, which would take away the need of writing a JNI interface.


Take a useful existing JAVA library with some advanced features, like BioJAVA, and create a proof of concept mapping using the JNI and a C interface. Next try to recreate the C interface using SWIG macros.


Biolib makes heavy use of SWIG, for mapping, and CMake, for the build system. These tools have to be well mastered to make the project a success. Writing SWIG macros is hard, but providing a JNI mapping has impact beyond bioinformatics and may well be taken up by the SWIG project.

Involved toolkits or projects

Biolib, an open source JAVA library like BioJAVA, SWIG and CMake

Degree of difficulty and needed skills

Hard. A good understanding of both C and JAVA are required. SWIG requires handling the C stack, and those of mapped languages, which is non-trivial. All in all, a challenging project for a very talented hacker.


Pjotr Prins and Chris Fields