USEARCH supports a server mode designed for use in web servers and other environments where users submit queries that are used to search a large database. Server mode works as follows. 1.
Database is loaded into memory. Server mode is specified using the -server option, which was introduced in version 6.0.178. The -server option is supported only by the ublast command. Support for other commands could be added. If -server is specified, the query name (argument to the -ublast option) is a directory name. This directory is polled for filenames ending with the .q extension. If a file named stop.q is found, USEARCH exits. Any other .q file is expected to be a query specifier (see below). If stop.q is found, USEARCH exits as soon as the current search is completed even if other .q files are present. The -query_seqtype option must be set to nucleo or amino to specify the alphabet that will be used for query sets. All query files must use the same alphabet. Query specifier files
The output directory must already exist. Output files are written to this directory. For example: Command line: Create a query specifier file: In this example, the output file will be named /serverfiles/results/out123/results.b6. Since output file names are the same for all queries, the output directory name should be unique to avoid conflicts. When a query specifier file has been
read by USEARCH, it is renamed from *.q to *.x before starting the search.
When a search has completed, a file named done.q is written to the output
directory. This allows detection of incomplete searches that must be
restarted if e.g. the server computer crashes. |