IUBio

solved bugs in SRS4.04

Jeroen Coppieters jecop at ebi.ac.uk
Thu Apr 13 06:09:57 EST 1995


While searching for another (still unresolved) bug, I found 2 small
bugs in SRS 4.02 - 4.04
Here's a list of them, plus the way how I solved them. Possibly there are 
better solutions

Jeroen
==========================================================================
1) 
Description 
-----------
'>' signs in the SWISSPROT feature table are not translated to '>'
e.g. 
FT   VARIANT      42     42       N -> K (IN RABSON-MENDENHALL SYNDROME).
FT   VARIANT      55     55       V -> A (IN LEPRECHAUNISM VERONA-1).
FT   VARIANT      58     58       G -> R (IN LEPRECHAUNISM HELMOND;
FT                                INHIBITS PROCESSING AND TRANSPORT).

This could generate problems with HTML parsing

Solution
--------
This conversion has to be made before adding hyperlinks 
2 routines are used to print fields :
WwwEntryTextPrint (srswww.c)
WwwPrintBuff (srswww.c)
I added SmSwapS lines to both:
The resulting routines are:
....................
static void WwwPrintBuff (char *ln)
{
  SmSwapS (ln, ">", ">");    /* JC */
  SmSwapS (ln, "<", "&lt;");    /* JC */
  strcat (buff, ln);
}

.....................
static INT4 WwwEntryTextPrint (ENTRYo *entry)
{
  SLBoFIELD *field;
  INT4      rv;

  rv = EntryOpenText (entry);
  _ErrRet (rv);
  entry->convertLn = SMxMIXCASE;

  while ((field = EntryNextField (entry, 0,  1))) {
    if (field != (SLBoFIELD*) 1L)
      WwwPrintField (entry, 1);
    else {
      if (EntryIsEndLine (entry))
        break;
      SmSwapS (entry->file[0]->ln, "%", "%%");
      SmSwapS (entry->file[0]->ln, ">", "&gt;"); /* JC */
      SmSwapS (entry->file[0]->ln, "<", "&lt;"); /* JC */
      WwwPrintF (entry->file[0]->ln);
      FilURead (entry->file[0]);
    }
  }

  /* print the data part of ...file per entry type entries (eg, pdb) */

  if (ParGetNum ("printData") && LibIsFilePerEntry (entry->lib))
    do {
       WwwPrintF (entry->file[0]->ln);
      rv = FilURead (entry->file[0]);
    }
    while (rv != e__eof);

  return 1;
}
==========================================================================
2) Clicking on feature in swissprot entry  generates error messages
FT   VARIANT      42     42       N -> K (IN RABSON-MENDENHALL SYNDROME).
Clicking on VARIANT in the above feature returns a parsing error message

Solution
--------
in expression.sdl, the %SWISSPROT_FEATURE_PARSER does not define
'>' as a valid character in the comment
Changed rule
  comment = ~A-Za-z0-9\-_/. ()'~.
to 
  comment = ~A-Za-z0-9\-_/. ()'>:,~.

Adding '>' ':' and ','
As I have seen these in Swissprot feature comments
Possibly other chars should be added.
The errors appear on several servers, but not in Heidelberg. So I guess
Thure made this change, but forgot to add the new expression.sdl to the 
new release (or made the change after the last release)

--
==============================================================
         . O .                               Jeroen Coppieters
     . O O o   O .                            Software Support
   O O O O *o    O O          Jeroen.Coppieters at embl-ebi.ac.uk
  O O O O(   *o  )O O                     (or jecop at ebi.ac.uk)
  )O O O O   o*  O O(                         ++44 1223 494422 
  O O O O( o*    )O O
  )O O O O  *o   O O(                      EMBL Outstation EBI
  O O O O(   *o  )O O      (European Bioinformatics Institute)
  )O @ O O   o*  O O(                             Hinxton Hall
    O O O( o*   )O('                                   Hinxton
     ` O(   *o O  '                         Cambridge CB10 1RQ
         ` O '                                              UK
http://www.ebi.ac.uk
==============================================================




More information about the Bio-srs mailing list

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