Debian Codegraph @

doc/programs/html/dbiflat.html

raw symbols SCIP
1 <HTML>
2
3 <HEAD>
4 <TITLE>
5 EMBOSS: dbiflat
6 </TITLE>
7 </HEAD>
8 <BODY BGCOLOR="#FFFFFF" text="#000000">
9
10 <table align=center border=0 cellspacing=0 cellpadding=0>
11 <tr><td valign=top>
12 <A HREF="/" ONMOUSEOVER="self.status='Go to the EMBOSS home page';return true"><img border=0 src="/images/emboss_icon.jpg" alt="" width=150 height=48></a>
13 </td>
14 <td align=left valign=middle>
15 <b><font size="+6">
16 dbiflat
17 </font></b>
18 </td></tr>
19 </table>
20 <br>&nbsp;
21 <p>
22
23
24 <H2>
25 Wiki
26 </H2>
27
28 The master copies of EMBOSS documentation are available
29 at <a href="http://emboss.open-bio.org/wiki/Appdocs">
30 http://emboss.open-bio.org/wiki/Appdocs</a>
31 on the EMBOSS Wiki.
32
33 <p>
34 Please help by correcting and extending the Wiki pages.
35
36 <H2>
37 Function
38 </H2>
39 Index a flat file database
40 <H2>
41 Description
42 </H2>
43
44 <b>dbiflat</b> indexes a flat file database of one or more files, and builds
45 EMBL CD-ROM format index files.
46
47 <p>
48 The resulting index-file format is used by the software on
49 the EMBL database CD-ROM distribution and by the Staden package in
50 addition to EMBOSS, and appears to be the most generally used and
51 publicly available index file format for these databases.
52
53
54 <p>
55 A <b>flat file database</b> is a database in one of the native formats:
56 EMBL, Swiss-Prot or GenBank, as distributed by the EBI, NCBI, or DDBJ.
57 (It is called a 'flat' file to distinguish it from the complex
58 relational database formats that this data is held in before being
59 written to files and distributed.)
60
61
62
63
64 <H2>
65 Usage
66 </H2>
67 Here is a sample session with <b>dbiflat</b>
68 <p>
69
70 <p>
71 <table width="90%"><tr><td bgcolor="#CCFFFF"><pre>
72
73 % <b>dbiflat </b>
74 Index a flat file database
75 Database name: <b>EMBL</b>
76 EMBL : EMBL
77 SWISS : Swiss-Prot, SpTrEMBL, TrEMBLnew
78 GB : Genbank, DDBJ
79 REFSEQ : Refseq
80 Entry format [SWISS]: <b>EMBL</b>
81 Database directory [.]: <b>embl</b>
82 Wildcard database filename [*.dat]: <b>rod.dat</b>
83 Release number [0.0]: <b></b>
84 Index date [00/00/00]: <b></b>
85 General log output file [outfile.dbiflat]: <b></b>
86
87 </pre></td></tr></table><p>
88 <p>
89 <a href="#output.1">Go to the output files for this example</a><p><p>
90
91 <H2>
92 Command line arguments
93 </H2>
94 <table CELLSPACING=0 CELLPADDING=3 BGCOLOR="#f5f5ff" ><tr><td>
95 <pre>
96 Index a flat file database
97 Version: EMBOSS:6.6.0.0
98
99 Standard (Mandatory) qualifiers:
100 [-dbname] string Database name (Any string from 2 to 19
101 characters, matching regular expression
102 /[A-z][A-z0-9_]+/)
103 -idformat menu [SWISS] Entry format (Values: EMBL (EMBL);
104 SWISS (Swiss-Prot, SpTrEMBL, TrEMBLnew); GB
105 (Genbank, DDBJ); REFSEQ (Refseq))
106 -directory directory [.] Database directory
107 -filenames string [*.dat] Wildcard database filename (Any
108 string)
109 -release string [0.0] Release number (Any string up to 9
110 characters)
111 -date string [00/00/00] Index date (Date string dd/mm/yy)
112 -outfile outfile [*.dbiflat] General log output file
113
114 Additional (Optional) qualifiers: (none)
115 Advanced (Unprompted) qualifiers:
116 -fields menu [acc] Index fields (Values: acc (acnum
117 accession number index); sv (seqvn sequence
118 version and gi number index); des (des
119 description index); key (keyword keywords
120 index); org (taxon taxonomy and organism
121 index))
122 -exclude string Wildcard filename(s) to exclude (Any string)
123 -maxindex integer [0] Maximum index length (Integer 0 or more)
124 -sortoptions string [-T . -k 1,1] Sort options, typically '-T .'
125 to use current directory for work files and
126 '-k 1,1' to force GNU sort to use the first
127 field (Any string)
128 -[no]systemsort boolean [Y] Use system sort utility
129 -[no]cleanup boolean [Y] Clean up temporary files
130 -indexoutdir outdir [.] Index file output directory
131
132 Associated qualifiers:
133
134 "-directory" associated qualifiers
135 -extension string Default file extension
136
137 "-outfile" associated qualifiers
138 -odirectory string Output directory
139
140 "-indexoutdir" associated qualifiers
141 -extension string Default file extension
142
143 General qualifiers:
144 -auto boolean Turn off prompts
145 -stdout boolean Write first file to standard output
146 -filter boolean Read first file from standard input, write
147 first file to standard output
148 -options boolean Prompt for standard and additional values
149 -debug boolean Write debug output to program.dbg
150 -verbose boolean Report some/full command line options
151 -help boolean Report command line options and exit. More
152 information on associated and general
153 qualifiers can be found with -help -verbose
154 -warning boolean Report warnings
155 -error boolean Report errors
156 -fatal boolean Report fatal errors
157 -die boolean Report dying program messages
158 -version boolean Report version number and exit
159
160 </pre>
161 </td></tr></table>
162 <P>
163 <table border cellspacing=0 cellpadding=3 bgcolor="#ccccff">
164 <tr bgcolor="#FFFFCC">
165 <th align="left">Qualifier</th>
166 <th align="left">Type</th>
167 <th align="left">Description</th>
168 <th align="left">Allowed values</th>
169 <th align="left">Default</th>
170 </tr>
171
172 <tr bgcolor="#FFFFCC">
173 <th align="left" colspan=5>Standard (Mandatory) qualifiers</th>
174 </tr>
175
176 <tr bgcolor="#FFFFCC">
177 <td>[-dbname]<br>(Parameter 1)</td>
178 <td>string</td>
179 <td>Database name</td>
180 <td>Any string from 2 to 19 characters, matching regular expression /[A-z][A-z0-9_]+/</td>
181 <td><b>Required</b></td>
182 </tr>
183
184 <tr bgcolor="#FFFFCC">
185 <td>-idformat</td>
186 <td>list</td>
187 <td>Entry format</td>
188 <td><table><tr><td>EMBL</td> <td><i>(EMBL)</i></td></tr><tr><td>SWISS</td> <td><i>(Swiss-Prot, SpTrEMBL, TrEMBLnew)</i></td></tr><tr><td>GB</td> <td><i>(Genbank, DDBJ)</i></td></tr><tr><td>REFSEQ</td> <td><i>(Refseq)</i></td></tr></table></td>
189 <td>SWISS</td>
190 </tr>
191
192 <tr bgcolor="#FFFFCC">
193 <td>-directory</td>
194 <td>directory</td>
195 <td>Database directory</td>
196 <td>Directory</td>
197 <td>.</td>
198 </tr>
199
200 <tr bgcolor="#FFFFCC">
201 <td>-filenames</td>
202 <td>string</td>
203 <td>Wildcard database filename</td>
204 <td>Any string</td>
205 <td>*.dat</td>
206 </tr>
207
208 <tr bgcolor="#FFFFCC">
209 <td>-release</td>
210 <td>string</td>
211 <td>Release number</td>
212 <td>Any string up to 9 characters</td>
213 <td>0.0</td>
214 </tr>
215
216 <tr bgcolor="#FFFFCC">
217 <td>-date</td>
218 <td>string</td>
219 <td>Index date</td>
220 <td>Date string dd/mm/yy</td>
221 <td>00/00/00</td>
222 </tr>
223
224 <tr bgcolor="#FFFFCC">
225 <td>-outfile</td>
226 <td>outfile</td>
227 <td>General log output file</td>
228 <td>Output file</td>
229 <td><i>&lt;*&gt;</i>.dbiflat</td>
230 </tr>
231
232 <tr bgcolor="#FFFFCC">
233 <th align="left" colspan=5>Additional (Optional) qualifiers</th>
234 </tr>
235
236 <tr>
237 <td colspan=5>(none)</td>
238 </tr>
239
240 <tr bgcolor="#FFFFCC">
241 <th align="left" colspan=5>Advanced (Unprompted) qualifiers</th>
242 </tr>
243
244 <tr bgcolor="#FFFFCC">
245 <td>-fields</td>
246 <td>list</td>
247 <td>Index fields</td>
248 <td><table><tr><td>acc</td> <td><i>(acnum accession number index)</i></td></tr><tr><td>sv</td> <td><i>(seqvn sequence version and gi number index)</i></td></tr><tr><td>des</td> <td><i>(des description index)</i></td></tr><tr><td>key</td> <td><i>(keyword keywords index)</i></td></tr><tr><td>org</td> <td><i>(taxon taxonomy and organism index)</i></td></tr></table></td>
249 <td>acc</td>
250 </tr>
251
252 <tr bgcolor="#FFFFCC">
253 <td>-exclude</td>
254 <td>string</td>
255 <td>Wildcard filename(s) to exclude</td>
256 <td>Any string</td>
257 <td>&nbsp;</td>
258 </tr>
259
260 <tr bgcolor="#FFFFCC">
261 <td>-maxindex</td>
262 <td>integer</td>
263 <td>Maximum index length</td>
264 <td>Integer 0 or more</td>
265 <td>0</td>
266 </tr>
267
268 <tr bgcolor="#FFFFCC">
269 <td>-sortoptions</td>
270 <td>string</td>
271 <td>Sort options, typically '-T .' to use current directory for work files and '-k 1,1' to force GNU sort to use the first field</td>
272 <td>Any string</td>
273 <td>-T . -k 1,1</td>
274 </tr>
275
276 <tr bgcolor="#FFFFCC">
277 <td>-[no]systemsort</td>
278 <td>boolean</td>
279 <td>Use system sort utility</td>
280 <td>Boolean value Yes/No</td>
281 <td>Yes</td>
282 </tr>
283
284 <tr bgcolor="#FFFFCC">
285 <td>-[no]cleanup</td>
286 <td>boolean</td>
287 <td>Clean up temporary files</td>
288 <td>Boolean value Yes/No</td>
289 <td>Yes</td>
290 </tr>
291
292 <tr bgcolor="#FFFFCC">
293 <td>-indexoutdir</td>
294 <td>outdir</td>
295 <td>Index file output directory</td>
296 <td>Output directory</td>
297 <td>.</td>
298 </tr>
299
300 <tr bgcolor="#FFFFCC">
301 <th align="left" colspan=5>Associated qualifiers</th>
302 </tr>
303
304 <tr bgcolor="#FFFFCC">
305 <td align="left" colspan=5>"-directory" associated directory qualifiers
306 </td>
307 </tr>
308
309 <tr bgcolor="#FFFFCC">
310 <td> -extension</td>
311 <td>string</td>
312 <td>Default file extension</td>
313 <td>Any string</td>
314 <td>&nbsp;</td>
315 </tr>
316
317 <tr bgcolor="#FFFFCC">
318 <td align="left" colspan=5>"-outfile" associated outfile qualifiers
319 </td>
320 </tr>
321
322 <tr bgcolor="#FFFFCC">
323 <td> -odirectory</td>
324 <td>string</td>
325 <td>Output directory</td>
326 <td>Any string</td>
327 <td>&nbsp;</td>
328 </tr>
329
330 <tr bgcolor="#FFFFCC">
331 <td align="left" colspan=5>"-indexoutdir" associated outdir qualifiers
332 </td>
333 </tr>
334
335 <tr bgcolor="#FFFFCC">
336 <td> -extension</td>
337 <td>string</td>
338 <td>Default file extension</td>
339 <td>Any string</td>
340 <td>&nbsp;</td>
341 </tr>
342
343 <tr bgcolor="#FFFFCC">
344 <th align="left" colspan=5>General qualifiers</th>
345 </tr>
346
347 <tr bgcolor="#FFFFCC">
348 <td> -auto</td>
349 <td>boolean</td>
350 <td>Turn off prompts</td>
351 <td>Boolean value Yes/No</td>
352 <td>N</td>
353 </tr>
354
355 <tr bgcolor="#FFFFCC">
356 <td> -stdout</td>
357 <td>boolean</td>
358 <td>Write first file to standard output</td>
359 <td>Boolean value Yes/No</td>
360 <td>N</td>
361 </tr>
362
363 <tr bgcolor="#FFFFCC">
364 <td> -filter</td>
365 <td>boolean</td>
366 <td>Read first file from standard input, write first file to standard output</td>
367 <td>Boolean value Yes/No</td>
368 <td>N</td>
369 </tr>
370
371 <tr bgcolor="#FFFFCC">
372 <td> -options</td>
373 <td>boolean</td>
374 <td>Prompt for standard and additional values</td>
375 <td>Boolean value Yes/No</td>
376 <td>N</td>
377 </tr>
378
379 <tr bgcolor="#FFFFCC">
380 <td> -debug</td>
381 <td>boolean</td>
382 <td>Write debug output to program.dbg</td>
383 <td>Boolean value Yes/No</td>
384 <td>N</td>
385 </tr>
386
387 <tr bgcolor="#FFFFCC">
388 <td> -verbose</td>
389 <td>boolean</td>
390 <td>Report some/full command line options</td>
391 <td>Boolean value Yes/No</td>
392 <td>Y</td>
393 </tr>
394
395 <tr bgcolor="#FFFFCC">
396 <td> -help</td>
397 <td>boolean</td>
398 <td>Report command line options and exit. More information on associated and general qualifiers can be found with -help -verbose</td>
399 <td>Boolean value Yes/No</td>
400 <td>N</td>
401 </tr>
402
403 <tr bgcolor="#FFFFCC">
404 <td> -warning</td>
405 <td>boolean</td>
406 <td>Report warnings</td>
407 <td>Boolean value Yes/No</td>
408 <td>Y</td>
409 </tr>
410
411 <tr bgcolor="#FFFFCC">
412 <td> -error</td>
413 <td>boolean</td>
414 <td>Report errors</td>
415 <td>Boolean value Yes/No</td>
416 <td>Y</td>
417 </tr>
418
419 <tr bgcolor="#FFFFCC">
420 <td> -fatal</td>
421 <td>boolean</td>
422 <td>Report fatal errors</td>
423 <td>Boolean value Yes/No</td>
424 <td>Y</td>
425 </tr>
426
427 <tr bgcolor="#FFFFCC">
428 <td> -die</td>
429 <td>boolean</td>
430 <td>Report dying program messages</td>
431 <td>Boolean value Yes/No</td>
432 <td>Y</td>
433 </tr>
434
435 <tr bgcolor="#FFFFCC">
436 <td> -version</td>
437 <td>boolean</td>
438 <td>Report version number and exit</td>
439 <td>Boolean value Yes/No</td>
440 <td>N</td>
441 </tr>
442
443 </table>
444
445 <H2>
446 Input file format
447 </H2>
448
449 'flat' files (native distribution format) of a protein or nucleic
450 sequence database.
451
452 <p>
453
454 <H2>
455 Output file format
456 </H2>
457
458
459 <a name="output.1"></a>
460 <h3>Output files for usage example </h3>
461 <p><h3>File: division.lkp</h3>
462 <p>This file contains non-printing characters and so cannot be displayed here.
463 <p><h3>File: entrynam.idx</h3>
464 <p>This file contains non-printing characters and so cannot be displayed here.
465 <p><h3>File: acnum.hit</h3>
466 <p>This file contains non-printing characters and so cannot be displayed here.
467 <p><h3>File: acnum.trg</h3>
468 <p>This file contains non-printing characters and so cannot be displayed here.
469 <p><h3>File: outfile.dbiflat</h3>
470 <table width="90%"><tr><td bgcolor="#CCFFCC">
471 <pre>
472 ########################################
473 # Program: dbiflat
474 # Rundate: Mon 15 Jul 2013 12:00:00
475 # Dbname: EMBL
476 # Release: 0.0
477 # Date: 15/07/13
478 # CurrentDirectory: /homes/user/test/qa/dbiflat-ex-keep/
479 # IndexDirectory: ./
480 # IndexDirectoryPath: /homes/user/test/qa/dbiflat-ex-keep/
481 # Maxindex: 0
482 # Fields: 2
483 # Field 1: id
484 # Field 2: acc
485 # Directory: /homes/user/test/embl/
486 # DirectoryPath: /homes/user/test/embl/
487 # Filenames: rod.dat
488 # Exclude:
489 # Files: 1
490 # File 1: /homes/user/test/embl/rod.dat
491 ########################################
492 # Commandline: dbiflat
493 # -dbname EMBL
494 # -idformat EMBL
495 # -directory ../../embl
496 # -filenames rod.dat
497 ########################################
498
499 filename: 'rod.dat'
500 id: 6
501 acc: 9
502
503 Index acc: maxlen 6 items 7
504
505 Total 1 files 6 entries (0 duplicates)
506 </pre>
507 </td></tr></table><p>
508 <p>
509
510 <b>dbiflat</b> creates four index files. All are binary but with a
511 simple format.
512
513 <ul>
514
515 <li>division.lkp is the master index file, and has a 300 byte header
516 containing the database name and date plus information on the record
517 size. This header is followed by one record for each database file,
518 giving the full file name for the data file, and optionally a second
519 sequence file.
520
521 <li>entryname.idx is the entry name index. It has the same 300 byte
522 header, mainly used to store the record size which will depend on the
523 size of the longest entryname in the database. Each entry is stored in
524 sorted alphanumeric order so that a binary search can be used to
525 efficiently find any record. The record also holds the file number
526 from division.lkp and the offsets in the data and sequence files for
527 that entry.
528
529 <li>acnum.trg holds the accession number information. The file has the
530 usual 300 byte header, and a sorted list of record by accession number.
531 Each accession number record contains the first record number in acnum.hit
532 and the total number of records in acnum.hit so that secondary (duplicated)
533 accession numbers can be searched.
534
535 <li>acnum.hit is a very simple file. After the usual 300 byte header,
536 each record simply holds the record number in entryname.idx. An
537 accession number search will use acnum.trg to find a start position
538 and number of records to read in this file, and will then simply
539 read the entryname.idx records for each entry in turn.
540
541 </ul>
542
543 <H2>
544 Data files
545 </H2>
546
547 None.
548
549 <H2>
550 Notes
551 </H2>
552
553
554 The indexing method depends on each entry having a unique entry name.
555 No allowance is made for two entries with the same name so it is
556 not possible to index EMBL and EMBLNEW together.
557
558
559 <p>
560
561 Having created the EMBOSS indices for this file, a database can then be
562 defined in the file <b>emboss.defaults</b> as something like:
563
564 <p>
565
566 <pre>
567 DB emrod [
568 type: N
569 format: embl
570 method: emblcd
571 directory: /data/embl
572 ]
573 </pre>
574
575
576
577 <h3>Fields Indexed</H3>
578
579 By default, <b>dbiflat</b> will index the ID name and the accession
580 number.
581
582 <br>
583
584 If they are present in your database, you may also specify that
585 <b>dbiflat</b> should index the Sequence Version and GI number, the
586 Keywords and Taxonomy names and the words in the description by using
587 the '-fields' qualifier with the appropriate values.
588
589
590 <H2>
591 References
592 </H2>
593
594 None.
595
596
597 <H2>
598 Warnings
599 </H2>
600
601 None.
602
603
604 <H2>
605 Diagnostic Error Messages
606 </H2>
607
608 None.
609
610
611 <H2>
612 Exit status
613 </H2>
614
615 It exits with a status of 0 if no problems.
616
617
618 <H2>
619 Known bugs
620 </H2>
621
622 None.
623
624 <h2><a name="See also">See also</a></h2>
625 <table border cellpadding=4 bgcolor="#FFFFF0">
626 <tr><th>Program name</th>
627 <th>Description</th></tr>
628 <tr>
629 <td><a href="dbiblast.html">dbiblast</a></td>
630 <td>Index a BLAST database</td>
631 </tr>
632
633 <tr>
634 <td><a href="dbifasta.html">dbifasta</a></td>
635 <td>Index a fasta file database</td>
636 </tr>
637
638 <tr>
639 <td><a href="dbigcg.html">dbigcg</a></td>
640 <td>Index a GCG formatted database</td>
641 </tr>
642
643 <tr>
644 <td><a href="dbxcompress.html">dbxcompress</a></td>
645 <td>Compress an uncompressed dbx index</td>
646 </tr>
647
648 <tr>
649 <td><a href="dbxedam.html">dbxedam</a></td>
650 <td>Index the EDAM ontology using b+tree indices</td>
651 </tr>
652
653 <tr>
654 <td><a href="dbxfasta.html">dbxfasta</a></td>
655 <td>Index a fasta file database using b+tree indices</td>
656 </tr>
657
658 <tr>
659 <td><a href="dbxflat.html">dbxflat</a></td>
660 <td>Index a flat file database using b+tree indices</td>
661 </tr>
662
663 <tr>
664 <td><a href="dbxgcg.html">dbxgcg</a></td>
665 <td>Index a GCG formatted database using b+tree indices</td>
666 </tr>
667
668 <tr>
669 <td><a href="dbxobo.html">dbxobo</a></td>
670 <td>Index an obo ontology using b+tree indices</td>
671 </tr>
672
673 <tr>
674 <td><a href="dbxreport.html">dbxreport</a></td>
675 <td>Validate index and report internals for dbx databases</td>
676 </tr>
677
678 <tr>
679 <td><a href="dbxresource.html">dbxresource</a></td>
680 <td>Index a data resource catalogue using b+tree indices</td>
681 </tr>
682
683 <tr>
684 <td><a href="dbxstat.html">dbxstat</a></td>
685 <td>Dump statistics for dbx databases</td>
686 </tr>
687
688 <tr>
689 <td><a href="dbxtax.html">dbxtax</a></td>
690 <td>Index NCBI taxonomy using b+tree indices</td>
691 </tr>
692
693 <tr>
694 <td><a href="dbxuncompress.html">dbxuncompress</a></td>
695 <td>Uncompress a compressed dbx index</td>
696 </tr>
697
698 </table>
699
700 <H2>
701 Author(s)
702 </H2>
703
704 Peter Rice
705 <br>
706 European Bioinformatics Institute, Wellcome Trust Genome Campus, Hinxton, Cambridge CB10 1SD, UK
707
708 <p>
709 Please report all bugs to the EMBOSS bug team (emboss-bug&nbsp;&copy;&nbsp;emboss.open-bio.org) not to the original author.
710 <H2>
711 History
712 </H2>
713
714 Completed December 1999
715
716 <H2>
717 Target users
718 </H2>
719 This program is intended to be used by administrators responsible
720 for software and database installation and maintenance.
721
722 <H2>
723 Comments
724 </H2>
725 None
726
727 </BODY>
728 </HTML>
729