How to generate Links in WWW BLAST server ??

David Coornaert dcoorna at
Wed Jan 9 07:48:35 EST 2002

hmm it seems to me that
using ncbi's version,
u'll have links in the output, ONLY if your databank entries
have valids "gi" in their definition line
make urself a very small databank of a few seq
each of the kind :

 >gi 0001|whatevergene001|unfortunatilis microbus gene xyz
 >gi 0002|
etc etc

formatdb this, and you're ok ! (if it's ok, formatdb will generate two 
extra files as compared to banks without "gi")
of course the links that any-blast-prgm will generate, will all point 
toward NCBI's fetchentry script, hence, you'll still have to substitute 
the output with one-of-yours script able to "fastacmd" the appropriate 
gi from the appropriate db..since the gi you supplied are strictly yours.

Hope it helps,
David Coornaert

Simon Andrews wrote:

> Ingo Klein wrote:
>>Hi yall,
>>I'm setting up a WWW BLAST server for a friend.
>>The Searchengine is up and running happy.
>>The only problem is :
>>If I search a sequence in the NCBI-Test database, I get links for
>>further information about the found sequence. If I do the same with
>>our generated database, these links are missing...
>>Any Help,Links,Sources or what ever whould be nice...
> Funny you should ask - I'm just doing this myself!  In our case I have a
> subroutine in the blast CGI script which monitors the blast output
> stream and looks for a particular pattern (whatever describes the
> sequence identifiers in your database).  Where it finds a sequence name,
> it substitutes it for a link containing the same text, with a hyperlink
> to another CGI script to get more info.
> In our case, the link is to another internal script, but you could link
> out to NCBI or whatever you want.
> I don't know what language you're using to write your CGI in, but in
> Perl the relevant bit of our script looks like (this isn't exact and is
> untested, but should give you an idea);
> while (<PIPEOUTOFBLAST>) {
> 	if (/Pattern_for_seq_name/){
> 		s#(Pattern_for_seq_name)#<a href="$1>$1</a>#;
> 	}	
> 	print;
> }
> This assumes that you are running blastall with the -T option, so you
> are generating HTML anyway.
> Hope this helps
> Simon.

More information about the Bio-www mailing list