Randomized Tagline
-----
This should increase our googlability

[ap: use `rand` instead of `Array#sample` -- maintain 1.8.7 compatibility]
[ap: whitespace fixes]

Signed-off-by: Yannick Wurm <yannick.wurm@unil.ch>
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
upgrade to Bootstrap 2.0.2

[Customizations][1] listed in .bootstrap.

[1]: http://twitter.github.com/bootstrap/download.html

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
import Bootstrap's dropdown JS plugin

For [button dropdowns][1].

[1]: http://twitter.github.com/bootstrap/components.html#buttonDropdowns

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
ui: eliminate BLAST method selection (close #43, #72)

Let SequenceServer 'automagically' figure it out for the user depending on the
selected database, input sequence type, and heuristics.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
ui: add more spacing around the list of databases

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
ui: highlight letters that change between blast method names (#72)

So if SequenceServer decides 'blastp' is to be used, 'p' is highlighted (in
bold) on the blast button.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
clean up post '/'

What BLAST method to use is determined automagically on the client side
depending on the selected database and input sequence type, see commit 'ui:
eliminate BLAST method selection'.  No point verifying again on the client side
whether the BLAST method is valid for the selected database and input sequence
type.  Accordingly, removed associated helper methods and their tests.

Params validation and logging has moved out from the post handler to a before
hook which reads more logically -- 'before' running a BLAST search, ensure
required params are present and are correct.

Removed redundant logging statements.  And make sure advanced param is logged
(don't know why it wasn't in the first place).

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
generate correct link for FASTA retrieval even if BLAST+ adds links of its own

For sequences with global accession number, BLAST+ automatically generates a
link to a page containing more details about the sequence.  SequenceServer
would incorrectly parse the ids for such sequences generating malformed link
for retrieving FASTA of all hits.  Stripping HTML before parsing id fixes the
problem.

Thanks to Andrew Nguyen and Fourmidable for helping discover and squash this
issue.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
store database objects indexed by their hash value

So the global database table has no internal structure like before (grouped by
nucleotide and protein).  As long as the client side sends a hash value,
SequenceServer will happily look it up; no need of determining the database
type.  And the view side can arbitrarily structure/group the databases for
presentation (like in #29).

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
introduce jquery.scrollspy.js

I found existing solutions to be ugly, unintuitive, and difficult to adapt, so
rolled my own :).  Perhaps this should be made available as a separate jQuery
plugin so others can reuse it as well.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
ui: provide an index for a multi query search (close #10)

Entries in the index corresponds to the results for each query.  Long query
description lines are capped at 22 characters, while the full length is shown
in the tooltip.

Of course, the index is not show if the query contains only one sequence.
Depending on whether SS needs to show the index or not, width of the results is
accordingly shrunk or grown.

The index is automatically created on the client side from the blast results
from a simple jQuery plugin (tailored to SS's needs).

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
use scrollspy to highlight each result of a multi-query search

Teeny bit of refactoring to reduce repetition and simplify code.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
fix a bug in guesstimating sequence type

Without the global match flag ('g') only the first occurrence of ambiguous and
non-word characters were removed from the sequence, causing SS to make a wrong
guess about the input sequence type!!

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

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Multi-part databases with names that have non-alphanumeric characters are properly ignored

Signed-off-by: Ben J. Woodcroft <donttrustben near gmail.com>
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
import jquery.ui's effects module

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
ui: jiggle submit button when BLAST method changes (#72)

Should draw user's attention.

Suggested-by: Yannick Wurm <yannick.wurm@unil.ch>
Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
start testing routes

Instead of raising an ArgumentError and return "Internal Server Error (500)",
SS now returns "Bad Request (400)" (on lines of Twitter) to indicate an
incorrect request.  For testing, SS relies on minitest for rspec style
behavioral tests, and rack-test to test the routes.  The test coverage at the
moment is tiny, nevertheless it helped tighten request validation a bit.

This commit relates to #14 since it changes how an error in client request is
handled, and #69 since it lays the foundation for testing the routes.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
test correctness of blast method and advanced params passed to post '/'

More tests!

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
work around the ugly hack SS had to use to test validate_advanced_parameters

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