source: tags/svn.1.5.4/NAMES_COM/names.aisc

Last change on this file was 7986, checked in by westram, 14 years ago
  • PT-SERVER
    • allow to specify amount+limit where N is accept
    • moved hardcoded PT_MAX_MATCHES into AISC interface as parameter (with same limit)
  • added links to information related to MAGIC_NUMBER
    • maintain a list of previously used MAGIC_NUMBERs
  • AISC parameters
    • removed unused parameter MATCH_MAX_SPECIES
    • added new parameters MATCH_MAX_HITS, MATCH_N_ACCEPT, MATCH_N_LIMIT
      • defaulted them to previously hardcoded limits
  • parametrized set_table_for_PT_N_mis() using MATCH_N_ACCEPT + MATCH_N_LIMIT
  • protect vs illegal index into psg.N_mismatches
  • arb_probe
    • fixed commandline parser (no longer modifies passed argv)
    • added new parameters matchacceptN, matchlimitN + matchmaxresults
    • added some unit tests
      • testing N-matches (in match-string and/or seqdata)
      • testing truncation of results
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 6.4 KB
Line 
1PROJECT        arboo_server
2OBJECT_KEY     AN,             # MAIN PREFIX
3MAX_KEY        21,             # MAX NUMBER OF AN ATTRIBUTE
4MAX_OBJECT     4,              # MAX DIFFERENT USER STRUCTURES
5MAX_STRING_LEN 1024,
6MAX_PAR_CNT    16,
7MAGIC_NUMBER   0x414e53,       # MAGIC_NUMBER 6 HEX DIGITS (see AISC/magic.lst@NAMESERVER)
8
9
10SERVER_INCLUDES (~
11#include <stdio.h>
12#include <aisc.h>
13#include <aisc_com.h>~)
14INCLUDE_INCLUDES (~$$(#FILE aisc_include.header)~)
15
16DATA {
17
18# ********************************* USER DATA *******************************************
19
20# ******************************* PRIVAT STRUCTURES: DO NOT CHANGE *********************************
21
22@STRUCT, @SKEY, @SKEYC, @SDOCU;
23
24dll_public, ,   ,   (~parent of dll (=DoubledLinkedList)~), {
25@TYPE,         @IDENT, @REF, @ACC, @SAVE, @KEY,   @KEYC, @INIT, @DOCU;
26t_key,         key,    t,    r,    ,      ,       ,      ,      (~The key~);
27int,           cnt,    t,    r,    ,      CNT,    0,     ,      (~Number of elements~);
28long,          hash,   t,    ,     ,      ,       ,      ,      (~Hash Table~);
29dllheader_ext, parent, flt,  r,    ,      PARENT, 1,     ,      (~My Owner~);
30dllheader_ext, last,   flt,  r,    ,      LAST,   2,     ,      (~Pointer to the last element~);
31};
32
33
34dll_header, COMMON, 0,  (~link header (should be head of each function)~), {
35@TYPE,       @IDENT,             @REF, @ACC, @SAVE, @KEY,      @KEYC, @INIT, @DOCU;
36t_key,       key,                t,    r,    ,      KEY,       0,     ,      (~The Key~);
37aisc_string, aisc_get_keystring, %,    r,    ,      KEYSTRING, 1,     ,      (~THE STRING of the KEY~);
38dll_public,  parent,             ls,   r,    ,      (~~),      2,     ,      (~Pointer to dll_public~);
39aisc_string, ident,              t,    ,     1,     IDENT,     5,     ,      (~The ident [not necessary]~);
40};
41
42
43# ********************************* USER STRUCTURES *******************************************
44
45AN_revers,  REVERS, 4,  (~revers mapping for shorts~), {
46    @TYPE,       @IDENT,    @REF, @ACC, @SAVE, @KEY,       @KEYC,  @INIT,  @DOCU;
47    dllh,        mh,        t,    ,     ,      (~~),       0,      ,       (~Header~);
48    aisc_string, full_name, t,    rw,   ,      ,           ,       ,       (~the full name of a species~);
49    aisc_string, acc,       t,    rw,   ,      ,           ,       ,       (~accession number~);
50    aisc_string, add_id,    t,    rw,   ,      ,           ,       ,       (~additional id data~);
51};
52
53AN_shorts, SHORTS,  3,  (~a dictionary~), SAVEDIRECTION HORIZONTAL, {
54    @TYPE,          @IDENT,         @REF,   @ACC,   @SAVE,  @KEY,       @KEYC,  @INIT,  @DOCU;
55    dllh,           mh,             t,      ,       1,      (~~),       0,      ,       (~Header~);
56    aisc_string,    full_name,      t,      r,      1,      FULL_NAME,  8,      ,       (~the full name of a species~);
57    aisc_string,    acc,            t,      r,      1,      ACC,        9,      ,       (~accession number~);
58    aisc_string,    add_id,         t,      r,      1,      ADDID,      10,     ,       (~additional id data~);
59    aisc_string,    shrt,           t,      r,      1,      SHORT,      11,     ,       (~The Short~);
60};
61
62
63# called from code using id AN_LOCAL
64# single functions: LOCAL_GET_SHORT LOCAL_DEL_SHORT
65
66AN_local, LOCAL,    2,  (~local communication buffer~), {
67    @TYPE,       @IDENT,     @REF, @ACC, @SAVE, @KEY,      @KEYC, @INIT,                   @DOCU;
68    dllh,        mh,         t,    ,     ,      (~~),      0,     ,                        (~Header~);
69    int,         socket,     t,    ,     ,      ,          ,      names_init_socket(THIS), (~the callback~), DESTROY names_destroy_socket(THIS);
70    aisc_string, whoami,     t,    ,     ,      WHOAMI,    8,     ,                        (~who am i~);
71    aisc_string, full_name,  t,    rw,   ,      FULL_NAME, 9,     "",                      (~the full name of a species~);
72    aisc_string, acc,        t,    rw,   ,      ACCESSION, 10,    "",                      (~accession number~);
73    aisc_string, add_id,     t,    rw,   ,      ADDID,     11,    "",                      (~additional id data~);
74    int,         use_advice, t,    rw,   ,      USEADVICE, 12,    ,                        (~use the advice~);
75    aisc_string, advice,     t,    rw,   ,      ADVICE,    13,    "",                      (~advice for the short name~);
76    aisc_string, get_short,  %,    r,    ,      GET_SHORT, 14,    ,                        (~get a short name~);
77    int,         del_short,  %,    r,    ,      DEL_SHORT, 15,    ,                        (~forget stored short name~);
78};
79
80
81# called from code using id AN_MAIN
82# single functions: MAIN_SHUTDOWN MAIN_SAVEALL
83
84AN_main, MAIN, 1, (~global data~), SAVEDIRECTION VERTICAL, {
85    @TYPE,          @IDENT,            @REF,  @ACC,   @SAVE,  @KEY,       @KEYC,  @INIT,  @DOCU;
86    t_key,          key,               t,     n,      ,       ,           ,       ,       (~the KEY~);
87    AN_local,       loc_st,            d,     ,       ,       LOCAL,      8,      ,       (~the parameters~);
88    AN_shorts,      shorts1,           d,     r,      1,      SHORTS1,    10,     ,       (~the unique letters for a word~);
89    AN_shorts,      names,             d,     r,      1,      NAMES,      12,     ,       (~the unique names first*second*S*accession~);
90    AN_revers,      revers,            d,     r,      ,       ,           ,       ,       (~the revers unique names first*second*S*accession~);
91    int,            touched,           t,     r,      ,       TOUCHED,    14,     0,      (~does the database need to be saved?~);
92    aisc_string,    server_shutdown,   %,     w,      ,       SHUTDOWN,   15,     ,       (~SHUTDOWN command~);
93    int,            server_save,       %,     w,      ,       SAVEALL,    16,     ,       (~SAVE everything~);
94    aisc_string,    server_file,       t,     r,      ,       FILENAME,   17,     ,       (~The filename of the keys~);
95    int,            server_filedate,   t,     ,       ,       FILEDATE,   18,     ,       (~The filedate of server_file~);
96    int,            dbversion,         t,     ,       1,      DBVERSION,  19,     4,      (~Nameserver database version~);
97    aisc_string,    add_field,         t,     r,      1,      ADD_FIELD,  20,     ,       (~additional field used for identification~);
98    aisc_string,    add_field_default, t,     r,      1,      AF_DEFAULT, 21,     ,       (~default value for add_field, if field is missing~);
99    long,           prefix_hash,       t,     ,       ,       ,           ,       0,      (~prefix hash table~)
100    };
101};
Note: See TracBrowser for help on using the repository browser.