$ show wurmlab/sequenceserver
SequenceServer is a Ruby/Sinatra web application that provides a graphical interface for running NCBI BLAST+ and DIAMOND sequence similarity searches against custom databases. It manages BLAST database formatting, job submission with background execution, result parsing, and interactive visualization of alignments using D3.js and Circos-style plots. The backend uses a thread pool for concurrent job processing, YAML-based job persistence, and a plugin system for extensibility. The frontend is built with React and includes components for database selection, query input, and result exploration with export to SVG/PNG. The application is designed for bioinformatics researchers who need a self-hosted BLAST server with a modern web UI, supporting multiple BLAST programs (blastn, blastp, blastx, tblastn, tblastx) and DIAMOND. It includes comprehensive test suites for multiple BLAST versions and CI/CD pipelines for Docker and AppImage deployment.
The LLM identified 4 files worth highlighting for reuse:
A simple, self-contained thread pool implementation for executing BLAST jobs in the background. It manages a fixed number of worker threads, a job queue, and provides start/shutdown lifecycle. The class is isolated (no internal dependencies beyond Ruby's Thread and Queue) and can be extracted for any Ruby project needing bounded concurrent task execution.
A utility class that recursively zips a directory into a ZIP file using the rubyzip gem. It handles directory traversal, file addition, and stream writing. The class is decoupled from the rest of the application and can be reused in any Ruby project requiring directory-to-ZIP conversion.
A JavaScript higher-order component (HOC) that wraps any chart class (e.g., Kablammo, HitsOverview, Circos) to add collapsible headers, SVG/PNG export buttons, and responsive redraw on window resize. It uses a consistent interface (static methods like canCollapse, name, className, graphId, dataName) and is independent of the specific chart implementation. This pattern can be extracted for any web project needing reusable chart wrappers with export functionality.
A utility module that executes shell commands with robust handling: forking, temp file redirection for stdout/stderr, PATH resolution, and environment variable control. It provides a clean Ruby interface for running external binaries (like BLAST+) and capturing output. The module has no internal dependencies and can be reused in any Ruby project requiring reliable subprocess execution.