Skip to content

StandAloneDependencies

Nathan Salomonis edited this page Jul 10, 2020 · 2 revisions

Optional AltAnalyze Dependencies to be Installed

The compiled versions of AltAnalyze (Windows, Mac OSX and Ubuntu) should run immediately after extraction, however, the source code implementations may require additional Python modules installed. These are:

  1. Required: Python version 2.7 or greater
  2. Graphical User Interface requirement: Tkinter
  3. Statistical methods: Scipy, Sklearn, umap-learn, nimfa, numba, python-louvain, annoy, networkx
  4. Visualization output files: Matplotlib, Numpy, Scipy
  5. PNG viewing in the GUI: Python Imaging Library (PIL) ImageTk
  6. Statistical libraries for Combat: Patsy and Pandas
  7. Network visualization in igraph: igraph and cairo

These libraries can be installed from source code or from installers provided by the open-source project websites.

To determine if a pre-compiled version of AltAnalyze is compatible with your operating system, download the program and double-click the executable file name "AltAnalyze". The program can also be initiated from a terminal command-line (e.g., "./AltAnalyze in Linux). Feel free to contact us about any problems.

Instructions for Windows/Linux/Mac OS X

Mac OS X

By default, Mac OS X has Python installed along with Tkiner. Python version 2X should be default and used instead of python 3.

Windows

Install Python 2.7 from http://www.python.org. Tkinter is installed by default.

Linux (see Ubuntu below)

If python or tkinter is not installed, install Python 2.7 from http://www.python.org. Tkinter is installed by default. Test by typing python at the terminal and then import tkinter.

Cross-Platform Installation Options

Python and Tkinter are all that are needed for AltAnalyze to run, but other dependencies are required if you wish to visualize WikiPathways (suds, PIL), cluster or QC plots (Matplotlib, Numpy, Scipy) or speed up the Fisher Exact Test analysis (scipy). To install these, see the below instructions.

  1. Install setuptools: http://pypi.python.org/pypi/setuptools/
  2. Install matplotlib: sudo pip install matplotlib
  3. Install numpy: sudo pip install numpy
  4. Install scipy: sudo pip install scipy
  5. Install Imagetk: sudo pip install pillow
  6. Install patsy: sudo pip install patsy (only required for combat)
  7. Install pandas: sudo pip install pandas (only required for combat)
  8. Install fastcluster: sudo pip install fastcluster
  9. Install fastcluster: sudo pip install sklearn
  10. Install fastcluster: sudo pip install umap-learn
  11. Install fastcluster: sudo pip install nimfa
  12. Install fastcluster: sudo pip install numba
  13. Install fastcluster: sudo pip install python-louvain
  14. Install fastcluster: sudo pip install annoy
  15. Install fastcluster: sudo pip install networkx
  16. Install igraph: recommend installer
  17. Install cairo: recommend install from source (see INSTALL file or here for Windows users)
  18. Install ordereddict: easy_install ordereddict

Instructions for Ubuntu

Adding support for python applications call Tk is particularly challenging on Ubuntu, since Python is installed but Tkinter is not. We recommend:

  1. Ensure all Ubuntu updates have been installed
  2. Install Tkinter: apt-get install python-tk (restart after)
  3. Install setuptools: sudo apt-get install python-setuptools
  4. Install matplotlib: sudo apt-get install python-matplotlib
  5. Install numpy: sudo apt-get install python-numpy
  6. Install scipy: sudo apt-get install python-scipy
  7. Install Imagetk: sudo apt-get install python-imaging python-imaging-tk
  8. Install patsy: sudo pip install patsy
  9. Install pandas: sudo pip install pandas
  10. Install fastcluster: sudo pip install sklearn
  11. Install fastcluster: sudo pip install umap-learn
  12. Install fastcluster: sudo pip install nimfa
  13. Install fastcluster: sudo pip install numba
  14. Install fastcluster: sudo pip install python-louvain
  15. Install fastcluster: sudo pip install annoy
  16. Install fastcluster: sudo pip install networkx

Note: Installing from source is necessary when apt-get or easy_install does not properly obtain all dependent libraries. To install from source use these commands:

  • python setup.py build
  • sudo python setup.py install

For igraph, install as described here

  • This will install to the default system python (default or python installed by apt-get). If installed via other means (e.g., from source to /usr/local/bin), you will need to sym link the igraph folder from the equivalent system python version to your local installed and use the command export LD_LIBRARY_PATH=/usr/lib/ or export LD_LIBRARY_PATH=/usr/local/lib/ if igraph gives an ImportError.

Developers Only

Both PyInstaller and cx_Freeze have been used to build AltAnalyze binary distributions. In general, PyInstaller works the best with the described patch for Ubuntu, whereas cx_Freeze will work for some but not all Ubuntu releases and configurations (e.g., compatible with 10.04).

  • Install cx_Freeze from source (problems with apt-get) (may require libssl-dev be installed)
  • OR download and extract PyInstaller 1.6 (requires this patch)
  • In the AltAnalyze main program directory (ensure .py files are in this root and not just Source_code), run: python setup.py build
  • Paste the files in the build/exe.linux directory into the AltAnalyze main program folder.
  • Test the "AltAnalyze" executable file in a copy of the AltAnalyze directory prior to distribution.

Creating Compilers (advanced)

If you wish to create your own compiled version of AltAnalyze for distribution to your users (e.g., custom versions or unsupported operating systems), install the above and be mindful of the following:

  1. Customization of the setup.py file may be required for inclusion or exclusion of OS specific libraries (dll files).
  2. See the setup.py script for run instructions on different operating systems.
  3. The suds package folder must exist in the Python site-packages folder (not just the egg - zip must be extracted).
  4. Issues with matplotlib external dependencies may occur (see existing setup.py files for details).
  5. Issues with conflicting dependencies may occur on some OSs resulting in strange errors during binary creations. These include: the python library six may need to be called as site-packages/six/six.py rather than the egg file.

Potential Issues

  1. Pandas installs it's own dateutil which may cause errors to be displayed in the console and possibly other issues.
  2. Eggs are not well supported by py2exe
Clone this wiki locally