<commit_before>AberOWL-meta
=========================

This repository contains a collection of install scripts and subdirectories for setting up the AberOWL framework.

## What is AberOWL?

AberOWL is a framework for ontology-based access to biological data.

## Documentation

Documentation is available at [aber-owl.net](http://aber-owl.net/help).

## Dependencies

### Redis

Redis is an in-memory database that persists on disk, and allows for fast ontoloy indexing.

You can either install this using your package manager, or follow these simple steps below to compile Redis from source.

```bash
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
```

And then just simply start Redis with the following command.

```bash
redis-server restart
```

### node, node.js and npm

Node.js is a JavaScript platform for server-side programming, and NPM is a JavaScript package manager.

Ubuntu 14.04 comes bundled with a distro-sable version of node, node,js and nPM that can be installed directly from the default repositories.

Simply run.

```bash
sudo apt-get install node nodejs npm
```

### Groovy

Groovy is an alternative language for the JVM with a concise Java-friendly syntax, dynamic and static features, powerful DSL capabilities. AberOWL requires a Groovy version above version 2. If your package manager includes an ancient version of Groovy, you can easily use the GVM tool to install a recent version: http://www.groovy-lang.org/install.html#_gvm_the_groovy_environment_manager

### Apache

Apache is a popular open-source web server.

To install apache, use this command.

```bash
sudo apt-get install apache2
```

## Installation

AberOWL is being actively developed, and you can clone its repository.

Clone the repository:

```bash
git clone https://github.com/bio-ontology-research-group/aberowl-meta
```
And then use the preconfigured install script to automatically set up the service:

```bash
./install
```
You will then need to reverse proxy the servers through apache. You can do this by editing the apache config file.

The relevant one is usually found at  ``/etc/apache2/sites-enabled/000-default.conf``.

You need to add:

    ProxyPassReverse /service/ http://my.domain.name.uk:8080/
    ProxyPass /service/ http://my.domain.name.uk:8080/

    ProxyPass / http://my.domain.name.uk:3000/
    ProxyPassReverse / http://my.domain.name.uk:3000/


Then, you need to add the module proxy to apache:
```bash
sudo a2enmod proxy
```
Finally, you have to install databank-redis:
```bash
cd aberowl-web
npm install databank
cd node_modules/databank/
npm install databank-redis
```

Note that the order is important. Apache must be restarted after changes.

```bash
sudo service apache2 restart
```

## Configuration

Everything should work by default, however listed are a few configuration points throughout the applications:

### AberOWL-sync

* Configure the location of the AberOWL-server API endpoint using the *ABEROWL_API* constant at the top of each
RemoteOntologyDiscover.groovy and RemoteOntologyUpdate.groovy

### AberOWL-server

* The port listened on can be changed at the top of AberOWLServer.groovy. Note that changes will have to be
accounted for in the Apache configuration.

### AberOWL-web

* The port listened on can be changed at the top of bin/www. Note that changes will have to be accounted for in the
Apache configuration.

## Running

Once you are in the ```aberowl-meta``` directory, To run the server simply run:

```bash
cd aberowl-server ;  groovy AberOWLServer.groovy
```

To run the web front-end:

```bash
cd aberowl-web ; bin/www
```
<commit_msg>update readme for issues noted in [#6]<commit_after>AberOWL-meta
=========================

This repository contains a collection of install scripts and subdirectories for setting up the AberOWL framework.

## What is AberOWL?

AberOWL is a framework for ontology-based access to biological data.

## Documentation

Documentation is available at [aber-owl.net](http://aber-owl.net/help).

## Dependencies

### Redis

Redis is an in-memory database that persists on disk, and allows for fast ontoloy indexing.

You can either install this using your package manager, or follow these simple steps below to compile Redis from source.

```bash
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
```

And then just simply start Redis with the following command.

```bash
redis-server restart
```

### node, node.js and npm

Node.js is a JavaScript platform for server-side programming, and npm is a JavaScript package manager.

Ubuntu 14.04 comes bundled with a distro-sable version of node, node,js and npm that can be installed directly from the default repositories.

Simply run.

```bash
sudo apt-get install nodejs nodejs-legacy npm
```

### Groovy

Groovy is an alternative language for the JVM with a concise Java-friendly syntax, dynamic and static features, powerful DSL capabilities. AberOWL requires a Groovy version above version 2. If your package manager includes an ancient version of Groovy, you can easily use the sdkman tool to install a recent version: http://www.groovy-lang.org/install.html#_gvm_the_groovy_environment_manager

### Apache

Apache is a popular open-source web server.

To install apache, use this command.

```bash
sudo apt-get install apache2
```

## Installation

AberOWL is being actively developed, and you can clone its repository.

Clone the repository:

```bash
git clone https://github.com/bio-ontology-research-group/aberowl-meta
```
And then use the preconfigured install script to automatically set up the service:

```bash
./install
```
You will then need to reverse proxy the servers through apache. You can do this by editing the apache config file.

The relevant one is usually found at  ``/etc/apache2/sites-enabled/000-default.conf``.

You need to add:

    ProxyPassReverse /service/ http://my.domain.name.uk:8080/
    ProxyPass /service/ http://my.domain.name.uk:8080/

    ProxyPass / http://my.domain.name.uk:3000/
    ProxyPassReverse / http://my.domain.name.uk:3000/


Then, you need to add the module proxy to apache:
```bash
sudo a2enmod proxy
```

Note that the order is important. Apache must be restarted after changes.

```bash
sudo service apache2 restart
```

## Configuration

Everything should work by default, however listed are a few configuration points throughout the applications:

### AberOWL-sync

* Configure the location of the AberOWL-server API endpoint using the *ABEROWL_API* constant at the top of each
RemoteOntologyDiscover.groovy and RemoteOntologyUpdate.groovy

### AberOWL-server

* The port listened on can be changed at the top of AberOWLServer.groovy. Note that changes will have to be
accounted for in the Apache configuration.

### AberOWL-web

* The port listened on can be changed at the top of bin/www. Note that changes will have to be accounted for in the
Apache configuration.

## Running

Once you are in the ```aberowl-meta``` directory, To run the server simply run:

```bash
cd aberowl-server ;  groovy AberOWLServer.groovy [PORT]
```

Where [PORT] is the port for the AberOWL service to listen on e.g. 9999.

To run the web front-end:

```bash
cd aberowl-web ; bin/www
```

{'fraction_non_alphanumeric': 0.08635863586358636, 'fraction_numerical': 0.008388338833883388, 'mean_word_length': 4.285610465116279, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, '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': '2906246', 'n_tokens_mistral': 2277, 'n_tokens_neox': 2048, 'n_words': 920}