<commit_before>NAMI
====

GUI-based Python program for thermal shift assay data analysis and interpretation

-----------------------------

Please cite: Groftehauge et al. 2014. Acta Cryst. D

-----------------------------

### 1. Installation

*If you cannot get the Python code to run (the instructions are terribly out-dated to be honest) please contact me on Twitter https://twitter.com/DrGroftehauge for pre-compiled executable files for Linux, Mac, or Windows. If you have a good suggestion for where to host the files for distribution please contact me.*

This chapter explains how to install the required programs to run NAMI on either Linux, Mac, or Windows.

NAMI runs through Python and currently requires the installation of Python 2.7 and the common modules matplotlib, numpy, scipy, and pyqt. Python 3 is not supported.

**1.1 Linux** 

Most Linux distributions have Python installed as default. However, an older distribution might have Python 2.6 or earlier and it should not be replaced since so many programs depend upon it. The simplest way forward is to upgrade Linux, use virtualenv, or possibly use the Enthought Python Distribution (EPD). The use of virtualenv or EPD to run parallel Python versions is outside the scope of this manual however. 

The libraries matplotlib, numpy, scipy, and pyqt4 should all be available in the package manager but may be prefixed with "python-". 

If the version available in the package manager is not recent enough to run NAMI you can easily install the updated version using ‘pip’. Here’s an example from Ubuntu:
```
sudo apt-get install pip
sudo apt-get remove python-matplotlib
sudo apt-get build-dep python-matplotlib
sudo pip install matplotlib
```
Build-dep adds all the things that matplotlib depends on to run - it might not be necessary but it won’t hurt. Pip is preferable to easy-install as it has a better uninstall function (pip remove). 

**1.2 Mac**

Instructions coming. Enthought is also available for Mac but there doesn't seem to be anything as simple as WinPython. 

**1.3 Windows** 

The simplest way is to use WinPython which comes with the relevant modules built in ([http://winpython.sourceforge.net/](http://winpython.sourceforge.net/)). Download the most recent 2.7 version.
Even without administrator privileges you can still launch the WinPython Command Prompt and run python and NAMI.

Otherwise Enthought supplies a Python distribution that easily enables the installation of 100+ common Python libraries. They have two free versions - one called Enthought Canopy Express with a reduced number of libraries ([http://www.enthought.com/canopy-express/](http://www.enthought.com/canopy-express/)) and a yearly renewing free academic license for Enthought Canopy ([http://www.enthought.com/products/canopy/academic/](http://www.enthought.com/products/canopy/academic/)). 

### 2. Running NAMI

**2.1 Execution** 

Open a terminal (Linux / Mac) or command prompt (Windows) and navigate to the directory where you want to output your results. If you have placed NAMI.py in that directory (or placed it in a directory that your PATH points to) executing it is as simple as writing 

`python NAMI.py`

otherwise you can prefix the path to NAMI.py. Example for Linux / Mac:

`python /home/user/somedirectory/NAMI.py`<commit_msg>Add installation instructions to Anaconda enabled systems<commit_after>NAMI
====

GUI-based Python program for thermal shift assay data analysis and interpretation

-----------------------------

Please cite: Groftehauge et al. 2014. Acta Cryst. D

-----------------------------

### 1. Installation

*If you cannot get the Python code to run (the instructions are terribly out-dated to be honest) please contact me on Twitter https://twitter.com/DrGroftehauge for pre-compiled executable files for Linux, Mac, or Windows. If you have a good suggestion for where to host the files for distribution please contact me.*

This chapter explains how to install the required programs to run NAMI on either Linux, Mac, Windows, or preferably on a Anaconda system.

NAMI runs through Python and currently requires the installation of Python 2.7 and the common modules matplotlib, numpy, scipy, and pyqt. Python 3 is not supported.

**1.1 Anaconda**

If Anaconda is installed on the system, an environment can be created to install NAMI.

```bash
conda create --name nami python=2.7
conda activate nami
conda install scipy=1.2.0 icu=56.1 pyqt=4 matplotlib=2.0.0b1

# required by the StepOnePlus convert script
conda install pandas=0.23.4 xlrd=1.2.0
```

To start NAMI you could run:

```bash
conda activate nami
python ./NAMI.py
```


**1.2 Linux**

Most Linux distributions have Python installed as default. However, an older distribution might have Python 2.6 or earlier and it should not be replaced since so many programs depend upon it. The simplest way forward is to upgrade Linux, use virtualenv, or possibly use the Enthought Python Distribution (EPD). The use of virtualenv or EPD to run parallel Python versions is outside the scope of this manual however. 

The libraries matplotlib, numpy, scipy, and pyqt4 should all be available in the package manager but may be prefixed with "python-". 

If the version available in the package manager is not recent enough to run NAMI you can easily install the updated version using ‘pip’. Here’s an example from Ubuntu:
```
sudo apt-get install pip
sudo apt-get remove python-matplotlib
sudo apt-get build-dep python-matplotlib
sudo pip install matplotlib
```
Build-dep adds all the things that matplotlib depends on to run - it might not be necessary but it won’t hurt. Pip is preferable to easy-install as it has a better uninstall function (pip remove). 

**1.3 Mac**

Instructions coming. Enthought is also available for Mac but there doesn't seem to be anything as simple as WinPython. 

**1.4 Windows**

The simplest way is to use WinPython which comes with the relevant modules built in ([http://winpython.sourceforge.net/](http://winpython.sourceforge.net/)). Download the most recent 2.7 version.
Even without administrator privileges you can still launch the WinPython Command Prompt and run python and NAMI.

Otherwise Enthought supplies a Python distribution that easily enables the installation of 100+ common Python libraries. They have two free versions - one called Enthought Canopy Express with a reduced number of libraries ([http://www.enthought.com/canopy-express/](http://www.enthought.com/canopy-express/)) and a yearly renewing free academic license for Enthought Canopy ([http://www.enthought.com/products/canopy/academic/](http://www.enthought.com/products/canopy/academic/)). 

### 2. Running NAMI

**2.1 Execution** 

Open a terminal (Linux / Mac) or command prompt (Windows) and navigate to the directory where you want to output your results. If you have placed NAMI.py in that directory (or placed it in a directory that your PATH points to) executing it is as simple as writing 

`python NAMI.py`

otherwise you can prefix the path to NAMI.py. Example for Linux / Mac:

`python /home/user/somedirectory/NAMI.py`
{'fraction_non_alphanumeric': 0.08007895107852812, 'fraction_numerical': 0.010150852953616242, 'mean_word_length': 4.013427561837456, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2782113', 'n_tokens_mistral': 1962, 'n_tokens_neox': 1809, 'n_words': 986}