IUBio GIL .. BIOSCI/Bionet News .. Biosequences .. Software .. FTP

[TEACHING] Installation of SRSWWW under CERN httpd 3.0 - Part 2

Nicole Redaschi redaschi at comp.bioz.unibas.ch
Mon Apr 24 11:45:10 EST 1995

[ Article crossposted from bionet.software.www ]
[ Author was Nicole Redaschi ]
[ Posted on Mon, 24 Apr 1995 09:23:05 GMT ]

		  Installation of SRSWWW under CERN httpd 3.0
			Part 2: Installation of SRS

This documentation contains step-by-step instructions, for the basic (!) 
installation of the SRS software package on UNIX platforms. For details, see the 
SRS manual at the URL http://www.embl-heidelberg.de/srs/srsman.html.

1. Getting the Program
Go to the directory where you want to install SRS (in this example called "SRS").

% 	cd SRS

The SRS package is available from the "ftp.embl-heidelberg.de" anonymous ftp 
account. At the date of this writing, the most recent version of SRS 
("srs4_04.tar.gz") is located in the directory "pub/software/unix/srs". 
(If you do not find the SRS package there, 'get' the INDEX first and search for 
the keyword "srs".) 'ftp' to "ftp.embl-heidelberg.de" and go to the directory 
"pub/software/unix/srs", 'get' the file "srs4_04.tar.gz" and 'quit'. 
Uncompress ('gunzip' requires modification of the filename extension!) and 
untar the file. You will get the directory "srs4_04".

%	ftp ftp.embl-heidelberg.de
Name:	anonymous
ftp>	cd pub/software/unix/srs
ftp>	ls -lsa
ftp>	bin 					 
ftp>	get srs4_04.tar.gz 
ftp>	quit
%	mv srs4_04.tar.gz srs4_04.tar.z
%	gunzip srs4_04.tar
%	tar xvf srs4_04.tar

2. Customizing the ODD-Files (".sdl")
All ".sdl" files are located in the directory "srs4_04/odd". Before you can 
start to compile the programs, you have to edit the file "srsdb.sdl":

1.	Customize the object "#environment" with the name "unix".
2.	Remove or outcomment ("!") all "#libenv" definitions of databanks you 
	do not have at your site.
3.	For each databank that you would like to index with SRS, modify the 
	given "#libenv" definition if necessary: each databank must be 
	associated with the name of the directory that contains the flatfiles.
	For databanks not listed in the default "srsdb.sdl" file, add a new 
	"#libenv" definition to the object "#environment" and a new "#libid" 
	definition to the object "#srsdb" (set "n" to a number between 1 and 
	255 that has not been used yet.)

-------------------------------- "srsdb.sdl" -----------------------------------

#environment /name=unix
   #libenv /lib=@SWISSPROT_DB  /dir="/data/swissprot/"
   #libenv /lib=@PIR_DB        /dir="/data/pir/"
!   #libenv /lib=@PIRALN_DB     /dir="/data/pir/"
   #libenv /lib=@EMBL_DB       /dir="/data/embl_dna/"
   #libenv /lib=@EMNEW_DB      /dir="/data/emnew/"
   #libenv /lib=@XEMBL_DB      /dir="/data/emnew/"
   #libenv /lib=@XXEMBL_DB     /dir="/data/emnew/"

    #libid /n=1 /library=@SWISSPROT_DB
    #libid /n=2 /library=@PIR_DB
    #libid /n=3 /library=@EMBL_DB 
    #libid /n=4 /library=@EMNEW_DB
    #libid /n=10 /library=@XEMBL_DB
    #libid /n=11 /library=@XXEMBL_DB

-------------------------------- "srsdb.sdl" -----------------------------------
Some sequence databanks have a special format when used under GCG (EMBL, 
Genbank, Swissprot). For each of these you need to edit the respective ".sdl" 
file ("embl.sdl","genbank.sdl", "swissprot.sdl"). 

1.	Change the file name(s) that are defined in the "#file" objects.
	(Eg. the EMBL file "est" is usually called "em_est" in the GCG format)
2.	Modify the "#libformat" definition: change the attribute "file_type"
	so that it points to "GCGREF_FILE" and "GCGSEQ_FILE". All you need to
	do is to move the outcomment character ("!").

-------------------------------- "embl.sdl" ------------------------------------

#library /id=%EMBL_DB 
    /group=@SEQUENCE_LIBS /name=EMBL /logicname=EM, EMBL 
    /format=@EMBL_FORMAT /cachesize=2048 /maxIndexSizeKb=3200
!    #file /name=est 
!    #file /name=patent
!    #file /name=sts 

!names of the files in GCG format
    #file /name=em_est /logicname=EM_EST    
    #file /name=patent /logicname=EM_PAT
    #file /name=em_sts /logicname=EM_STS

#libformat /id=%EMBL_FORMAT /parser=@EMBL_PARSER
!    /file_type=@EMBLREF_FILE, @EMBLSEQ_FILE 
!GCG format 
    /file_type=@GCGREF_FILE, @GCGSEQ_FILE 

-------------------------------- "embl.sdl" ------------------------------------
If you have added new databanks to the file "srsdb.sdl", you need to provide 
corresponding ".sdl" files for the new databanks! Do not start from scratch, 
look first what you can use from the existing ".sdl" files. Whenever possible
copy and paste from what is there and modify where required.
If your new databank has the same format as one of those for which you already 
have an ".sdl" file" you may simply add the following things to this file: 

1.	a "#library" definition for the new databank
2.	a "#libformat" definition for the new databank
3.	"#link" definitions if desired

As an example, see the file "embl.sdl" which contains data for both EMBL and 

3. Compilation
Now, you can start with the compilation of the programs. Go to the SRS root 
directory ("srs4_04") and invoke 'srsinstall'. This script will ask you
first for the 'make' and 'cc' commands, then it will compile all programs and
create a new binary file with all the data defined by the ".sdl" files. (If you 
get an ERROR message, you have to edit the appropriate file and recompile the 
To build the indices, 'source' the file "etc/prep_srs" and issue the command
'srscheck'. (If you get an ERROR message, you have to edit the appropriate file 
and then run 'srssection' to recompile the ".sdl" files.) If all worked fine, 
issue the command 'srsupdate' to start the indexing.
% 	cd srs4_04
%	srsinstall all
...	[make]							(press return)
...	[cc]							(press return)
(%	srsinstall all)						
%	source etc/prep_srs
%	srscheck
(%	srssection)
(%	srscheck)
%	srsupdate

To keep the indices up to date automatically, you can create a crontab file with
the three commands 'source /AbsolutePath.../etc/prep_srs', 'srscheck' and 

4. Installation of SRSWWW under CERN httpd 3.0
(See Part 1 for the installation of CERN WWW server)

On the WWW side:

Go to your httpd "ServerRoot" directory (in this example "WWW/httpd_docs") and 
add two symbolic links (srs, srs_map) which point to the SRS home directory 

%	cd WWW/httpd_docs
%	ln -s /AbsolutePath.../srs4_04/www srs
%	ln -s /AbsolutePath.../srs4_04/www srs_map

Now, you have to edit your httpd configuration file (eg. "httpd.conf" or 
"caching.conf"). Add the following Map- and Exec-directives:

---------------------- "httpd.conf"-/"caching.conf"-begin ----------------------

	Map     /srs/        			/srs_map/index.html
	Map     /srs/*.html  			/srs_map/*.html
	Map     /srs/*.gif   			/srs_map/*.gif
	Map     /cgi-bin/imagemap/srs/*         /cgi-bin/htimage/srs_map/*

	Exec    /srs/*          		/AbsolutePath.../srs4_04/www/*

---------------------- "httpd.conf"-/"caching.conf"-end ------------------------

Finally, you have to change the format of the image configuration file 
"srswww.map" (in directory "srs4_04/www") to fit the CERN style:

----------------------------- "srswww.map"-begin -------------------------------
rect (287,168) (382,195) /srs/srsc?-info%20swissprot
rect (80,127) (137,153) /srs/srsc?-info%20embl
rect (376,222) (440,253) /srs/srsc?-info%20hssp

circle (57,100) 5 /srs/srsc?-linfo%20ecd%20embl
circle (75,107) 5 /srs/srsc?-linfo%20epd%20embl
circle (57,169) 5 /srs/srsc?-linfo%20mimmap%20embl

default /srs/net.html
----------------------------- "srswww.map"-end ---------------------------------

On the SRS side:

Go to the directory "srs4_04/www" and edit the script "srsc": replace
"./wgetz" by the full path name "/AbsolutePath.../srs4_04/www/wgetz".

------------------------------ "srsc"-begin ------------------------------------

set noglob # turn off file name expansion...[]!

if (${#argv} == 0) then
  /AbsolutePath.../srs4_04/www/wgetz -top
  /AbsolutePath.../srs4_04/www/wgetz $*
------------------------------ "srsc"-end - ------------------------------------

SRSWWW inserts many hypertext links into the entries before display. The 
configurations of the hypertext links are defined in the file "hyperlink.sdl".
You need to edit this file if one or more of the databanks addressed are missing
at your site. Eg. if you do not have MEDLINE installed, use the URL given in the 
example below. In other cases you may address SRSWWW servers installed on other 
nodes (Eg. replace "/srs/srsc" by "www.embl-heidelberg.de/srs/srsc".)

------------------------- "hyperlink.sdl"-begin --------------------------------
#linkcall /id=%FETCH_MEDLINE 
   /call="<a href=http://atlas.nlm.nih.gov:5700/htbin/ef/entrezmr?%s>%s</a>"

#linkcall /id=%FETCH_FNUCACCNO
   /call="<a href=http://www.embl-heidelberg.de/srs/srsc?[embl-acc:%s]>%s</a>"

------------------------- "hyperlink.sdl"-end-- --------------------------------

After the changes you must run the command "srssection" to recompile the ODD-

Now, go to the SRS root directory ("srs4_04") and invoke 'srsinstall' with
the commandline option "www":

%	srsinstall www

You can now access SRSWWW with the URL "http://your_server/srs/srsc".

Have fun!

Nicole Redaschi 

 Nicole Redaschi                               <redaschi at biox.embnet.unibas.ch>  
 Biocomputing-Biozentrum der Universitaet Basel-Klingelbergstr.70-CH 4056 Basel

More information about the Bio-srs mailing list

Send comments to us at archive@iubioarchive.bio.net