Giter Club home page Giter Club logo

cuba's Introduction

EGF CUBA logo

The EGF Collection of Useful Biological Apps

Build Status

This repository contains the source code of cuba.genomefoundry.org, a website of the Edinburgh Genome Foundry enabling anyone to use some of the EGF's biological software.

screenshots

How is it built?

CUBA is based on the CAB boilerplate, making it easy to create new apps with a form in the frontend and custom computations in the backend. It features job queues (with progress feedback for the user), form widgets like file uploaders, help buttons, and many more.

Getting started

The next steps will download, install, and launch CUBA on your computer.

  1. Install docker and docker-compose on your machine. This step depends on your machine (Windows, Linux, MacOS) so you'll need to google it.

  2. Download CUBA from Github:

git clone https://github.com/Edinburgh-Genome-Foundry/CUBA.git
  1. Go to the root CUBA/ directory (the one containing this README and the docker-compose.yml) and launch your application in development mode. The first time you try this, Docker will download and build a lot of things, which may take several minutes. It will only take a few seconds the next times you run this command.
docker-compose up
  1. Go to your browser and type localhost or 127.0.0.1 in the address bar. You should see the website appear. the console in which you launched docker-compose will keep printing logs of the different components (django, vue) so you can keep track and debug.

Creating a new app

The next steps will add a new app to the CUBA project.

  1. Go to frontend/src/components/scenarios and create a new scenario view with a form, for instance by duplicating the file ExampleScenario.vue.

  2. Register your scenario in file scenarios.js (in the same folder) by adding require('./ExampleScenario') under the category you want. You should now see your new scenario in the home page and the menu of the website.

  3. Next we will add some backend computations to process the form and return a result. First go to backend/app/views and create a new folder on the model of /example_scenario.

  4. Register the scenario in backend/app/views/__init__.py by adding

from .example_scenario import ExampleScenarioView
  1. Register the URL by adding the following line at the end of backend/website/urls.py:
url(r'^api/start/example_scenario$',
      views.ExampleScenarioView.as_view()),
  1. That's it. You now have a new app with frontend and backend !

Deploying the website on the web

The next steps will put your website on the web. Note that many other deployment workflows are possible.

  1. Get a hosting server (for instance from Amazon Web Services or Digital Ocean). Get the IP address of this server (for instance 123.12.123.123 but it could be mydomain.com if you have registered this domain and pointed it to your server).

  2. Log into this server (ssh [email protected] or ssh [email protected]) and install Docker and Docker-Compose (some Digital Ocean servers come with these already installed).

  3. From your computer, in the CUBA root directory, run the following command to create a code repository on the distant server, and register that distant repository under the name prodserver

./init_remote_git.sh [email protected] CUBA prodserver
  1. On the remote server, in the folder CUBA.git, start the website in production mode:
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up --build -d
  1. Wait some time and go in your browser at the address 123.12.123.123, your website should be live !

Every time you want to update the website, from your computer in the CUBA root directory run git push prodserver master. You will need to rebuild the containers on the server if you have modified the frontend or added dependencies to the backend (we may simplify this later).

Licence

CUBA is an open source software originally written by Zulko at the Edinburgh Genome Foundry and released on Github under the MIT licence (Copyright 2017 Edinburgh Genome Foundry). Everyone is welcome to contribute!

More biology software ?

EGF Codon is powered by the EGF Codons synthetic biology software suite for DNA design, manufacturing and validation.

cuba's People

Contributors

dependabot[bot] avatar veghp avatar zulko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cuba's Issues

Create Assembly Picklists fails

Using the provided examples, the app returns the error Program error: 'dict_items' object does not support indexing.

The error originates from this line, possibly due to changes in Plateo code.

installation issue.

INFO: pip is looking at multiple versions of appdirs to determine which version is compatible with other requirements. This could take a while.
Collecting appdirs
Downloading appdirs-1.4.3-py2.py3-none-any.whl (12 kB)
Downloading appdirs-1.4.2-py2.py3-none-any.whl (12 kB)
Downloading appdirs-1.4.1-py2.py3-none-any.whl (11 kB)
Downloading appdirs-1.4.0-py2.py3-none-any.whl (11 kB)
Downloading appdirs-1.3.0.tar.gz (13 kB)
Downloading appdirs-1.2.0.zip (22 kB)
Downloading appdirs-1.1.0.zip (18 kB)
WARNING: dnachisel 1.0.2 does not provide the extra 'reports'
WARNING: dnachisel 1.0.1 does not provide the extra 'reports'
WARNING: dnachisel 1.0.0 does not provide the extra 'reports'
WARNING: dnachisel 0.3.1 does not provide the extra 'reports'
WARNING: dnachisel 0.3.0 does not provide the extra 'reports'
WARNING: dnachisel 0.2.0 does not provide the extra 'reports'
WARNING: dnachisel 0.1.9 does not provide the extra 'reports'
WARNING: dnachisel 0.1.8 does not provide the extra 'reports'
WARNING: dnachisel 0.1.7 does not provide the extra 'reports'
WARNING: dnachisel 0.1.6 does not provide the extra 'reports'
WARNING: dnachisel 0.1.5 does not provide the extra 'reports'
WARNING: dnachisel 0.1.4 does not provide the extra 'reports'
WARNING: dnachisel 0.1.3 does not provide the extra 'reports'
WARNING: dnachisel 0.1.2 does not provide the extra 'reports'
WARNING: dnachisel 0.1.1 does not provide the extra 'reports'
WARNING: dnachisel 0.1.0 does not provide the extra 'reports'

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.