IUBio

Solution; patch for Re: GCG 8.1 clash with SRS

Reinhard Doelz doelz at comp.bioz.unibas.ch
Fri Aug 18 07:25:44 EST 1995


: Thure Etzold (etzold) wrote:

: : i think it should be safe to add more sequence databanks to the gcg 
: : installation...note that only databanks with gcg sequence format are
: : accepted! ...if you have another SRS installation on your site than the

The following will make 'lookup' run - eventually it will be 'elookup' in a 
future EGCG release :-) with the standard SRS installation.

It applies to all colleagues who would like to run SRS (generic, publically 
available)  and GCG (licensed, commercial) with the same indices. To run this
patch, you need (a) a valid GCG license, and 'lookup' version 8.1, and 
SRS version 4_06 or later. This patch will allow you to run 'lookup' as 
INTENDED by GCG in sequence-only mode, with all your own sequence libs, and 
does neither attempt nor desire to run anything else (such as prosite). 

To apply the patch, become a user DIFFERENT than the one owning the gcg tree
(for security reasons). Create a new directory, copy the lookup.c from GCG 
to lookup.c.gcg and run it like the following:

You will need to follow the GCG instructions and fetch a makefile according
to the manual. Add the $SRSSOU and $SRSEXE directories to the CFLAGS for 
header inclusion, and $SRSEXE/libsrs.a for linking. My make ran as follows:

cc -DNDEBUG  -Dosf -I/bioz4/srs/SRS/srs4_06/src -I/bioz4/srs/SRS/srs4_06/bin/osf
 -I/bioa1/gcg/gcgsource/include -c -g lookup.c
cc  -DNDEBUG lookup.o /bioa1/gcg/gcgbin/oblib/libapp.a  -L/bioa1/gcg/gcgbin/obli
b -lgenshare -lcurses -lm /bioz4/srs/SRS/srs4_06/bin/osf/libsrs.a -o lookup

To apply the patch, extract the file attached (remove the lines
of this message INCLUDING the 'cut here' lines) and run 'patch' as follows:


 bioz.embnet.unibas.ch > patch -l < patch.lookup


Hmmm... looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|*** lookup.c.gcg       Sat Jul 15 12:35:53 1995
|--- lookup.c   Fri Aug 18 14:13:50 1995
--------------------------
Patching file lookup.c.gcg using Plan A...
Hunk #1 succeeded at 35.
Hunk #2 succeeded at 148.
Hunk #3 succeeded at 567.
Hunk #4 succeeded at 582.
Hunk #5 succeeded at 1496.
done


Rename the lookup.c.gcg to lookup. 
Compile and link, and enjoy. SRS indexing and updating via SRS 4_06 etc.
as usual. To run it you will first need to source 'gcg' and afterwards
'prep_srs' in order to get SRSDAT assigned correctly. 

Regards
Reinhard Doelz
BioComputing Basel

--------------------------------> cut here <--------------------------


*** lookup.c.gcg        Sat Jul 15 12:35:53 1995
--- lookup.c    Fri Aug 18 14:13:50 1995
***************
*** 35,40 ****
--- 35,41 ----
  
  #define SRS_MAIN
  #include "srs.h"
+ int  (*PrintMessage)(MSGo *) = NULL;
  
  /* GCG includes and defines. */
  
***************
*** 147,153 ****
  
  #define LIVE_PARAMETER(a) ((a)->pa_value)
  
! #define MAX_ACTIVE_LIBS  10
  #define BUFFSIZ          2000000
  #define FIELDLENGTH      256
  #define RANGEFIELDLENGTH 256
--- 148,154 ----
  
  #define LIVE_PARAMETER(a) ((a)->pa_value)
  
! #define MAX_ACTIVE_LIBS  24  /* Doelz /BCB : allow 24 libraries max */ 
  #define BUFFSIZ          2000000
  #define FIELDLENGTH      256
  #define RANGEFIELDLENGTH 256
***************
*** 566,575 ****
      int lcontext;
      SLBo *l;
  
      for(lcontext = 0; l = LibNextLib(g, &lcontext); ) {
        char name[133];
        char buf[MAXPATHLEN];
! 
        LibGetIndexName(l, LibGetIdField(l), name, "r");
  
        /* check to see if we have the corresponding indices */ 
--- 567,578 ----
      int lcontext;
      SLBo *l;
  
+     if (strcmp(g->com,"Sequence") == 0) {/* Doelz/BCB: Allow only Sequences */  
+  
      for(lcontext = 0; l = LibNextLib(g, &lcontext); ) {
        char name[133];
        char buf[MAXPATHLEN];
!       if (count < 24) {   /* Doelz/BCB: Stop reading after max 23 libs */ 
        LibGetIndexName(l, LibGetIdField(l), name, "r");
  
        /* check to see if we have the corresponding indices */ 
***************
*** 579,585 ****
        if(!access(buf, R_OK))
        activeLib[count++] = l;
      }
! 
    } /* end loop */
  
    activeLib[count] = NULL;
--- 582,589 ----
        if(!access(buf, R_OK))
        activeLib[count++] = l;
        } 
!     }
!    } 
    } /* end loop */
  
    activeLib[count] = NULL;
***************
*** 1492,1498 ****
    /* write the set members */
  
    pCount = 0;
!   tmpMsgF = MsgGetFnct();
    MsgSetFnct(printListMessage); /* capture error messages */
    tmpPrintF = ParGetFunction("printf");
    ParDefFunction ("printf", (INT4 (*)()) printLine);
--- 1496,1502 ----
    /* write the set members */
  
    pCount = 0;
!   tmpMsgF = PrintMessage;  
    MsgSetFnct(printListMessage); /* capture error messages */
    tmpPrintF = ParGetFunction("printf");
    ParDefFunction ("printf", (INT4 (*)()) printLine);

--------------------------------> cut here <--------------------------

-- 
 R.Doelz         Klingelbergstr.70| Tel. x41 61 267 2247  Fax x41 61 267 2078|
 Biocomputing        CH 4056 Basel| electronic Mail    doelz at ubaclu.unibas.ch|
 Biozentrum der Universitaet Basel|-------------- Switzerland ---------------|
<a href=http://beta.embnet.unibas.ch/>EMBnet Switzerland:info at ch.embnet.org</a> 




More information about the Bio-srs mailing list

Send comments to us at biosci-help [At] net.bio.net