1 | PROJECT pb_com |
---|
2 | OBJECT_KEY PT, # MAIN PREFIX |
---|
3 | MAX_KEY 100, # MAX NUMBER OF AN ATTRIBUTE |
---|
4 | MAX_OBJECT 20, # MAX DIFFERENT STRUCTURES |
---|
5 | MAX_STRING_LEN 1024, |
---|
6 | MAX_PAR_CNT 16, |
---|
7 | MAGIC_NUMBER 0x471100, # MAGIC_NUMBER 6 HEX DIGITS |
---|
8 | |
---|
9 | SERVER_INCLUDES (~ |
---|
10 | #include <stdio.h> |
---|
11 | #include "PT_server.h" |
---|
12 | #include "PT_com.h"~) |
---|
13 | INCLUDE_INCLUDES (~$$(#FILE aisc_include.header)~) |
---|
14 | |
---|
15 | DATA { |
---|
16 | |
---|
17 | # ********************************* USER DATA ******************************************* |
---|
18 | |
---|
19 | @CONST, @VALUE, @DOCU; |
---|
20 | LIST_SIZE, 20, (~Size of I_STR Buffer~); |
---|
21 | PERC_SIZE, 20, (~How many centigrades to look~); |
---|
22 | ALPHA_SIZE, 24, (~24 letters~); |
---|
23 | DOMAIN_MIN_LENGTH, 8, (~Minimum length of a domain~); |
---|
24 | PT_PART_DEEP, 2, (~The Deep of the Partitions~); |
---|
25 | |
---|
26 | |
---|
27 | # ******************************* PRIVAT STRUCTURES: DO NOT CHANGE ********************************* |
---|
28 | |
---|
29 | @STRUCT, @SKEY, @SKEYC, @SDOCU; |
---|
30 | |
---|
31 | dll_public, , , (~Vater einer DoubledLinkedList dll~), { |
---|
32 | @TYPE, @IDENT, @REF, @ACC, @SAVE, @KEY, @KEYC, @INIT, @DOCU; |
---|
33 | t_key, key, t, r, , , , , (~ The key~); |
---|
34 | int, cnt, t, r, , CNT, 0, , (~ Number of elements~); |
---|
35 | long, hash, t, , , , , , (~ Hash Table~); |
---|
36 | dllheader_ext, parent, flt, r, , PARENT, 1, , (~ My Owner~); |
---|
37 | dllheader_ext, last, flt, r, , LAST, 2, , (~ Pointer to the last element~); |
---|
38 | }; |
---|
39 | |
---|
40 | |
---|
41 | dll_header, COMMON, 0, (~Der Link Header (sollte Kopf jeder Funktion sein)~), { |
---|
42 | @TYPE, @IDENT, @REF, @ACC, @SAVE, @KEY, @KEYC, @INIT, @DOCU; |
---|
43 | t_key, key, t, r, , KEY, 0, , (~ The Key~); |
---|
44 | aisc_string, aisc_get_keystring,%,r, , KEYSTRING,1, , (~ THE STRING of the KEY ~); |
---|
45 | dll_public, parent, ls, r, , (~~), 2, , (~ Pointer to dll_public~); |
---|
46 | aisc_string, ident, t, , 1, IDENT, 5, , (~ The ident [not necessary]~); |
---|
47 | }; |
---|
48 | |
---|
49 | |
---|
50 | # ********************************* USER STRUCTURES ******************************************* |
---|
51 | |
---|
52 | # new probe design/match: |
---|
53 | |
---|
54 | PT_probeparts, TPROBEPARTS, 9, (~a part of a probe to search in the Prefix tree~), { |
---|
55 | @TYPE, @IDENT, @REF, @ACC, @KEY, @KEYC, @INIT, @DOCU; |
---|
56 | dllh, mh, t, , (~~), 0, , (~Header~); |
---|
57 | aisc_string,sequence, t, , , , , (~ The Sequence to check ~); |
---|
58 | PT_tprobes, source, fl, , , , , (~ A pointer to the source ~); |
---|
59 | int, start, t, , , , , (~ The number of characters cut off at the start of the tprobe~); |
---|
60 | double, dt, t, , , , , (~ Add this temperature to the result ~); |
---|
61 | double, sum_bonds,t, , , , , (~ The sum of bonds of the longest non mismatch string ~); |
---|
62 | }; |
---|
63 | |
---|
64 | PT_pdc_specials, SPECIALS, 10, (~ non standard substrings of a probe ~), { |
---|
65 | @TYPE, @IDENT, @REF, @ACC, @KEY, @KEYC, @INIT, @DOCU; |
---|
66 | dllh, mh, t, , (~~), 0, , (~Header~); |
---|
67 | int, mode, t, , MODE, 9, , (~ ==1 -> split domains; ==0 -> dont split domains ~); |
---|
68 | double, ll, t, , LLEFT, 10, , (~ the bond value of the character left of the left ~); |
---|
69 | double, l, t, , LEFT, 11, , (~ The bond value left character ~); |
---|
70 | double, c, t, , CENTER, 12, , (~ The center character~); |
---|
71 | double, r, t, , RIGHT, 13, , (~...~); |
---|
72 | double, rr, t, , RRIGHT, 14, , (~...~); |
---|
73 | }; |
---|
74 | |
---|
75 | PT_tprobes, TPROBE, 11, (~ The probe we want to test ~), { |
---|
76 | @TYPE, @IDENT, @REF, @ACC, @KEY, @KEYC, @INIT, @DOCU; |
---|
77 | dllh, mh, t, , (~~), 0, , (~Header~); |
---|
78 | aisc_string,sequence, t, r, SEQUENCE, 10, , (~ The Sequence to check ~); |
---|
79 | int, seq_len, t, , , , , (~ The len of the sequence ~); |
---|
80 | double, sum_bonds, t, , , , , (~ The sum of all bonds ~); |
---|
81 | double, quality, t, r, QUALITY, 11, , (~ The quality of the probe = GROUPSIZE*dT ~); |
---|
82 | int, groupsize, t, r, GROUPSIZE, 15, , (~ The Size of the group ~); |
---|
83 | int, hairpin, t, r, HAIRPIN, 16, , (~ How many hairpin bonds ~); |
---|
84 | double, whairpin, t, r, WHAIRPIN, 17, , (~ Weighted Hairpins ~); |
---|
85 | int, perc, vt, r, PERC, 18, , (~ Result: How many non group hits per centigrade ~), SIZE PERC_SIZE; |
---|
86 | double, temp, t, r, TEMPERATURE, 20, , (~ The temperature of the probe ~); |
---|
87 | int, mishit, t, r, MISHIT, 25, , (~ How many non group members hit ~); |
---|
88 | int, apos, t, , APOS, 26, , (~ The absolute position of probe ~); |
---|
89 | int, get_r_pos, t, , ECOLI_POS, 27, , (~ The ecoli based position of probe ~); |
---|
90 | aisc_string,get_design_hinfo,%, r, INFO_HEADER, 30, , (~the combined info text of a probe design~); |
---|
91 | aisc_string,get_design_info, %, r, INFO, 31, , (~the combined info text of a probe design~); |
---|
92 | }; |
---|
93 | |
---|
94 | PT_bond, , , (~ The definition of a bond ~), { |
---|
95 | @TYPE, @IDENT, @REF, @ACC, @KEY, @KEYC, @INIT, @DOCU; |
---|
96 | double, val, t, , VAL, 0, 0.0, (~ how strong is that bond ~); |
---|
97 | }; |
---|
98 | |
---|
99 | PT_sequence, SEQUENCE, 13, (~ The additional sequences ~), { |
---|
100 | @TYPE, @IDENT, @REF, @ACC, @KEY, @KEYC, @INIT, @DOCU; |
---|
101 | dllh, mh, t, , (~~), 0, , (~Header~); |
---|
102 | bytestring,seq, t, , SEQUENCE, 10, , (~The Sequence~); |
---|
103 | }; |
---|
104 | |
---|
105 | PT_pdc, PDC, 12, (~ The new probe design ~), { |
---|
106 | @TYPE, @IDENT, @REF, @ACC, @KEY, @KEYC, @INIT, @DOCU; |
---|
107 | dllh, mh, t, , (~~), 0, , (~Header~); |
---|
108 | PT_probeparts, parts, d, , , , , (~ The parts of the probes ~); |
---|
109 | PT_probeparts, dparts, d, , , , , (~ The duplicated parts of the probes ~); |
---|
110 | PT_bond, bond, siv, , BOND, 10, , (~The bond matrix~), SIZE (4*4); |
---|
111 | int, dummy, t, , , , init_bond_matrix(THIS), (~ init bond matrix ~); |
---|
112 | double, dte, t, , DTEDGE, 12, 50.0, (~ The Temperature drop per percent mismatch on the edge of the probe ~); |
---|
113 | double, dt, t, , DT, 13, 50.0, (~ The temperature drop per percent mismatch ~); |
---|
114 | double, split, t, , SPLIT, 14, .5, (~ Split the domains if bond value is less the average bond value - split ~); |
---|
115 | PT_pdc_specials,specials, d, , SPECIALS, 15, , (~ Exceptions of splitting domains~); |
---|
116 | int, looplen, t, , LOOPLEN, 17, 4, (~ The Loop Length of a probe ~); |
---|
117 | int, probelen, t, , PROBELENGTH, 20, 18, (~the length of the probe~); |
---|
118 | double, mintemp, t, , MINTEMP, 22, 30.0, (~minimum temperuture~); |
---|
119 | double, maxtemp, t, , MAXTEMP, 23, 100.0, (~maximum temperature~); |
---|
120 | double, min_gc, t, , MINGC, 25, .3, (~the minimum GC content~); |
---|
121 | double, max_gc, t, , MAXGC, 26, 1.0, (~the maximum GC content~); |
---|
122 | double, maxbonds, t, , MAXBOND, 27, 4.0, (~The maximum of hairpin bonds~); |
---|
123 | int, minpos, t, , MINPOS, 30, 0, (~the minimum position~); |
---|
124 | int, maxpos, t, , MAXPOS, 31, 100000, (~the maximum position~); |
---|
125 | double, mintarget, t, , MINTARGETS, 35, .7, (~the minimum targets for a group of species~); |
---|
126 | int, mishit, t, , MISHIT, 36, 0, (~the maximum mis hits~); |
---|
127 | int, clipresult, t, , CLIPRESULT, 40, 40, (~Clip the Result list~); |
---|
128 | int, pos_groups, vt, , , , , (~Position of Groups~), SIZE ALPHA_SIZE; |
---|
129 | bytestring, checksums, t, w, CHECKSUMS, 44, , (~a list of sequence checksums seperated by '#' is optional~); |
---|
130 | bytestring, names, t, w, NAMES, 45, , (~a list of names seperated by '#' is expected~); |
---|
131 | bytestring, PT_unknown_names,%, r, UNKNOWN_NAMES, 46, , (~List of unknown names~); |
---|
132 | PT_sequence, sequences, d, , SEQUENCE, 47, , (~Additional Sequences~); |
---|
133 | int, PT_start_design,%, w, GO, 50, , (~Start the design procedure~); |
---|
134 | PT_tprobes, tprobes, d, r, TPROBE, 60, , (~ The result ~); |
---|
135 | }; |
---|
136 | |
---|
137 | # function to iterate through all probes existing in PT-Server |
---|
138 | |
---|
139 | PT_exProb, PEP, 14, (~ Get all existing probes ~), { |
---|
140 | @TYPE, @IDENT, @REF, @ACC, @KEY, @KEYC, @INIT, @DOCU; |
---|
141 | dllh, mh, t, , (~~), 0, , (~ Header ~); |
---|
142 | int, plength, t, , PLENGTH, 10, 20, (~ Length of searched probes ~); |
---|
143 | int, numget, t, , NUMGET, 11, 200, (~ Number of searched probes ~); |
---|
144 | int, restart, t, , RESTART, 12, 1, (~ 1 => start from beginning ~); |
---|
145 | bytestring, next_probe, t, , NEXT_PROBE, 13, , (~ next probe to look for (internal) ~); |
---|
146 | int, PT_find_exProb, %, w, FIND_PROBES,14, , (~ search probes (result=separated by ','s ) ~); |
---|
147 | aisc_string, result, t, r, RESULT, 15, , (~ The result ~); |
---|
148 | }; |
---|
149 | |
---|
150 | # get next relatives (used by AWTC and NALIGNER) |
---|
151 | |
---|
152 | PT_family_list, FAMILYLIST, 8, (~the family list~), { |
---|
153 | @TYPE, @IDENT, @REF, @ACC, @SAVE, @KEY, @KEYC, @INIT, @DOCU; |
---|
154 | dllh, mh, t, , , (~~), 0, , (~Header~); |
---|
155 | aisc_string, name, t, r, , NAME, 11, , (~name of species~); |
---|
156 | int, matches, t, r, , MATCHES, 13, , (~number of matches~); |
---|
157 | double, rel_matches, t, r, , REL_MATCHES, 14, , (~MATCHES / (SEQ_LEN - PROBE_LEN + 1) ~); |
---|
158 | }; |
---|
159 | |
---|
160 | # used below in LOCS/MATCH_STRING |
---|
161 | |
---|
162 | PT_probematch, MATCHLIST, 1, (~the PROBEMATCH list~), { |
---|
163 | @TYPE, @IDENT, @REF, @ACC, @SAVE, @KEY, @KEYC, @INIT, @DOCU; |
---|
164 | dllh, mh, t, , , (~~), 0, , (~Header~); |
---|
165 | int, name, t, r, , ID, 10, , (~id of species~); |
---|
166 | aisc_string,virt_name, %, r, , NAME, 11, , (~name of species~); |
---|
167 | int, b_pos, t, r, , POS, 12, , (~pos of probe~); |
---|
168 | int, g_pos, t, r, , GPOS, 13, , (~pos of probe (gene relative)~); |
---|
169 | int, rpos, t, r, , , , , (~relative pos of probe~); |
---|
170 | int, mismatches, t, r, , MISMATCHES, 14, , (~number of mismatches~); |
---|
171 | aisc_string,virt_fullname, %, r, , FULLNAME, 15, , (~fullname of species (or genename if it's a gene pt server)~); |
---|
172 | double, wmismatches, t, r, , WMISMATCHES, 16, , (~number of weighted mismatches~); |
---|
173 | int, N_mismatches, t, r, , N_MISMATCHES, 17, , (~number of 'N' mismatches~); |
---|
174 | int, is_member, t, r, , IS_MEMBER, 18, , (~member of group~); |
---|
175 | double, dt, t, r, , DT, 19, , (~the dt of a probe~); |
---|
176 | char, sequence, l, r, , SEQUENCE, 22, , (~path of probe~); |
---|
177 | int, reversed, t, r, , REVERSED, 25, , (~reversed probe matches~); |
---|
178 | # aisc_string,get_match_hinfo,%, r, , INFO_HEADER, 26, , (~the combined info text of _one_ probe match (header)~); |
---|
179 | # aisc_string,get_match_info, %, r, , INFO, 27, , (~the combined info text of _one_ probe match~); |
---|
180 | }; |
---|
181 | |
---|
182 | # used below in MAIN/SPECIESLIST |
---|
183 | |
---|
184 | PT_species_list, SPECIESLIST, 5, (~the species list~), { |
---|
185 | @TYPE, @IDENT, @REF, @ACC, @SAVE, @KEY, @KEYC, @INIT, @DOCU; |
---|
186 | dllh, mh, t, , , (~~), 0, , (~Header~); |
---|
187 | int, member, t, rw, , MEMBER, 12, , (~species member of group~); |
---|
188 | }; |
---|
189 | |
---|
190 | # global interface |
---|
191 | |
---|
192 | PT_local, LOCS, 6, (~local communication buffer~), { |
---|
193 | @TYPE, @IDENT, @REF, @ACC, @SAVE, @KEY, @KEYC, @INIT, @DOCU; |
---|
194 | dllh, mh, t, , , (~~), 0, , (~Header~); |
---|
195 | int, socket, t, , , , , pt_init_socket(THIS), (~the callback~), DESTROY pt_destroy_socket(THIS); |
---|
196 | aisc_string, probe_match, %, w, , SEARCHMATCH, 8, , (~ Searches all species where probe maches ~); |
---|
197 | aisc_string, pm_sequence, t, , , , , , (~ the sequence ~); |
---|
198 | aisc_string, pm_csequence, t, , , , , , (~ the complement sequence ~); |
---|
199 | int, pm_reversed, t, rw, , MATCH_REVERSED, 9, 1, (~ reverse probe ~); |
---|
200 | int, pm_complement, t, rw, , MATCH_COMPLEMENT, 10, , (~ complement probe ~); |
---|
201 | int, pm_max, t, rw, , MATCH_MAX_MISMATCHES, 11, , (~ max mismatches ~); |
---|
202 | int, pm_max_spec, t, rw, , MATCH_MAX_SPECIES, 12, , (~ max number of species matching ~); |
---|
203 | int, sort_by, t, rw, , MATCH_SORT_BY, 13, , (~ 0 == mismatches 1 == weighted mismatches 2 == weighted mismatches with pos and strength~); |
---|
204 | PT_probematch, pm, d, r, , MATCH_LIST, 15, , (~ result: List of species where probe maches ~); |
---|
205 | int, matches_truncated, t, r, , MATCHES_TRUNCATED, 17, , (~ result: whether MATCH_LIST was truncated ~); |
---|
206 | bytestring, match_string, %, r, , MATCH_STRING, 18, , (~ result: List of species where probe maches ~); |
---|
207 | bytestring, MP_match_string, %, r, , MP_MATCH_STRING, 19, , (~ result: List of species where probe maches and #mismatches ~); |
---|
208 | bytestring, MP_all_species_string,%, r, , MP_ALL_SPECIES_STRING,20, , (~ result: List of all species in Database ~); |
---|
209 | int, MP_count_all_species, %, r, , MP_COUNT_ALL_SPECIES, 21, , (~ result: Number of all species in Database ~); |
---|
210 | aisc_string, ls_error, t, r, , ERROR, 23, "", (~ the error text ~); |
---|
211 | |
---|
212 | int, group_count, t, r, , PROBE_NGROUP, 34, , (~ result: Number of selected species~); |
---|
213 | |
---|
214 | PT_pdc, pdc, d, , , PROBE_DESIGN_CONFIG, 40, , (~The new probe design~); |
---|
215 | PT_exProb, ep, d, , , PROBE_FIND_CONFIG, 42, , (~Find all existing probes~); |
---|
216 | |
---|
217 | # com-codes 50-59 were used by find-family, dont re-use for some time (ralf 10/2008) |
---|
218 | |
---|
219 | aisc_string, user, t, rw, , USER, 60, "unknown", (~the username~); |
---|
220 | aisc_string, address, t, rw, , ADDRESS, 61, "unknown", (~the useraddress~); |
---|
221 | aisc_string, login, t, rw, , LOGINTIME, 62, "notime", (~the date the user logged in~); |
---|
222 | |
---|
223 | bytestring, ff_find_family, %, w, , FF_FIND_FAMILY, 70, , (~ Searches the family ~); |
---|
224 | int, ff_pr_len, t, rw, , FF_PROBE_LEN, 71, 12, (~ Length of probes ~); |
---|
225 | int, ff_mis_nr, t, rw, , FF_MISMATCH_NUMBER, 72, 0, (~ Number of mismatches ~); |
---|
226 | int, ff_find_type, t, rw, , FF_FIND_TYPE, 73, 0, (~ Type of find 0 = search all, 1 = a* ~); |
---|
227 | int, ff_compl, t, rw, , FF_COMPLEMENT, 74, 1, (~ Search for complement? (combination of: fwd=1, rev=2, rev.compl=4, compl=8) ~); |
---|
228 | PT_family_list, ff_fl, d, r, , FF_FAMILY_LIST, 80, , (~ Sorted List of family ~); # note: This uses 80 AND 81! |
---|
229 | int, ff_list_size, t, r, , FF_FAMILY_LIST_SIZE, 82, , (~ size of result list ~); |
---|
230 | int, ff_sort_type, t, rw, , FF_SORT_TYPE, 83, 0, (~ Type of sorting 0 = MATCHES, 1 = REL_MATCHES ~); |
---|
231 | int, ff_sort_max, t, rw, , FF_SORT_MAX, 84, 0, (~ Sort only best FF_SORT_MAX sequences ~); |
---|
232 | }; |
---|
233 | |
---|
234 | PT_main, MAIN, 7, (~Die globalen Daten~), { |
---|
235 | @TYPE, @IDENT, @REF, @ACC, @SAVE, @KEY, @KEYC, @INIT, @DOCU; |
---|
236 | t_key, key, t, n, , , , , (~Der KEY~); |
---|
237 | PT_local, loc_st, d, , , LOCS, 10, , (~Die Parameter~); |
---|
238 | aisc_string, server_shutdown,%, w, , SHUTDOWN, 20, , (~shut down~); |
---|
239 | int, who, t, rw, , STARTER, 21, , (~who started this server~); |
---|
240 | int, m_type, t, , , MESSAGE_TYPE, 31, 0, (~the message type ~); |
---|
241 | aisc_string, m_text, t, , , MESSAGE, 32, "NO_MSG", (~ the message text ~); |
---|
242 | int, broadcast, %, w, , BROADCAST, 33, , (~ broadcast func ~); |
---|
243 | PT_species_list,sl, d, r, , SPECIESLIST, 50, , (~list of species~); |
---|
244 | }; |
---|
245 | |
---|
246 | }; |
---|