- Technical Note
- Open Access
blastjs: a BLAST+ wrapper for Node.js
BMC Research Notes volume 9, Article number: 130 (2016)
We developed blastjs, a Node.js library that wraps the search tools of the BLAST+ suite and thus allows to easily add significant functionality to any Node.js-based application.
The algorithms of the BLAST-family [1–3] are the most widely employed methods for efficiently searching biological databases. Biologists employ BLAST as a first choice when performing sequence analysis because of the widely available public interfaces, in particular NCBI BLAST (http://blast.ncbi.nlm.nih.gov) . Developers of genomics and bioinformatics resources therefore seek solutions to provide BLAST functionality to their user community. Various customisable server-side versions of BLAST that present web interfaces have been developed, including wwwblast (http://0-www.ncbi.nlm.nih.gov.brum.beds.ac.uk/staff/tao/URLAPI/wwwblast) , mimicking the public interface at the NCBI-BLAST website , ViroBLAST , blastGraphic (http://gmod.org/) , SequenceServer (http://sequenceserver.com), and galaxy_blast . Downstream tools such as BLASTPLOT  facilitate the assessment of BLAST results via output processing and/or visualisation.
As a community-driven project and recent web standard, Node.js is very well maintained and under constant development. Its active developer base produces highly useful modules such as persistent client–server connections (socket.io) or mobile application development (meteorJS).
We designed blastjs for simplicity and user-friendliness. To provide access to the individual BLAST+ applications, we created individual functions to easily access blastn, blastp, blastx, tblastn, tblastx, and makeblastdb (cf. Table 1) from a locally installed BLAST+ csuite. The wrapper functions were created to be asynchronous via callbacks, thus guaranteeing a smoother user experience, as the application does not lock up while a search is running. blastjs can automatically download and install the latest BLAST+ version from the NCBI website. However, as differences between versions of BLAST+ could lead to differences in scientific results, this feature has to be executed by the user in order to keep control over the used BLAST+ version.
The wrapped BLAST+ applications can be accessed via an application programming interface (API). blastjs utilises the Node.js child_process.exec() API function (https://nodejs.org/api/child_process.html) to interact with the BLAST+ applications. The call to child_process.exec() spawns a new system process (supervised by the Node.js framework), which executes the specified BLAST+ program and communicates with it via stdin, stdout, and stderr.
As the overhead for Node.js is small, using BLAST+ via blastjs requires similar system resources to running BLAST+ applications from the command line. Hence, the number of BLAST+ processes is only limited by the underlying hardware.
In order to be able to quickly generate custom databases, especially by an end user, we have wrapped the BLAST+ makeblastdb tool, which can be used via an API function as well.
Results and discussion
To our knowledge, blastjs is the first solution for including BLAST+ database searches into Node.js-based web applications. The library profits from Node.js’s high performance in terms of speed and efficiency and can be easily integrated into any Node.js project. As blastjs simply provides an API to interact with the BLAST+ suite, GUI development is highly customisable. For an example user interface see Fig. 2.
Our blastjs library provides an easy and effortless way for bioinformatics application developers of adding significant functionality (in form of the five most commonly used BLAST+ applications) to bioinformatics applications based on Node.js. We employ blastjs for in-house applications such as the genomics data resource geefu.io (http://geefu.io). As an Open Source project under the MIT license, blastjs is freely available for users to fix issues or request or add new features. Potential extensions for blastjs could be the implementation of wrappers for other BLAST-applications such as MegaBLAST or PSI-BLAST.
Availability and requirements
Project name blastjs
Project home page https://github.com/teammaclean/blastjs
Operating system(s) platform-independent
Other requirements Node.js
Any restrictions to use by non-academics None
Altschul SF, Gish W, Miller W, Myers EF, Lipman DJ. Basic local alignment search tool. J Mol Biol. 1990;215(3):403–10.
Altschul SF, Madden TL, Schäffer AA, Zhang J, Zhang Z, Miller W, Lipman DJ. Gapped BLAST and PSI-BLAST: a new generation of protein database search programs. Nucleic Acids Res. 1997;25(3):3389–402.
Camacho C, Coulouris G, Avagyan V, Ma N, Papadopoulos J, Bealer K, Madden TL. BLAST + : architecture and applications. BMC Bioinform. 2009;10:421.
Madden TL. The BLAST sequence analysis tool. In: The NCBI Handbook. 2002. (Internet).
Deng W, Nickle DC, Learn GH, Maust B, Mullins JI. ViroBLAST: a stand-alone BLAST web server for flexible queries of multiple databases and user’s datasets. Bioinformatics. 2007;23(17):2334–6.
O’Connor BD, Day A, Cain S, Arnaiz O, Sperling L, Stein LD. GMODWeb: A web framework for the generic model organism database. Genome Biol. 2008;9:102.
Priyam A, Woodcroft, BJ, Rai V, Munagala A, Moghul I, Ter F, Gibbons MA, Moon H, Leonard G, Rumpf W, Wurm Y. Sequenceserver: a modern graphical user interface for custom blast databases. bioRxiv. 2015.
Cock PJA, Grüning BA, Paszkiewicz K, Pritchard L. Galaxy tools and workflows for sequence analysis with applications in molecular plant pathology. PeerJ. 2013;1:167.
Herrera-Galeano JE, Frey KG, Cer RZ, Mateczun AJ, Bishop-Lilly KA, Mokashi VP. BLASTPLOT: a PERL module to plot next generation sequencing NCBI-BLAST results. Source Code Biol Med. 2014;9:7.
Yachdav G, Goldberg T, Wilzbach S, Dao D, Shih I, Choudhary S, Crouch S, Franz M, García A, García LJ, Grüning BA, Inupakutika D, Sillitoe I, Thanki AS, Vieira B, Villaveces JM, Schneider MV, Lewis S, Pettifer S, Rost B, Corpas M. Cutting edge: anatomy of BioJS, an open source community for the life sciences. eLife 2015;4:07009.
MP conceived and implemented blastjs and made the software publicly available. DM and CS aided in designing blastjs and wrote the manuscript. All authors read and approved the final manuscript.
CS thanks G. Rallapalli for helpful discussions and critically reading the manuscript.
The authors declare that they have no competing interests.
The Gatsby Charitable Foundation.
About this article
Cite this article
Page, M., MacLean, D. & Schudoma, C. blastjs: a BLAST+ wrapper for Node.js. BMC Res Notes 9, 130 (2016) doi:10.1186/s13104-016-1938-1
- Sequence analysis
- Database search
- Web services
- Application development