<commit_before>CIViC
-----

[![Code Climate](https://codeclimate.com/github/genome/civic-server/badges/gpa.svg)](https://codeclimate.com/github/genome/civic-server)
[![Build Status](https://travis-ci.org/genome/civic-server.svg)](https://travis-ci.org/genome/civic-server)
[![Coverage Status](https://img.shields.io/coveralls/genome/civic-server.svg)](https://coveralls.io/r/genome/civic-server)<commit_msg>update README with some basic installation instructions<commit_after># CIViC - Clinical Interpretation of Variants in Cancer

[![Code Climate](https://codeclimate.com/github/genome/civic-server/badges/gpa.svg)](https://codeclimate.com/github/genome/civic-server)
[![Build Status](https://travis-ci.org/genome/civic-server.svg)](https://travis-ci.org/genome/civic-server)
[![Coverage Status](https://img.shields.io/coveralls/genome/civic-server.svg)](https://coveralls.io/r/genome/civic-server)

### Setup

#### Prerequisites

Before attempting to install the CIViC client and server software, you should obtain the following applications and libraries:

 * A relatively modern Ruby (>= 1.9.3)
    * If your OS doesn't ship with a modern Ruby, you can use [rbenv](https://github.com/sstephenson/rbenv) and [ruby-build](https://github.com/sstephenson/ruby-build) to obtain it.
 * Postgres
 * NodeJS
 * npm
 * libxml2
 * libxslt
 * libpq-dev
 * openssl

On OSX with homebrew, this should install the needed library dependencies: `brew install libxml2 libxslt openssl postgres node`

#### Installation
The following will set up the server side application and load the database schema.

    git clone https://github.com/genome/civic-server.git
    cd civic-server
    gem install bundler
    rbenv rehash
    bundle install
    rbenv rehash
    rake db:create
    rake db:migrate
    rails s

You will want to obtain the initial CIViC data set and load it using `rake civic import`. Contact the authors for a copy.

Next, you'll need to set up the client side application using the following:

    git clone https://github.com/genome/civic-client.git
    cd civic-client
    npm install -g bower gulp
    bower install
    gulp serve

You should now be able to access the backend server at `http://localhost:3000` and the frontend application at `http://localhost:3001`

For testing purposes (and so you don't have to set up OAuth credentials), you can log in as a normal or admin user by visiting `http://localhost:3000/mock_normal_user` or `http://localhost:3000/mock_admin_user`
{'fraction_non_alphanumeric': 0.11755233494363929, 'fraction_numerical': 0.008454106280193236, 'mean_word_length': 4.287234042553192, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5021271', 'n_tokens_mistral': 828, 'n_tokens_neox': 772, 'n_words': 225}