Giter Club home page Giter Club logo

CALeDNA / Protecting Our River

Codeship Status for UCcongenomics/caledna

Rails app the CALeDNA and Protecting Our River data portal.

Tech Stack

Setup

Clone this repo.

Install libraries.

$ bundle install
$ yarn install

rake newb - runs setup.rb to fill out the environmental variables, run database migrations, and seed the database. Seeding the taxa tables (ncbi_names, ncbi_nodes) will take many minutes since the taxa tables have over 3.5 GB of data.

$ rake newb

Start server

Start rails server.

$ bin/rails s

This app uses Webpacker to handle javascript bundling. Optionally run webpack dev server to live reload javascript changes.

$ ./bin/webpack-dev-server

Optionally run sidekiq to handle background jobs. The most commonly used background jobs involve importing eDNA results.

$ redis-cli flushall
$ bundle exec sidekiq -q default -q mailer

Testing

To run the Rspec tests and Rubocop linter.

$ bin/rake

Data Sources

  • KoBo API to import data from the Kobo webforms.
  • NCBI for the eDNA taxonomy.
  • GBIF API to display occurrence maps on taxa pages and GBIF downloaded dataset for additional occurrence data.
  • GloBI for the taxa biological interactions.
  • IUCN for the list of threatened / endangered species.

Notes

Protecting our River

  • The code for the Protecting Our River site are in the project/pour branch. Code that can be used on both sites are in master. The code only used on PouR are in project/pour.
  • To incorporate changes from the master branch to project/pour, you need switch to project/pour, git rebase master, and fix any conflicts.

Squarespace

  • The UCeDNA.com site has a Squarespace site for the static content (ucedna.com), and a Rails app for the data portal (data.ucedna.com).
  • The Rails app handles the registration and login. After users login to the Rails app, they are redirected to home page of Squarespace page. On the local development, the login redirects to localhost:9000, which is default port for the Squarespace development server.

Database

This app uses a lot of sql query and database types that only work on PostgreSQL.

This app uses multiple PostgreSQL database schemas.

  • Most of the tables are in public.
  • The tables that run the Pillar Point research project pages are in pillar_point.
  • The tables used only for Protecting Our River are in pour.
  • Tables containing data from GBIF, GloBI, iNaturalist, and 2017 NCBI taxonomy are in external.

See ./docs/fall_2020_database_schema.csv for an explanation of all the tables.

Update 3rd party data

bin/rake iunc_data:update_iunc_status - Connect to IUCN API to update the iucn_status in the ncbi_nodes table.

bin/rake wikidata:<task> - Query wikidata in order update the taxa links and images from external sites.

bin/rake gbif:<task> - Import occcurence and species that are downloaded from GBIF.

CALeDNA's Projects

caledna icon caledna

Rails app that handles the data management flow for CALeDNA.

crux icon crux

Pipeline For Creating eDNA Reference Libraries

klamath-mountains icon klamath-mountains

Klamath mountains genus interaction data repository compatible with globalbioticinteractions.org

ranacapa icon ranacapa

R package for downstream analysis for anacapa eDNA pipeline

taxonlisttoopentreephylogeny icon taxonlisttoopentreephylogeny

This is a Jupyter Notebook to make phylogenetic trees with the Open Tree of Life from a list of taxa such as those from Anacapa output (CALeDNA format)

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.