Coder Social home page Coder Social logo

bwalsh / civic-server Goto Github PK

View Code? Open in Web Editor NEW

This project forked from griffithlab/civic-server

0.0 2.0 0.0 12.39 MB

Backend Server for CIViC Project

License: MIT License

Ruby 94.18% CoffeeScript 0.01% JavaScript 0.27% CSS 0.58% HTML 4.96%

civic-server's Introduction

CIViC - Clinical Interpretation of Variants in Cancer

Code Climate Build Status Coverage Status

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 and 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:schema:load

If re-freshing the database (from a previous install) use rake db:drop before create and schema:load commands. To obtain the initial CIViC data set and load it use:

rake civic:import['import/GeneSummaries.txt','import/VariantSummaries.txt','import/ClinActionEvidence.txt','import/VariantGroupSummaries.txt']

Or alternatively you can load the data from an SQL dump as follows:

rake civic:load

Finally, start the CIViC rails server

rails s

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
npm install
bower install
gulp serve

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

Note that certain tasks needed by a running instance of CIViC are accomplished by 'background workers'. These can be started on a local instance.For example, we take input a user gives us, and then process it the background (matching up DOIDs, Entrez IDs, etc. with each site's API and adding new items from these sources as needed). If you want to start a backgroun worker locally, you can run (in the civic-server repo):

bin/delayed_job start 

Note to make yourself an admin in a local install you can do the following from your civic-server repo. First log into the front end http://127.0.0.1:3001 and sign in with your user. Log into a rails console, run a command that makes you an admin in the db, and exit.

rails c
User.first.make_admin!
exit

Now log into the backend admin interface as follows: http://127.0.0.1:3000/admin

Note that the above command just makes the first user in the DB an admin. If you have multiple users you could also do:

User.second.make_admin!
User.third.make_admin!

You can run the backend test suite with

rake spec

civic-server's People

Contributors

acoffman avatar bwalsh avatar jmcmichael avatar kkrysiak avatar malachig avatar mrjosh-zz avatar nspies13 avatar obigriffith avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.