Using the MI module in Python

We use swig to interface Python and C++ code. The C++ file is compiled into a shared library, which can be imported as a mudule in your Python code just like any other modules you normally use. In this way you can have the ease of flow control and text parsing with Python, leaving the heavy computation to the the much faster C++ code.

How to Use

Download the gzip file. What you need to do is first uncompress the file to get a new directory MI_suite, then modify the -I option in the last line of the Makefile to the python installation directory on your own system. Finally, type make on the command line under the same directory and if everything goes right, it's done. You can test the module in the python interactive shell by typing import MI_suite, and try using the mut_info function by inputting two strings like MI_suite.mut_info('ACCCP', 'DAADF'). Then the funtion will return the mutual information.

Tips:

Enjoy!