Debian Codegraph @

doc/programs/html/dbifasta.html

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