GeoDiver is a web app that allows users to easily analyse GEO datasets. This web application is available at https://geodiver.co.uk.
Pull Requests are welcome - whether you would like to fix a bug or implement a cool new feature, feel free to get in contact and we would be happy to work with you.
Please cite us if you use GeoDiver:
Moghul et al. (in prep) GeoDiver: Differential Gene Expression Analysis & Gene-Set Analysis For GEO Datasets https://doi.org/10.1101/127753
You can read the latest version of the paper here.
The installation instructions below are for if you wish to install a local copy of the web application. If you simply want to use GeoDiver, please use https://geodiver.co.uk.
If you would like more help than that below, please feel free to give us a shout on github issues.
- Ruby (>= 2.2.0)
- Recommended to use rvm to install ruby
- R (>=3.3.2)
- NodeJs (>= 7.7)
- bionode-ncbi (>= 2.0)
- jq (>= 1.5)
This installation has only been tested on a unix system. If you are looking to install on Windows and the below do not work, please use the docker container.
Google API Setup
In order to use the Google Login System (recommended), you need register with Google API to recieve a key and secret key (don't forget to keep your secret key a secret!)
- Go to 'https://console.developers.google.com'
- Select your project or create a new one (in the top left hand corner).
- Click on the menu button on the top left, and click on 'API Manager'.
- Click on 'Library' in the left side bar.
- In the search bar, type in "Contacts API" and then "Google+ API".
- When it is shown, click on the API name and then select 'Enable'.
- Once enabled, go back to the previous screen and search for the second API.
- After, enabling both APIs, click on 'Credentials' in the side bar.
- Next select the "OAuth consent screen" tab on top, and provide an 'EMAIL ADDRESS' and a 'PRODUCT NAME'
- Press 'Save' (This may automatically take you to step 12)
- Next select the 'Credentials' tab on top and click on 'Create Credentials' and then 'OAuth Client ID'.
- Under Application type, select 'Web Application'
- Select a name for your application (e.g. GeoDiver)
- Under Authorised Javscript origins, add 'http://localhost:9292' (and other domain name you wish to use, including with and without 'www')
- Next, under Authorised redirect URIs add 'http://localhost:9292/auth/google_oauth2/callback'.
- Copy Client ID and Client Secret.
Simply run the following command in the terminal.
# Clone the repository. git clone https://github.com/GeoDiver/GEODiver # Move into GeoDiver source directory. cd GEODiver # Initialize git submodules git submodule update --init --remote # Install R dependencies & Build and install the latest version of the webapp. rake install # Start the web app # Make sure you replace $CLIENTID and $CLIENTSECRET with the actual values that you copied above. passenger start --envvar GOOGLE_KEY=$CLIENTID --envvar GOOGLE_SECRET=$CLIENTSECRET -p 9292 -e production --sticky-sessions -d
Running From Source (Not Recommended)
It is also possible to run from source. However, this is not recommended.
# After cloning the web app and moving into the source directory # Install bundler gem install bundler # Use bundler to install dependencies bundle install # Optional: run tests and build the gem from source bundle exec rake # Run GeoDiver bundle exec passenger start -h # note that `bundle exec` executes GeoDiver in the context of the bundle # Alternatively run Geodiver using the command line interface bundle exec geodiver -h
To configure and launch Geodiver, run the following from a command line from the GeoDiver root folder.
bundle exec passenger start -h
That's it! Open http://localhost:9292/ and start using GeoDiver!
$ passenger start -h for more information on all the options available when running GeoDiver.
A Config file can be used to specify arguments - the default location of this file is in the home directory at
~/.geodiver.conf. An examplar of the config file can be seen below.
--- :num_threads: 8 :port: '9292' :host: 0.0.0.0 :gd_serve_dir: "/Users/ismailm/.geodiver" :devel: true
Easy setup using Docker (alternative)
If you run into issues trying to setup the above environment to run GeoDiver, we also provide a solution with Docker.
First, make sure your shell environment has your Google credentials (see Google API Setup)
export GOOGLE_KEY=YOUR-GOOGLE-API-KEY export GOOGLE_SECRET=YOUR-GOOGLE-API-SECRET
Run GeoDiver Docker container using image from Docker registry (fetched on first run)
docker run --rm -it -p 9292:9292 -v $(pwd):/root/.geodiver -e GOOGLE_KEY -e GOOGLE_SECRET geodiver/geodiver
Or, build your own Docker image locally from our Dockerfile
# Build local image git clone firstname.lastname@example.org:GeoDiver/GeoDiver.git cd GeoDiver docker build -t geodiver . # Run container using local image docker run --rm -it -p 9292:9292 -v $(pwd):/root -e GOOGLE_KEY -e GOOGLE_SECRET geodiver