Afra

FIXME

* For some reason the user is redirected to /_-_ after authentication.
  I used routeProvider.otherwise to work around this issue. But the
  problem resurfaced when I began to lazy load templates and script
  files (resources) based on route params. Agreed, the use of route
  params is a wrong approach to loading resources lazily. But then,
  redirecting to /_-_ after authentication _just_ shouldn't happen.

* Angular goes into an infinite loop of $locationWatch
  This began after the above mentioned changes to the routing logic
  _and_ the use of ng-include to show error templates.

  Based on https://github.com/angular/angular.js/issues/2815:

  If removing jquery as angular's dependency resolves the issue,
  perfect. If not,
  1. If removing jquery throughout resolves the issue, maybe switch to
  angular-strap.
  2. Perhaps improving the routing logic and "correctly"[*] using
  ng-include and ng-view will resolve the issue.

  [*]: Using ng-include together with ng-view can cause funny issues.
  ng-include appends content, while ng-view replaces content. I am using
  ng-include on HTTP error 401 and 404. Sometimes the error template
  gets appended to the current view (say, to the dashboard view).
  Clearly, that is not desirable. It is possible that resolving this
  issue will fix $locationWatch issue as well.

TODO:
* Implement logout functionality.
* MIT License.
* Testing:
  * Backend:
    * Spec User model.
    * Spec Web  class.
    * rake test:spec - run all specs
    * rake - run all tests (alias to test:spec for now)
  * Frontend:
    * grunt, mocha
* Build:
  * Frontend:
    * asset compilation, processing, & minification
    * grunt?
  * Backend:
    * ...

* Login:
  * Google+ & Twitter login
  * Login button should authenticate through a provider in a popup.

INVESTIGATE:
* jspm.io to manage RJS shims.
* Pack API calls into a separate class?
  * Like Rack::Static?
  * Move methods from Web::SessionManager to Web?
* Angular:
  * nav should be a directive
  * resolve.user should be a service
* Sequel:
  * Rewrite User & SessionToken models using Sequel
  * Keep database.rb? Probably not.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Integrate JBrowse.

NOTES

Included for testing.
* MAKER2 generated gene prediction in GFF3 format for two scaffolds of
  fire ant genome.
* Gene prediction for the two scaffolds of fire ant genome in JB/JSON
  format.

localhost:9292/#/genome hosts a working instance of JBrowse with a
navbar on top.
* Compiled JB's CSS into one genome.css. Styles from Dojo libs are
  'imported' from app/src/vendor.
* Copied all images from jbrowse/img have been copied to app/img.

TODO

* Task model.
* GET /task
* Script to populate tasks table from data/ev
* Add Next button at the bottom.  Clicking Next moves to next genomic

* JB shouldn't set page title.
* Remove 'Full View' link.
* Improve styling of tracks.
  This is going to be giganormous amount of work. What I want here is
  ...
  If possible, use fonts-awesome instead of JB's icon set.

* Rewrite JB's Perl scripts in Ruby.
  * contents of data/jb should not be a part of the repository
* Include a BAM file (and data in all formats supported by JB?) for
  testing.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Load WebApollo.

* Use WA from bbop/jbrowse.
* Make JB/WA work.
* Save a submission, associate task & submission with user.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>