Use -target_only option when fetching sequences from BLAST+ database.

BLAST+ sometimes returns more than one sequences for an accession number when
querying nr/nt database. The sequences returned are identical except their id.
This behaviour is unintuitive and causes SequenceServer to warn users that the
databases might be incorrectly formatted. Using -target_only ensures BLAST+
will return the exact match for the queried accession.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Enable -hash_index switch when creating databases.

Should make things faster.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Re-arrange files in spec/database.

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

Was broken due to addition of new test databases in commit "Add some databases
for testing".

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Don't mention FASTA in sequence modal's header.

As sequences are shown in GenBank format, while download option is FASTA.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Mention FASTA in download button in sequence modal.

Because download format is FASTA, while display is GenBank style.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Don't show download button at all if no sequence to show in the modal.

Better than disabling the download button.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Unit tests against #88

Sequences with only numeric FASTA ids are not properly retrieved using
blastdbcmd. While our hack fixes this, it is to be reported upstream.

Signed-off-by: Vivek Rai <vivekraiiitkgp@gmail.com>
Refactor and improve sequence_spec.rb. Minor improvement to Sequence class.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Use BLAST+ 2.2.30 on Travis.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Install BLAST+ in dedicated ~/.sequenceserver dir.

Signed-off-by: Vivek Rai <vivekraiiitkgp@gmail.com>
Find BLAST+ binaries path correctly

Signed-off-by: Vivek Rai <vivekraiiitkgp@gmail.com>
Parameterise BLAST+ download to MINIMUM_BLAST_VERSION constant.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Minimum BLAST+ version requirement is now 2.2.30+.

Needed for robust sequence retrieval.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Don't show index if only one query and no hits.

There's nowhere to go.

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Don't show FASTA dld link in Query header if no hits

Signed-off-by: Vivek Rai <vivekraiiitkgp@gmail.com>
Remove hack employed for #88 as it does not play well with -target_only.

reopen #88

Signed-off-by: Anurag Priyam <anurag08priyam@gmail.com>
Improve CLI: Tab Completion of File Paths

* Earlier blanks while entering database paths through command line
  interface could have caused problems.
* Readline allows one to tab complete directories which is helpful for
  entering the binaries and database paths.

Signed-off-by: Vivek Rai <vivekraiiitkgp@gmail.com>