wurmlab / sequenceserver

Intuitive graphical web interface for running BLAST bioinformatics tool (i.e. have your own custom NCBI BLAST site!)
https://sequenceserver.com
GNU Affero General Public License v3.0
273 stars 114 forks source link

setup script should elegantly handle incorrect database dir #456

Open yannickwurm opened 4 years ago

yannickwurm commented 4 years ago

Currently it dies - it should just ask again

[2020-03-14 11:11:41] INFO  Configuration file not found: /Users/Yannick/.sequenceserver.conf

Database dir not set.

SequenceServer needs to know where your FASTA files or BLAST+ databases are.
Please enter the path to the relevant directory (default: current directory).

Press Ctrl+C to quit.

>> ~/db
[2020-03-14 11:21:27] INFO  Configuration file not found: /Users/Yannick/.sequenceserver.conf
Could not find database dir: /Users/Yannick/db
➜  Developer ls ~/db
ls: /Users/Yannick/db: No such file or directory
➜  Developer ls ~/db
yeban commented 4 years ago

I think the setup script should do the same for 'path to blast binaries' as well and can be done by defining a little helper method that prompts and re-prompts the user for input till valid (i.e., file exists and is a directory).

Iain-S commented 4 years ago

I have submitted a PR for this (though I still need to get the tests passing): #499