00001 /* Parse EMBL formatted files. EMBL files are basically line 00002 * oriented. Each line begins with a short (usually two letter) 00003 * type word. Adjacent lines with the same type are generally 00004 * considered logical extensions of each other. In many cases 00005 * lines can be considered fields in an EMBL database. Records 00006 * are separated by lines starting with '//' Generally lines 00007 * starting with XX are empty and used to make the records more 00008 * human readable. Here is an example record: 00009 00010 C M00001 00011 XX 00012 ID V$MYOD_01 00013 XX 00014 NA MyoD 00015 XX 00016 DT EWI (created); 19.10.92. 00017 DT ewi (updated); 22.06.95. 00018 XX 00019 PO A C G T 00020 01 0 0 0 0 00021 02 0 0 0 0 00022 03 1 2 2 0 00023 04 2 1 2 0 00024 05 3 0 1 1 00025 06 0 5 0 0 00026 07 5 0 0 0 00027 08 0 0 4 1 00028 09 0 1 4 0 00029 10 0 0 0 5 00030 11 0 0 5 0 00031 12 0 1 2 2 00032 13 0 2 0 3 00033 14 1 0 3 1 00034 15 0 0 0 0 00035 16 0 0 0 0 00036 17 0 0 0 0 00037 XX 00038 BF T00526; MyoD ; mouse 00039 XX 00040 BA 5 functional elements in 3 genes 00041 XX 00042 XX 00043 // 00044 */ 00045 00046 #ifndef EMBLPARSE_H 00047 #define EMBLPARSE_H 00048 00049 #ifndef HASH_H 00050 #include "hash.h" 00051 #endif 00052 00053 #ifndef DYSTRING_H 00054 #include "dystring.h" 00055 #endif 00056 00057 #ifndef LINEFILE_H 00058 #include "linefile.h" 00059 #endif 00060 00061 boolean emblLineGroup(struct lineFile *lf, char type[16], struct dyString *val); 00062 /* Read next line of embl file. Read line after that too if it 00063 * starts with the same type field. Return FALSE at EOF. */ 00064 00065 struct hash *emblRecord(struct lineFile *lf); 00066 /* Read next record and return it in hash. (Free this 00067 * hash with freeHashAndVals.) Hash is keyed by type 00068 * and has string values. */ 00069 00070 struct lineFile *emblOpen(char *fileName, char type[256]); 00071 /* Open up embl file, verify format and optionally return 00072 * type (VV line). Close this with lineFileClose(). */ 00073 00074 #endif /* EMBLPARSE_H */ 00075
1.5.2