HowTo? Have a single SS instance serve variable configurations of databases


I have seen discussions involving hosting multiple SS instance, each serving from different .sequenceserver.config files.

I would instead like a single SS instance to (optionally) accept a URL parameter that allows to override the default configuration by specifying an alternate file-system path.

With such a scheme, users could compose URLS like:

or maybe more simply:

This would allow a single SS (provisioned centrally, and augmented with HPC load balancing capabilities) to serve the varied labs at my institute by allowing reconfiguration “on the fly” to focus the UI on project-specific sets of blast databases.

Do you see that something like this is already possible with creative deployment of SS…
… or might it be possible without a significant overhaul to the SS configuration scheme…
… or are there architectural considerations I am ignorant of that make implementing such an capability unreasonable proposition?

Alternatively, and perhaps more simply, if SS could take a URL encoded regular expression parameter and limit list of displayed databases to only those which it matches.’/serverside/path/to/my/blastdb/*’

This would continue to centrality of a single server-side configuration. Such URL might look like:

Thanks for your consideration…


Malcolm Cook
Stowers Institute for Medical Research
Kansas City, MO

The following snippet in routes.rb serves the search form.

get ‘/’ do
erb :search, :locals => { :databases => Database.group_by(&:type) }

You could,

get '/‘ do
dbs = { |d| =~ params[:d] }
erb :search, :locals => { :databases => dbs.group_by(&:type) }

params contain query data (stuff after ? in url). returns absolute path to db file.

You can extend that to be more specific:


  • db1/
  • db2/
    `- db3/

(set ~/sequencedb as database dir in SequenceServer)

dbs = { |d| (‘/‘) - SequenceServer.config[:database_dir].split(‘/‘)).first == params[:d] }

… so that it doesn’t select databases based on the value of params[:d] anywhere in the path.

You can get creative in several ways with little knowledge of Ruby and SequenceServer.

If you want, you can do this without having to modify SequenceServer’s code. Load following file with -r command line option or :require: key in config file.

module SequenceServer
class Routes

Remove built-in ‘/‘ route.