0.9.0 docs





    Jan 12, 2018

    Cambridge, UK


    Index of all namespaces

    « Project + dependencies

    bluegenes.modules — cljsDocsSource
    bluegenes.persistence — cljsDocsSource
    * Copyright (C) 2016 Intermine
    * This code may be freely distributed and modified under the
    * terms of the GNU Lesser General Public Licence. This should
    * be distributed with the code. See the LICENSE file for more
    * information or
    This namespace provides functions for saving
    and loading the state of the application to&from
    Also functions for exporting in various formats
    dont' like utils namespaces
    but anyway here's one
    The README below is fetched from the published project artifact. Some relative links may be broken.



    BlueGenes is designed to make searching and analysing genomic data easy. It’s powered by InterMine web services, meaning that the data from nearly 30 InterMines worldwide can be accessed from the same familiar interface.

    Try BlueGenes now

    BlueGene screenshots

    Feedback: Please create an issue in this repo or email info - at - intermine - dot - org

    Getting Started

    System Requirements

    Initial Setup

    BlueGenes has two main components: a web application and a server that hosts it. The server requires a connection to a PostgreSQL server to persist user data. We recommend creating two databases, one for development/testing and one for production:

    $ createdb bluegenes-dev
    $ createdb bluegenes-prod

    You then need to configure BlueGenes to use those databases. Copy and edit the example in config/dev/ and save it to config/dev/config.edn and config/prod/config.edn.

    Google Analytics

    If you wish to track pages hits, set up Google analytics for your domain, then add your google analytics id to your config.edn files (mentioned above) or environment variables. This is completely optional.

      {:google-analytics "UA-12345678-9"}

    Compile and Run (Production)

    To compile and package BlueGenes into an executable jar, run the following command in the project folder:

    $ lein uberjar

    Then, to start the application, execute the jar and pass in one of the config.edn files from above:

    $ java -jar -Dconfig="config/prod/config.edn" target/bluegenes.jar

    (When executing the jar the config.edn file can be located anywhere, including your home directory for security.)


    Adding a new mine

    Open src/cljc/bluegenes/mines.cljc and copy the value of the sample-mine variable into the mines hashmap. Change the key to something unique (:yourmine) and edit the default values appropriately. Be sure to edit the {:id …} value to reflect the key you used for :yourmine

    (def mines {:humanmine {...}
                :yourmine  {:id :yourmine

    Changing the default mine

    Open src/cljs/bluegenes/db.cljs and edit the :current-mine hashmap value to the keyword of a mine in mines.cljc (see above).

    (def default-db
       :mine-name :yourmine

    Please note that you will have to recompile the application for the changes to take effect (see below). Also, may need to clear your local storage for the :default-mine to take effect. You can do this by visiting the web application, clicking the cog on the top right, selecting Debug, and then clicking the button to delete local storage.


    Prerequisites and Dependencies

    You will need Leiningen 2.0 or above installed (2.4+ to use the web-repl). This handles all java/clojure dependencies. As clojure is a JVM language, this requires a JDK (1.6+) be installed; please see your friendly java vendor for details.

    A node-js environment is also required, which handles the installation of the javascript dependencies using npm and Bower.

    Required: The InterMine you point BlueGenes at must be running InterMine

    Download dependencies.

    bower install

    Compile css file once.

    lein less once

    Automatically recompile css file on change.

    lein less auto

    Start the process to reload code changes in the browser:

    lein figwheel dev

    Start the web server:

    In another terminal, run the following lein with-profile +dev run

    Then visit http://localhost:5000/ (or whichever port you specific in config.edn)

    Run tests:

    lein clean
    lein doo phantom test once

    The above command assumes that you have phantomjs installed. However, please note that doo can be configured to run cljs.test in many other JS environments (chrome, ie, safari, opera, slimer, node, rhino, or nashorn).

    Production Build

    lein clean
    lein uberjar

    That should compile the clojurescript code first, and then create the standalone jar.

    When you run the jar you can set the port the ring server will use by setting the environment variable PORT. If it’s not set, it will run on port 5000 by default.

    Minified deployment using dokku

    One of the easiest ways to deploy the prod minified version is to set up Dokku on your intended server. Once dokku is configured on your remote host, all you need to do to deploy a minified build is add the server as a remote and push to it:

    git remote add my-awesome-server bluegenes@my-awesome-server.git
        git push my-awesome-server master

    Also see the note in the next section about Postgres

    Setting up bluegenes for remote deployment

    Ensure that you set all [config variables](ADD LINK) and point to an existing postgres database.

    In the case of Heroku, that means editing the app on the Heroku dashboard and add a Postgres service. For Dokku, use the postgres plugin to link a postgres database.

    Further help needed?

    If you think the issue is related to InterMine or its webservices, check out the InterMine documentation Documentation on BlueGenes is available in the docs folder