Which DB is a sequence hit from?

Is there an easy way that I could customise Sequence Server to display which blast database a sequence is from?

I would like it to appear either in the blast hits table (next to “Sequences producing significant alignments”) or as a piece of information next to the hit name below that?

The very easy option, of course, is to rename all the accessions in each DB to include taxon names but I don’t want to do that as they are used elsewhere…

I tried extending the link.rb example with the below, but not sure I am doing it right, it would be a dead link of course but at least it would display the DB next to Sequence and Fasta…

module SequenceServer
module Links
def sequence_viewer
hit_database = whichdb.map(&:id).join(’ ')
url = encode hit_database
{
:order => 3,
:url => url,
:title => hit_database
}
end
end
end

Which just gives me something similar to “6c835c8f2342036fe808444731ec916c” but it removes the “Sequence” view…

Any help appreciated…

Best,

Guy

That’s a nice hack.

Regarding “6c835c8…” appearing in the report, change :id in “hit_database = whichdb.map(&:id)” line to :title. (Using :name will give you the full path.)

Regarding sequence viewer link disappearing, rename the function to something else, perhaps ‘showdbtitle’. Using the name ‘sequence_viewer’ overrides SequenceServer’s sequence viewer link generator.

If the link is indeed not supposed to work, better to set :url to ‘’ and add :class => ‘disabled’ in the Hash returned by your link generator function.

– Priyam

Oh brilliant! :slight_smile: Yeah all of that worked nicely :slight_smile: You can see the “1) Stramenopiles” database name next to the FASTA download link. Very neat. :slight_smile:

Thanks kindly!