SequenceServer 1.0

Hey all,

After incorporating feedback received from you (thanks!) and squashing a bunch of bugs, we are pleased to announce the stable release of SequenceServer 1.0.

To install:

$ gem install sequenceserver

We have made two important changes since the pre-release.

  1. Moved links for each hit to the top.
  2. Indicate HSP number next to each HSP.

An up to date list of all features of the new SequenceServer can be found on our website -

(also see pre-release announcement -!topic/sequenceserver/vuuRHmqg6YA)

We hope you enjoy using the new SequenceServer. We will continue to improve SequenceServer with bug fixes and new features through upcoming releases. Stay tuned! Spread the love!

– Priyam

Hi there!
Is there are safe way to upgrade from the “previous version” that we installed for our lab a year ago?
Will we loose the links we added to the output ?


Hey Mark,

SequenceServer won’t complain about the config file. But for the links, yeah you will have to migrate those to the new scheme. It’s very simple though. Shouldn’t be an issue.

Once you have created a links.rb file based on the new scheme, just add it to SequenceServer config like so:

sequenceserver -s -r /path/to/links.rb

(links.rb can be named anything. should just have .rb extension)

Then run SequenceServer and you should be good to go.

For help with how link generators work see:

– Priyam

Thinking of a very simple example:

def custom_hyperlink_line(params)
id = params[‘id’]
return “{id}

will become

def google_link
:url => “{id}”,
:title => ‘Search Google for hit id’

  • Your logic for link generation remains the same.
  • id, databases, etc. are not passed as method argument. Instead they are just accessible within the scope of link generator method.
  • You return a Hash instead of String.
  • Previously if you were generating more than one link, you would do everything in the same method. Now you split it into several methods: google_link, ncbi_link, jbrowse_link, etc.

I hope this will be enough to get you started with migrating to the new SequenceServer. Let us know if you encounter any issues.

– Priyam

Thanks so far. Now, how do I manage to install the new version in parallel to our old version in order to make the transition as smooth as possible?

Solved this by duplicating the VirtualMachine running our server for a test upgrade.Installation of Sequenceserver 1.0.2 went fine.
Now if I launch it, sequenceserver will complain that I have an outdated version of Blast+ (2.28+).
So I agreed to download the latest release. This worked also, but unpacking the download fails.

This is happening with ubuntu server 14.04 (am I the only one experiencing this?)


Error messages below:

RUBY_PLATFORM x86_64-linux
(shows curl download progress until download is finished)
gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Failed to install BLAST+

So I agreed to download the latest release. This worked also, but unpacking the download fails.

I bypassed the BLAST+ installation issue by installing it manually and telling sequence server the path.
Now regarding the custom links issue - we took our old customizations.rb and tried to transfer the custom links to your new scheme.
Unfortunately it did not work out yet. We do not get any error messages, but we also do not get any links from our hits to the online DB (wormbase).
Please have a look at the content of our “customlinks.rb”:


def construct_custom_sequence_hyperlink(options)

## Example:

## sequence_id comes in like “psu|MAL13P1.200 | organism=Plasmodium_falciparum_3D7 | product=mitochondrial”

## output: “

ce_matches = sequence_id.match(/^.|.(WBGene\d+)/)
cb_matches = sequence_id.match(/^.|(CBG\d+)/)
ce_extragenic_matches = sequence_id.match(/^.
if ce_matches
#if the sequence_id conforms to our expectations

All is good. Return the hyperlink.

ret = {
:url => “{ce_matches[1]}”,
:title => “Go to Wormbase gene page”
return ret
elsif cb_matches
ret = {
:url => “{cb_matches[1]}”,
:title => “Go to Wormbase gene page”
return ret
elsif ce_extragenic_matches
posstart = ce_extragenic_matches[2].to_i
posend = ce_extragenic_matches[3].to_i
location = ce_extragenic_matches[1]+":"+(posstart-500).to_s+"…"+(posend+500).to_s
ret = {
:url => “{location}”,
:title => “view this region in Wormbase Genome Browser”
return ret

Parsing the sequence_id didn’t work. Don’t include a hyperlink for this

sequence_id, but log that there has been a problem.

settings.log.warn “Unable to parse sequence id `#{sequence_id}’”

Return nil so no hyperlink is generated.

ret = {
:url => “http://www.{sequence_id}”,
:title => “non-functional”
return ret


After fiddling around a while, I now know that it is possible to run several versions of sequence server on the same machine in parallel as long as You direct their output to different ports. I wouldn’t know though how to give each of them their own configs if I had to…

sequenceserver -c path/to/config

You can specify port in the config file.

It’s easier to run several instances of SequenceServer in parallel with Apache+Passenger, than running one each on different port (and directly exposing them publicly or through a reverse proxy).

I will try and get back to you on the hit links stuff later this week.

– Priyam

Hey Mark,

Regarding link generators, you will first ned to wrap the function construct_custom_sequence_hyperlink in SequenceServer::Links module, like so:

module SequenceServer
module Links

def construct_custom…

The function won’t be loaded by SequenceServer otherwise. And like I said before, you will also have to add ‘customlinks.rb’ to your config by running ‘sequenceserver -s -r /path/to/customlinks.rb’)

Link generators don’t take any argument, so remove options argument.

You can get the sequence id either by invoking id or accession method within link generator. Most of the times the value returned by the two methods will be the same*. You should check this for yourself by adding

puts “id: #{id}, acc: #{accession}”

as the first line of construct_custom_sequence_hyperlink method. The values will be printed on the console when you BLAST. Accordingly tweak the regex.

You can access rest of the defline in the link generator by invoking title method.

  • It depends on BLAST. In as far as I understand they will be different only when sequence id in your FASTA file contains a pipe character. Like is the case of nr database.

– Priyam