Debian Codegraph @

winfo/Newsletters/Year2004/August.html

raw
1 <HTML>
2
3 <HEAD>
4 <TITLE>ACEDB User Group Newsletter - August 2004</TITLE>
5
6 <LINK rel=stylesheet type="text/css"
7 href="../newsletter.css"
8 title="Style sheet for Acedb newsletters">
9
10 </HEAD>
11
12
13 <BODY>
14
15 <HR>
16 <HR>
17
18 <!-- Don't change this name unless you change mkindex.pl. -->
19 <a name="Top"></a>
20
21 <H1>ACEDB User Group Newsletter - August 2004</H1>
22
23
24 <!-- ******************************************************************** -->
25 <P>If you want to have this newsletter mailed to you <B>or</B> you want to
26 make comments/suggestions about the format/content then
27 send an email to <A HREF="mailto:[email protected]">[email protected]</A>.
28
29
30 <!-- ******************************************************************** -->
31 <P><hr width="62%" align=left>
32
33 <P>This month sees a PHP interface to AceDB, more support for compiling AceDB on the Opteron,
34 some new
35 additions to the command line interface, changes to embl dumping of accession
36 numbers, extension to GFF "type" dumping, an AQL bug fixed and some developer
37 bits.
38
39
40
41 <!-- ******************************************************************** -->
42 <P><hr width="62%" align=left>
43 <a name="New_Features"></a><H2>New Features</H2>
44
45
46
47
48 <a name="acedb_php"></a><H3>A PHP interface to AceDB</H3>
49
50 <P>(<I>This article is courtesy of Hamish McWilliam</I>
51 <A HREF="mailto:[email protected]">[email protected]</A>)
52
53 <P>Hamish McWilliam has been working on a PHP interface to AceDB, here's what
54 he has to say about it:
55
56 <P><b>AcePHP: a PHP interface to AceDB</b>
57
58 <P>While AcePerl is wonderful for scripts and web applications, it is
59 problematic when a small amount of dynamic content is required in an
60 otherwise static page. PHP is an ideal solution for this circumstance
61 and since it supports sockets it is possible to use the AceDB socket
62 server to access data in an AceDB database, and embed it in the page. To
63 faciliate this a PHP library has been developed that allows access to
64 most of the capabilites of AceDB. This library is pure PHP so no
65 re-compilation of the web server is required. For simple object counts
66 in a database description or one off queries in otherwise static web
67 pages I can think of no simpler method.
68
69 <P>It's now works well for
70 simple things like object counts for a query, number of objects in a class or small queries,
71 there are still some problems handling large objects.
72
73 <P>If you want to have a play with it, you can find details, crude demos
74 and downloads at:
75
76 <pre><A HREF="http://hpm101.gotadsl.co.uk/projects/acephp/">http://hpm101.gotadsl.co.uk/projects/acephp/</A>
77 </pre>
78
79 <P>Hamish.
80
81
82
83
84 <a name="opteron"></a><H3>Opteron port</H3>
85
86 <P>(<I>This article is courtesy of Jean Thierry-Meig</I>
87 <A HREF="mailto:[email protected]">[email protected]</A>)
88
89 <P>Jean has added a new defs file to the wmake directory, <b>OPTERON_4_DEF</b>,
90 for compiling AceDB on the Opteron
91 which should help to ease the problems that some people have experienced in
92 referencing the correct libraries for building AceDB on this 64-bit Linux
93 platform.
94
95 <P>Please note that while the all the binaries from the AceDB source package
96 have been compiled and run on the Opteron, other extensions to AceDB, e.g. AcePerl, are
97 yet to be ported.
98
99
100
101 <a name="smap_cmds"></a><H3>Some New SMap commands</H3>
102
103 <P>For some time now there has been an smap command in giface that enables you to
104 find out the coordinates of a feature in a parent:
105
106
107 <pre><code>acedb-gif&gt; smap -from cds:b0250.4 -to sequence:b0250
108 SMAP Sequence:B0250 7671 1839 1 1443 INTERNAL_GAPS
109 // 1 Active Objects
110 acedb-gif&gt;
111 </code></pre>
112
113 <P>(N.B. "<code>INTERNAL_GAPS</code>" is returned because cds:b0250.4 consists of exons
114 and introns and hence its mapping to sequence:b0250 is not contiguous.)
115
116 <P>The command defaults to finding a feature in that features ultimate parent in the database:
117
118 <pre><code>acedb-gif&gt; smap -from sequence:b0250
119 SMAP Sequence:CHROMOSOME_V 20454867 20494082 1 39216 PERFECT_MAP
120 acedb-gif&gt;
121 </code></pre>
122
123
124 <P>This command is now available in tace and giface (and the corresponding servers),
125 it has been added to the base command menu so there is no need to go into the gif
126 submenu. (Note the smap command has been left in the gif submenu for compatibility
127 with scripts/aceperl programs that rely on this.)
128
129 <P>There are now two additional commands in the base command menu that access SMap functions:
130
131 <ul>
132 <li><b><code>smapdump:</code></b> dumps a text version of the complete SMap
133 for an object to the terminal.
134 <li><b><code>smaplength:</code></b> gives the length of an object (this is not always
135 obvious as the objects length may be given by the maximum extent of the coordinates
136 of its S_Child features or may be specified explicitly in its S_Parent object).
137 </ul>
138
139
140 <P>Output from smaplength is simply the length of the object:
141
142 <pre><code>acedb&gt; smaplength sequence:b0250
143 SMAPLENGTH Sequence:"B0250" 39216
144 // 1 Active Objects
145 acedb&gt;
146 </code></pre>
147
148
149 <P>Output from smapdump may be voluminous:
150
151 <pre><code>acedb&gt; smapdump cds:B0250.4
152 SMAPDUMP CDS:"B0250.4"
153
154 sMap->nnnn:
155 sMap->length = 1443
156 sMap->area1 = 1, sMap->area2 = 1443
157
158 sMap->root->nnnn:
159 Root = Sequence:"CHROMOSOME_V" [20462537,20456705]
160 sMapLength = 1443
161
162 *** CDS:"B0250.4", orient = Down, map = 1,1443->1,1443
163 *** Sequence:"B0250", orient = Up, map = 1839,1902->1443,1380 2361,2525->1379,1215 3247,3351->1214,1110 3400,3540->1109,969 4131,4301->968,798 4416,4517->797,696 4925,5004->695,616 5055,5160->615,510 5866,6015->509,360 6087,6188->359,258 6281,6421->257,117 7511,7557->116,70 7603,7671->69,1
164 *** Gene:"WBGene00007121", orient = Down, map = 1,69->1,69 115,161->70,116 1251,1391->117,257 1484,1585->258,359 1657,1806->360,509 2512,2617->510,615 2668,2747->616,695 3155,3256->696,797 3371,3541->798,968 4132,4272->969,1109 4321,4425->1110,1214 5147,5311->1215,1379 5770,5833->1380,1443
165 *** CDS:"B0250.gc1", orient = Down, map = 1,1443->1,1443
166 *** Transcript:"B0250.4", orient = Down, map = 1,1443->1,1443
167
168 <b>&lt; lots more features not shown &gt;</b>
169
170 *** Homol_data:"CHROMOSOME_V:waba", orient = Up, map = 20456705,20456768->1443,1380 20457227,20457391->1379,1215 20458113,20458217->1214,1110 20458266,20458406->1109,969 20458997,20459167->968,798 20459282,20459383->797,696 20459791,20459870->695,616 20459921,20460026->615,510 20460732,20460881->509,360 20460953,20461054->359,258 20461147,20461287->257,117 20462377,20462423->116,70 20462469,20462537->69,1
171
172 sMap dna:
173 Length = 1443 (only first 1,000 bases printed)
174 1 atgacgtcgtttacaataaacaaacagcaactggaagaaatgatccggca
175 51 gcttcaggatcggctcgaaagtggagcattcaataaacaaactggaaata
176
177 <b>&lt; lots more bases not shown &gt;</b>
178
179 901 ggcaaacgatcgtggtatggggtgatggaagtatctaaacaacgtaggga
180 951 gcattacatttccgaagaagatttttacactaaattcccaggagcatgta
181
182 // 1 Active Objects
183 acedb&gt;
184 </code></pre>
185
186
187 <P>You can see descriptions of smap* command usage online:
188
189 <pre><code>acedb&gt; ? smap*
190 // Keyword smap* does not match
191 // ACEDB list of commands matching smap**:
192 smap [-coords x1 x2] -from class:object [-to class:object] :
193 maps cordinates between sequences that have a child -> parent relationship expressed in SMap tags (or the now deprecated Source/Subsequence tags).
194 Note that objects must be specified in "class:object" as smap can map any class that contains SMap tags.
195 -coords x1 x2 coords to be mapped in the -from object, defaults to whole of -from object.
196 -from class:object object to be mapped into one of its parent.
197 -to class:object object to be mapped to, must be a parent of the -from object, defaults to top parent in the smap tree above -from object.
198 smapdump class:object : dumps to stdout the smap for the object.
199 smaplength class:object : gives the length of the object.
200 // 1 Active Objects
201 acedb&gt;</code></pre>
202
203
204 <a name="quiet_cmds"></a><H3>New quiet command</H3>
205
206 <P>AceDB terminal output usually includes comments at the end even if the command worked:
207 <pre><code>acedb&gt; gif seqget 1.12985533-13293939 ; seqfeatures -file myfile
208 ##gff-version 2
209 ##source-version giface:ACEDB 4.9.27
210 ##date 2004-09-01
211 ##sequence-region 1.12985533-13293939 1 308407
212 1.12985533-13293939 . Sequence 1 88806 . + . Sequence "AL603890.14.1.88806"
213 1.12985533-13293939 . Sequence 1 308407 . + . Sequence "1.12985533-13293939"
214
215 (many more lines)
216
217 1.12985533-13293939 . Clone_right_end 189119 189119 . . . Clone "RP11-133N1"
218 1.12985533-13293939 . Clone_left_end 189120 189120 . . . Clone "RP4-597A16"
219 1.12985533-13293939 . Clone_right_end 308407 308407 . . . Clone "RP4-597A16"
220 // FMAP_FEATURES "1.12985533-13293939" 1 308407
221 // 15 Active Objects
222 acedb&gt;
223 </code></pre>
224
225 <P>For interactive use of tace, giface, the servers, this is very important as it gives the user
226 feedback about the command and the active keyset. This may not be so good for programs that must
227 parse the output as they must all be coded to process the comment lines.
228
229 <P>The new "quiet" command (which is available from the base or gif command menus) suppresses
230 AceDB comments when the command works but passes the comment through if the command
231 fails. This allows a program to easily parse the output and detect whether the command succeeded or
232 failed. With quiet mode on in the above example either valid GFF lines would be returned or
233 a comment because there was an error.
234
235 <P>The command description is:
236 <pre><code>acedb&gt; ? quiet
237 // ACEDB command: quiet
238 quiet -on | -off :
239 Turn quiet mode on or off, when "on" commands produce only their output without any extra comments.
240 (Note the usual "NNN Active Objects" is no longer displayed, use the Count command.)
241 Quiet mode makes parsing command output easier because either the first line
242 is an acedb comment because the command failed or there are no acedb comments in the output.
243 -off (default) verbose output
244 -on no comments unless there is an error.
245
246 // 0 Active Objects
247 acedb&gt;
248 </code></pre>
249
250 <P>(Note that if you turn quiet mode on in the base menu then it will also be on in the gif
251 menu.)
252
253 <P>Full support of this option for all commands will take time to implement so if you
254 find a command which does not produce "quiet" output as you would expect please email
255 <A HREF="mailto:[email protected]">[email protected]</A> with examples.
256
257
258 <!-- ******************************************************************** -->
259 <P><hr width="62%" align=left>
260 <a name="Articles"></a><H2>Articles</H2>
261
262 <a name="embl_acc"></a><H3>Change to how EMBL dumping in AceDB dumps accession numbers</H3>
263
264 <P>There has been a change to the way AceDB embl dumping works for accession numbers,
265 the changes have been made to support new tags in wormbase.
266
267 <P>The original tags that the embl dump code read the accession number from were:
268
269 <pre> Database ?Database ?Text ?Accession_number
270 </pre>
271
272 <P>This worked while accession data was stored in this form:
273
274 <pre> ?Sequence C04G2
275 Database EMBL CEC04G2 Z70718
276 </pre>
277
278 <P>The accession number dumped for the above was: "z70718".
279
280 <P>The new tags in worm are:
281
282 <pre> Database ?Database ?Database_field ?Accession_number
283
284 (n.b. change of ?Text to ?Database_field, but essentially the same)
285 </pre>
286
287 <P>In particular the accession number is now specified by the object following
288 a ?Database_field object with the name "NDB_AC":
289
290 <pre> ?Sequence C04G2
291 Database EMBL NDB_ID CEC04G2
292 EMBL NDB_AC Z70718
293 EMBL NDB_SV Z70718.1
294 </pre>
295
296 <P>The old code would return "CEC04G2" as the accession number which is not correct, the
297 new code will return "z70718".
298
299
300
301 <a name="gff_feature"></a><H3>Extension to how AceDB handles GFF_feature in the Method class</H3>
302
303
304 <P>The ?Method class allows you to specify, via the GFF_feature tag, some text
305 that will be output as the "feature type name" in the GFF dump of all features that
306 specify that method.
307
308 <P>The current model for specifying GFF_feature is:
309
310 <pre>?Method
311 GFF_feature UNIQUE Text
312 </pre>
313
314 <P>Wormbase now uses the controlled vocabularly of the Sequence Ontology (SO)
315 project to specify these types. In wormbase these terms are stored as the names
316 of objects of a new class ?SO_term. Hence their model is now:
317
318 <pre>?Method
319 GFF_feature UNIQUE ?SO_term
320 </pre>
321
322 <P>The GFF dumping code in AceDB has now been altered to cope with both formats
323 of data so you can leave your database unchanged or move, as Wormbase has, towards
324 a more controlled ontology.
325
326
327
328 <!-- ******************************************************************** -->
329 <P><hr width="62%" align=left>
330 <a name="Bugs_Fixed"></a><H2>Bugs Fixed</H2>
331
332 <a name="AQL_active"></a><H3>AQL and the active keyset</H3>
333
334 <P>(<I>This article is courtesy of Jean Thierry-Meig</I>
335 <A HREF="mailto:[email protected]">[email protected]</A>)
336
337 <P>According to the AQL documentation, it is possible to initiate an
338 AQL query on the active keyset, known in aql as '@active' . This is very handy,
339 because the active keyset may result from a complex set of operations that
340 cannot be reproduced by the AQL command line, for example it may result from
341 reading an external file or be constructed by a web cgi script.
342
343 <P>Example:
344
345 <pre>acedb&gt; keyset-read my_paper_list.ace
346 acedb&gt; aql select p,a from p in @active:1, a in p->author
347 </pre>
348
349 <P>Unfortunately, there was for some time a bug in the definition of the AQL
350 @active table. This is fixed, and the @active construction works again.
351
352
353
354
355 <!-- ******************************************************************** -->
356 <P><hr width="62%" align=left>
357 <a name="Developers_Corner"></a><H2>Developers Corner</H2>
358
359
360
361 <a name="ace_c"></a><H3>Acelib.h to AceC transition</H3>
362
363 <P>(<I>This article is courtesy of Jean Thierry-Meig</I>
364 <A HREF="mailto:[email protected]">[email protected]</A>)
365
366 <P>In 1997, a tentative C interface to acedb, called acelib
367 was proposed by Greg Miller. This interface was implemented
368 but, as far as we know, never used<b>*</b>. Indeed, the interface
369 was rather more complicated to use on the server side
370 than the direct ace kernel calls, and could not be used
371 on the client side.
372
373 <P>Now that the new AceC C programmers interface is fully
374 deployed, and tested both on server and on client side,
375 we intend to totally remove the previous acelib code.
376
377 <P>This means that the file acelib.h will disappear and
378 anyone who was using it in one of its application
379 will have to include in its place wac/ac.h and to
380 rewrite his application accordingly.
381
382 <P>If anyone is affected by this change, please
383 email [email protected] for dicussion and support.
384
385 <P>The removal will take effect before the end of october.
386
387 <P><b>*</b><i>The only known usage of acelib is that the
388 acedb kernel itself is using it during bootstrap.
389 The bit of acelib used in this way will be
390 kept, but will become private to the acedb kernel.</i>
391
392
393
394 <a name="graph_text"></a><H3>Text Editor Bug</H3>
395
396 <P>(<I>This fix is courtesy of Jean Thierry-Meig</I>
397 <A HREF="mailto:[email protected]">[email protected]</A>)
398
399 <P>There was a bug in the Text Editor code in AceDB which meant that it would crash if
400 you tried to create an editor of length &lt; 16, fixed
401 now.
402
403
404
405
406 <a name="name_decorate"></a><H3>Displaying object class and name</H3>
407
408 <P>For sometime there has been a call in AceDB to return a string which is a compound
409 of an objects name and class (from wh/acedb.h):
410
411 <pre>char *nameWithClass(KEY k) ; /* returns class:name */
412 </pre>
413
414 <P>Some users found this confusing however as their databases adopted a convention of including
415 the ":" character in the objects name so the result of this function when displayed
416 would give something like:
417
418 <pre><b>someclass:some:very:long:name</b>
419 </pre>
420
421 <P>There is now a new function in wh/acedb.h:
422
423 <pre>char *nameWithClassDecorate(KEY k) ; /* returns class:"name" */
424 </pre>
425
426 <P>You can use this call to get a less ambiguous string that can be displayed to
427 the user:
428
429 <pre><b>someclass:"some:very:long:name"</b>
430 </pre>
431
432
433
434 <a name="messubs"></a><H3>messubs changes</H3>
435
436 <P>(<I>This fix is courtesy of Jean Thierry-Meig</I>
437 <A HREF="mailto:[email protected]">[email protected]</A>)
438
439 <P>Jean has fixed a couple of bugs and closed a loophole in the message
440 formatting code which is a fundamental part of AceDB. The original loophole
441 was caused by long standing inadequacies in the ANSI C libraries for string
442 formatting into fixed buffers.
443
444 <P>Thanks to Jean for sorting this out.
445
446
447 <a name="bssubs"></a><H3>New function to return the name of an object from an OBJ pointer.</H3>
448
449 <P>A trivial addition but useful when running in a debugger, the new call will return
450 the name of an object given an object pointer, from wh/bs.h:
451
452 <pre>char *bsName(OBJ obj) ; /* return the name of an object */
453 </pre>
454
455
456
457 <!-- ******************************************************************** -->
458 <P><hr width="62%" align=left>
459 <a name="Monthly_Build"><H2>August monthly build now available.</H2>
460
461 <P>The August build will be available as AceDB 4.9.27 from Sept 10th onwards.
462
463 <P>You can pick up the monthly builds from:
464 <dl>
465 <dt><b>Sanger users</b>
466 <dd>~acedb/RELEASE.DEVELOPMENT
467 <dt><b>External users</b>
468 <dd><A href="http://www.acedb.org/Software/Downloads/monthly.shtml">
469 http://www.acedb.org/Software/Downloads/monthly.shtml</A>
470 </dl>
471
472 <!-- ******************************************************************** -->
473 <HR>
474 <HR>
475
476 <ADDRESS><A href="mailto:[email protected]">Ed Griffiths &lt;[email protected]&gt;</A></ADDRESS>
477 <!-- hhmts start -->
478 Last modified: Thu Sep 9 09:40:13 BST 2004
479 <!-- hhmts end -->
480
481 </BODY>
482 </HTML>