SequenceServer Beta
Easily set up a local BLAST web server to search & share sequence data.
Sequence data is generated at increasing rates. However it is challenging to effectively share and query such data. Deploying complex solutions such as GMOD is often overkill and publicly available front ends for BLAST such as NCBI's wwwblast are difficult to use or install.
SequenceServer is an efficient and elegant alternative: SequenceServer lets you rapidly set up a BLAST+ server with an intuitive user interface for use locally or over the web.
SequenceServer aims to become "The iPod of Blast searching". This beta version is fully functional and has already deployed for several databases (eg: BLAST ant genomes).
SequenceServer is free for academics. Its source code is available on GitHub.
Easy to use:
- clutter-free design
- intuitive and helpful web interface: automatic sequence type detection that assists users in choosing appropriate BLAST method and database types
- automatically adds links to download sequences of BLAST hits
- support for advanced options.
Rapidly deployed:
- assisted batch formatting of BLAST databases (with sequence type detection)
- automatic discovery of formatted BLAST databases during startup
- uses ruby's internal web servers (on any open port) or Apache/Nginx
- add custom hyperlinks to identified hits (to your genome browser or custom database)
- open source & freely available for non-profits.
Demo server
Ant genome sequence blast search: running a pre-release version of SequenceServer.
Requirements
- ruby (tested with 1.8.7, 1.9.2, and 1.9.3) (if you have git, get ruby with RVM).
- NCBI Blast+ (works best with 2.2.25, which was released March 2011; can use system-wide blast installation or a specific directory)
- A folder containing FASTA sequence files
- Basic command-line (UNIX) skills
Download & Setup in just a few minutes
Installing SequenceServer is extremely simple: download the latest release, and tell it the location of your BLAST database and NCBI BLAST+ binaries.
Installation
Install using Gem (experimental)
Run the following from a command line to get the latest release of SequenceServer.
$ gem install sequenceserver
If that doesn't work, try sudo gem instead of gem. And subsequently follow the instructions on screen.
Install from Source
- Download the latest SequenceServer release: Download
- Decompress the downloaded file, and cd to that directory in a terminal.
- Run the following in the terminal to install SequenceServer's dependencies:
$ gem install bundler $ bundle install
- Execute following in the terminal:
$ bin/sequenceserver
And follow the instructions on screen.
Updating
Gem release (experimental)
Run the following from a command line to update to the latest release of SequenceServer.
$ gem update sequenceserver
If that doesn't work, try sudo gem instead of gem. And subsequently follow the instructions on screen.
Configuration
SequenceServer needs to know the location of the BLAST+ binaries, and the
BLAST database. This is accomplished by providing a .sequenceserver.conf in the
user's home directory.
# .sequenceserver.conf bin: ~/ncbi-blast-2.2.25+/bin/ database: /Users/me/blast_databases/
SequenceServer automatically generates a fully commented configuration
file (.sequenceserver.conf) in the user's home directory if it
can't find one. Uncomment the relevant lines (i.e remove the # signs), edit
the values, and run SequenceServer.
If the databases don't already exist, create them.
Setting up BLAST databases
To set up BLAST databases from a directory of FASTA sequence files, use sequenceserver's format-databases subcommand:
$ sequenceserver format-databases
It will automatically pick up the database directory from the configuration file. Or pass the database directory from command line:
$ sequenceserver format-databases directory_with_fasta_files
The script will assist you by:
- finding FASTA files in
directory_with_fasta_files(and in subdirectories too) - detecting the sequence type of each file
- asking you to name each database
- subsequently running the appropriate
makeblastdbcommands.
Alternatively, manually set up BLAST databases from single FASTA sequence files. In the directory containing the FASTA file, run:
$ makeblastdb -dbtype <db type> -title <db title> -in <db> -parse_seqids
Where,
<db type>is eitherprot, ornucldepending on the type of sequence<db title>is what users will see<db>is the path to the FASTA file-parse_seqidsis required to generate links for downloading search hits (yes, it's a bit slow on large files).- Additional options at
makeblastdb -help.
Deploying SequenceServer on Apache or Nginx with Phusion Passenger
If you would like to deploy BLAST as part of a standard website, and have it show up as a normal webdirectory, SequenceServer can be deployed on Apache or Nginx with Phusion Passengerâ„¢ (a.k.a mod_rails or mod_rack).
Setting up Phusion Passengerâ„¢
Install passenger gem:
gem install passenger
Install passenger module for Apache/Nginx module
# for apache2 passenger-install-apache2-module # for nginx passenger-install-nginx-module
Follow instructions on screen. The installer will let you know of any missing software that is required to setup passenger, and also how to install them. Towards the end of installation, after the installer has finished building modules corresponding to your webserver, it will ask you to edit your webserver configuration files and some lines, so that your webserver knows how to load passenger.
For Apache, you can do something like this:
- Create a new file called
passenger.loadin/etc/apache2/mods-available, and add the lines there. - Run
a2enmod passenger. This will ask you to restart apache2 with instructions on how to do the same. On my machine, I had to run/etc/init.d/apache2 restart
Deploying Sequence Server
Apache Root URI (eg:antgenomes.org or localhost).
<VirtualHost *:80>
ServerName localhost
DocumentRoot /home/yeban/src/sequenceserver/public
<Directory /home/yeban/src/sequenceserver/public>
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>
Apache Sub URI (e.g.: antgenomes.org/blast or localhost/sequenceserver).
<VirtualHost *:80>
ServerName localhost
DocumentRoot /var/www/
<Directory /var/www>
Allow from all
</Directory>
RackBaseURI /sequenceserver
<Directory /var/www/sequenceserver>
Options -MultiViews
</Directory>
</VirtualHost>
FAQ Frequently Asked Questions
- How do I cite SequenceServer?
- A manuscript describing SequenceServer is in prep. In the mean time, please cite the following reference: "Priyam A., Woodcroft B.J., Wurm Y in prep. SequenceServer: BLAST searching made easy".
- What are the alternatives to SequenceServer?
- There are several. But they are suboptimal because they look like they're from the last millenium. And installing them is challenging.
- NCBI's wwwblast hasn't been maintained in years and is difficult to set up.
- ViroBLAST requires Apache & MySQL.
- GMOD's BLAST Graphic Viewer hasn't been maintained in years.
- BLASTstation is only for local BLAST.
- Is there a demo server?
- SequenceServer provides BLAST for ant genomes
- What is a BLAST database? Can I make a custom BLAST database?
- The BLAST program doesn't understand FASTA files. But BLAST
includes the
makeblastdbtool that reformats FASTA into the optimized BLAST-friendly format. Usemakeblastdborsequenceserver format-databasesto create a custom BLAST database. - Can I use a preformatted BLAST database? Can I use alias?
- Preformatted BLAST databases can also be used with SequenceServer. Most preformatted database ar split between multiple files (like .00, .01...). Thanks to Mark Anthony Gibbins, SequenceServer can correctly understand these.
- If you use a custom
.nalor.palBLAST database alias file, and copy this alias file as well as the linked databases into SequenceServer'sdbdirectory, SequenceServer will display both the alias and the linked databases. If you want to display only the alias, remove the linked databases fromdb, then edit theDBLISTline in the.palor.nalfile so that it contains the complete path of each of the database files (e.g:DBLIST species1_custom_blast_db species2_custom_blast_databasemay become:DBLIST /Users/blastuser/mydbs/species1_custom_blast_db /Users/blastuser/mydbs/species2_custom_blast_database) - What is the difference between BLAST and BLAST+? What about WU-BLAST or AB-BLAST?
- The initial BLAST has been rewritten several times - most recently by NCBI as BLAST+. NCBI now use and recommend using BLAST+. The BLAST+ publication explains why BLAST+ is easier to use & faster than the old "legacy" BLAST. WU-BLAST is now commerical and called AB-BLAST. There is probably no good reason to use either. Note that the output formats change slightly from one BLAST implementation to the next.
- NCBI's BLAST+ is most actively developed, just use it. SequenceServer only supports BLAST+.
- I swear I installed BLAST but SequenceServer can't find it!
- Make sure you downloaded NCBI's Blast+ (Blast Plus!) and not legacy BLAST. The old legacy BLAST had programs such as
blastallandformatdb. The programs in BLAST+ have names likemakeblastdb,blastn,tblastx... - Also, check that your SequenceServer configuration file points at the
bindirectory, e.g.:/Users/stevejobs/software/ncbi-blast-2.2.25+/bin/ - Why doesn't sequence retrieval work?
- Probably because you forgot the
-parse_seqidsargument when runningmakeblastdb(or they were formatted using legacyformatdb). Blast+ 2.2.24 and later indicate that when-parse_seqidswas not used by leaving a space between>and hit identifiers (eg:> db_sequence001instead of>db_sequence001). - How can I add custom links to hits?
- Easy. Edit the
customisation.rbfile and read the examples it provides. To add a single link, uncomment and edit theconstruct_custom_sequence_hyperlinkmethod; to add multiple links edit theconstruct_custom_sequence_hyperlinking_linemethod. - How do I tell SequenceServer to read a different configuration file?
- By using
--configcommand line switch. For example:$ sequenceserver --config sequenceserver_ants.conf
You will need to set it inconfig.rufor Rack based deployment:SequenceServer::App.config_file = 'sequenceserver_ants.conf'
- How do I change the server port?
- SequenceServer will by default be accessible on port 4567 at http://localhost:4567/ .
Change the port by editing
~/.sequenceserver.conf. - Do I need to install Apache?
- SequenceServer automatically uses ruby's internal web servers. No
need for Apache. By default it uses Webrick. Installling Thin (
gem install thin), or Mongrel (gem install mongrel) can improve performance. - Can I integrate SequenceServer into an Apache or Nginx server?
- Yes. See above
- Should I activate hyper-threading to give BLAST more virtual cores?
- Yes.
- Which technologies does SequenceServer use?
- SequenceServer uses NCBI BLAST+, Sinatra, and jQuery.
- Is SequenceServer free? Can I redistribute it?
- Check our LICENSE.txt file. Basically, it's free if you're an academic or a non-for-profit organization.
- Can I have the source code? Can I contribute?
- SequenceServer's source code is on GitHub. Downloading, forking, pulling, filing issues and contributing is most welcome!
- Can SequenceServer do XXX? Why doesn't YYYY work? It's ugly, it crashes!?!?
- First, run
gem updateorsudo gem update. - If things are still weird, please keep in mind that SequenceServer is still in beta. Our issues tracker logs development activities. feature indicates what is in the pipeline, and bugs indicates upcoming fixes. Feel free to add comments, vote, report bugs, request features and contribute code. All contributions, patches and pulls are welcome.
- I need help! Who should I contact for support?
- Contact the authors or the mailing list that will soon be set up.
Contributors
- Yannick Wurm
- is an evolutionary biologist using genomics tools to study the evolution of ant societies (eg: antgenomes.org, fire ant genome, competing fire ant queens). He will be at Queen Mary University London from January 2012.
- Anurag Priyam
- is a software developer primarily interested in applied computing and web infrastructure development. He is currently pursuing his undergraduate studies at the Indian Institute of Technology, Kharagpur.
- Cedric Wurm
- Ben J Woodcroft
- is a PhD student in Melbourne studying protein trafficking in apicomplexan parasites including malaria (e.g. ApiLoc), as well as maintaining a general interest in protein and genome evolution. From February 2012 he will be at the Australian Centre for Ecogenomics.
- Maybe you?
- The SequenceServer team will happily accept contributions. Please get in touch to figure out where you could fit in. Cheers!
Users include:
