Skip to content

Commit

Permalink
Merge pull request #220 from NESCent/joss-submission
Browse files Browse the repository at this point in the history
Paper and README updates for JOSS submission
  • Loading branch information
dleehr authored Jul 20, 2018
2 parents 86e5b57 + 6a34423 commit d43da8a
Show file tree
Hide file tree
Showing 5 changed files with 154 additions and 99 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
source 'http://rubygems.org'

ruby '2.2.0'
gem 'rails', '4.1.4'

# Paperclip adds file upload support to ActiveRecord models
Expand Down
181 changes: 91 additions & 90 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,43 +27,44 @@ GEM
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
addressable (2.3.6)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
arel (5.0.1.20140414130214)
aws-sdk (1.51.0)
json (~> 1.4)
nokogiri (>= 1.4.4)
bcrypt (3.1.7)
builder (3.2.2)
bcrypt (3.1.11)
builder (3.2.3)
capybara (2.2.1)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
climate_control (0.0.3)
activesupport (>= 3.0)
climate_control (0.2.0)
cliver (0.3.2)
cocaine (0.5.4)
cocaine (0.5.8)
climate_control (>= 0.0.3, < 1.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.7.0)
coffee-script-source (1.12.2)
commonjs (0.2.7)
coveralls (0.7.0)
multi_json (~> 1.3)
rest-client
simplecov (>= 0.7)
term-ansicolor
thor
crack (0.4.2)
concurrent-ruby (1.0.5)
coveralls (0.8.21)
json (>= 1.8, < 3)
simplecov (~> 0.14.1)
term-ansicolor (~> 1.3)
thor (~> 0.19.4)
tins (~> 1.6)
crack (0.4.3)
safe_yaml (~> 1.0.0)
daemons (1.1.9)
delayed_job (4.0.2)
activesupport (>= 3.0, < 4.2)
daemons (1.2.5)
delayed_job (4.0.6)
activesupport (>= 3.0, < 5.0)
delayed_job_active_record (4.0.3)
activerecord (>= 3.0, < 5.0)
delayed_job (>= 3.0, < 4.1)
Expand All @@ -75,65 +76,65 @@ GEM
warden (~> 1.2.3)
docile (1.1.5)
erubis (2.7.0)
eventmachine (1.0.3)
execjs (2.2.1)
faraday (0.9.0)
eventmachine (1.2.5)
execjs (2.7.0)
faraday (0.12.2)
multipart-post (>= 1.2, < 3)
hashie (3.2.0)
hashie (3.5.7)
hike (1.2.3)
i18n (0.6.11)
jquery-rails (3.1.1)
i18n (0.9.1)
concurrent-ruby (~> 1.0)
jquery-rails (3.1.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
jquery-tablesorter (1.12.7)
jquery-tablesorter (1.12.8)
railties (>= 3.1, < 5)
json (1.8.1)
jwt (1.0.0)
json (1.8.6)
jwt (1.5.6)
less (2.3.3)
commonjs (~> 0.2.6)
less-rails (2.3.3)
actionpack (>= 3.1)
less (~> 2.3.1)
less-rails-bootstrap (2.3.3)
less-rails (~> 2.3.1)
libv8 (3.16.14.7)
mail (2.5.4)
libv8 (3.16.14.19)
mail (2.5.5)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
mini_portile (0.6.0)
minitest (5.4.0)
multi_json (1.10.1)
multi_xml (0.5.5)
mini_portile2 (2.3.0)
minitest (5.10.3)
multi_json (1.12.2)
multi_xml (0.6.0)
multipart-post (2.0.0)
netrc (0.7.7)
nokogiri (1.6.2.1)
mini_portile (= 0.6.0)
oauth2 (1.0.0)
faraday (>= 0.8, < 0.10)
nokogiri (1.8.1)
mini_portile2 (~> 2.3.0)
oauth2 (1.4.0)
faraday (>= 0.8, < 0.13)
jwt (~> 1.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (~> 1.2)
rack (>= 1.2, < 3)
omniauth (1.2.2)
hashie (>= 1.2, < 4)
rack (~> 1.0)
omniauth-google-oauth2 (0.2.5)
omniauth (> 1.0)
omniauth-oauth2 (~> 1.1)
omniauth-oauth2 (1.2.0)
faraday (>= 0.8, < 0.10)
omniauth-google-oauth2 (0.5.2)
jwt (~> 1.5)
multi_json (~> 1.3)
oauth2 (~> 1.0)
omniauth (>= 1.1.1)
omniauth-oauth2 (>= 1.3.1)
omniauth-oauth2 (1.5.0)
oauth2 (~> 1.1)
omniauth (~> 1.2)
omniauth-openid (1.0.1)
omniauth (~> 1.0)
rack-openid (~> 1.3.1)
orm_adapter (0.5.0)
paperclip (4.2.0)
activemodel (>= 3.0.0)
activesupport (>= 3.0.0)
cocaine (~> 0.5.3)
paperclip (4.2.4)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
cocaine (~> 0.5.5)
mime-types
pg (0.17.1)
poltergeist (1.5.1)
Expand All @@ -142,13 +143,14 @@ GEM
multi_json (~> 1.0)
websocket-driver (>= 0.2.0)
polyglot (0.3.5)
protected_attributes (1.0.8)
protected_attributes (1.0.9)
activemodel (>= 4.0.1, < 5.0)
rack (1.5.2)
public_suffix (3.0.1)
rack (1.5.5)
rack-openid (1.3.1)
rack (>= 1.1.0)
ruby-openid (>= 2.1.8)
rack-test (0.6.2)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.1.4)
actionmailer (= 4.1.4)
Expand All @@ -160,73 +162,72 @@ GEM
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.4)
sprockets-rails (~> 2.0)
rails_12factor (0.0.2)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.2)
rails_stdout_logging (0.0.3)
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (4.1.4)
actionpack (= 4.1.4)
activesupport (= 4.1.4)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.3.2)
ref (1.0.5)
rest-client (1.7.1)
mime-types (>= 1.16, < 3.0)
netrc (~> 0.7)
ruby-openid (2.5.0)
safe_yaml (1.0.3)
rake (12.3.0)
ref (2.0.0)
ruby-openid (2.7.0)
safe_yaml (1.0.4)
sass (3.2.19)
sass-rails (4.0.3)
sass-rails (4.0.5)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sass (~> 3.2.2)
sprockets (~> 2.8, < 3.0)
sprockets-rails (~> 2.0)
simplecov (0.8.2)
simplecov (0.14.1)
docile (~> 1.1.0)
multi_json
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
sprockets (2.11.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
sprockets (2.12.4)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.1.3)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
term-ansicolor (1.3.0)
sprockets (>= 2.8, < 4.0)
term-ansicolor (1.6.0)
tins (~> 1.0)
therubyracer (0.12.1)
libv8 (~> 3.16.14.0)
therubyracer (0.12.3)
libv8 (~> 3.16.14.15)
ref
thin (1.6.2)
daemons (>= 1.0.9)
eventmachine (>= 1.0.0)
rack (>= 1.0.0)
thor (0.19.1)
thread_safe (0.3.4)
thin (1.7.2)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thor (0.19.4)
thread_safe (0.3.6)
tilt (1.4.1)
tins (1.3.0)
tins (1.16.3)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
tzinfo (1.2.2)
tzinfo (1.2.4)
thread_safe (~> 0.1)
uglifier (2.5.1)
uglifier (2.5.3)
execjs (>= 0.3.0)
json (>= 1.8.0)
warden (1.2.3)
warden (1.2.7)
rack (>= 1.0)
webmock (1.17.4)
addressable (>= 2.2.7)
crack (>= 0.3.2)
websocket-driver (0.3.4)
wicked (1.0.3)
rails (>= 3.0.7)
xpath (2.0.0)
websocket-driver (0.7.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.3)
wicked (1.3.2)
railties (>= 3.0.7)
xpath (2.1.0)
nokogiri (~> 1.3)

PLATFORMS
Expand Down Expand Up @@ -262,4 +263,4 @@ DEPENDENCIES
wicked

BUNDLED WITH
1.11.2
1.12.5
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,39 @@ TraitDB is a Rails 4 application. It requires [ruby](http://ruby-lang.org) and
```
git clone [email protected]:NESCent/TraitDB.git
```
2. Install dependencies with `bundle install`
3. Set your database credentials as environment variables. `config/database.yml` will read these values out of the environment. If your database server is on a different host, set the host/port as well:
<pre><code>export TRAITDB_PG_DEV_USER="traitdb_dev_user"
export TRAITDB_PG_DEV_PASS="your-password-here"</code></pre>
```
export TRAITDB_PG_DEV_USER="traitdb_dev_user"
export TRAITDB_PG_DEV_PASS="your-password-here"
```
4. Run `rake db:setup`. This Instructs Rails to connect to your database and create the required users and databases. If your database requires you to authenticate before creating users/databases, you will be prompted for credentials.
5. If `rake db:setup` is successful, it will also run a `rake db:migrate` to create database tables. If not successful, you can create the databases and users manually, then run `rake db:migrate` manually.
6. Start the server with `rails server`.
7. Visit [http://localhost:3000](http://localhost:3000) to access the application. You will be shown the about page. If you click _Upload_, you will be redirected to the sign-in screen. From here, you can create an account or sign in with OpenID.
8. Start a [delayed_job](https://github.com/collectiveidea/delayed_job) worker. Delayed job is used to execute dataset imports as a background process. It includes a rake task to start a worker. You can run `rake jobs:work` in an additional terminal process, or run a worker as a daemon with `script/delayed_job start`.
6. If you wish to enable Google Sign-in (recommended), you will need to
- Register an application for [Google OAuth 2.0](https://developers.google.com/identity/protocols/OAuth2)
- Enable the Google+ API
- Set the Client ID and Client Secret credentials in your environment:
```
export TRAITDB_GOOGLE_APP_ID="your-google-app-id"
export TRAITDB_GOOGLE_APP_SECRET="your-google-app-secret"
```
7. Start the server with `rails server`.
8. Visit [http://localhost:3000](http://localhost:3000) to access the application. You will be shown the about page. If you click _Upload_, you will be redirected to the sign-in screen. From here, you can sign in with OpenID or a Google Account
9. Start a [delayed_job](https://github.com/collectiveidea/delayed_job) worker. Delayed job is used to execute dataset imports as a background process. It includes a rake task to start a worker. You can run `rake jobs:work` in an additional terminal process, or run a worker as a daemon with `script/delayed_job start`.
## Usage
### Getting Started - Projects and Users
Data in TraitDB is publicly searchable and organized into projects. Initially there are no projects, and only administrators can create projects. Authentication is handled by OpenID, so in order to get started, you must:
1. Sign in with an OpenID by clicking __Sign In__ in the top menu bar. After signing in, there will be an entry in the users table with your email address.
1. After signing in, there will be an entry in the users table with your email address.
2. Upgrade this user to an Administrator with the following rake command:
<pre><code>$ rake traitdb:upgrade_admin[[email protected]]
Upgrading [email protected]</code></pre>
```
$ rake traitdb:upgrade_admin[[email protected]]
Upgrading [email protected]
```
3. Reload your web browser, you will have an __Admin__ menu option.
4. Click __Admin->Projects__, and the __New Project__ button.
5. Fill out the project details and save the new project
Expand Down
9 changes: 9 additions & 0 deletions paper.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@article{ashman2014tree,
title={Tree of Sex: A database of sexual systems},
author={Ashman, Tia-Lynn and Bachtrog, Doris and Blackmon, Heath and Goldberg, Emma E and Hahn, Matthew W and Kirkpatrick, Mark and Kitano, Jun and Mank, Judith E and Mayrose, Itay and Ming, Ray and others},
journal={Scientific Data},
volume={1},
pages={140015},
year={2014},
publisher={Nature Publishing Group}
}
32 changes: 32 additions & 0 deletions paper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: 'TraitDB: Web application database of phenotypic trait data.'
tags:
- trait
- rails
- csv
authors:
- name: Dan Leehr
orcid: 0000-0003-3221-9579
affiliation: "1"
- name: Mercedes Gosby
affiliation: "1"
affiliations:
- name: National Evolutionary Synthesis Center
index: 1
date: 20 July 2018
bibliography: paper.bib
---

# Summary

TraitDB is a web application built to facilitate storage, searching, subsetting, and sharing trait data.

TraitDB has been used by multiple [NESCent](http://nescent.org/) working groups to assemble datasets from different researchers into a single uniform dataset. Guided by a flexible YAML template system, TraitDB's import process provides validation feedback on CSV files and individual data cells to promote consistency and completeness.

TraitDB presents several options for browsing, subsetting, and downloading data via its web interface. It can summarize trait data over different taxonomic levels, and has been used to gather and prodice datasets hosted by the [Tree of Sex](treeofsex.org).

# Acknowledgements

TraitDB is a project of [National Evolutionary Synthesis Center](http://nescent.org/)

# References

0 comments on commit d43da8a

Please sign in to comment.