1 | // =============================================================== // |
---|
2 | // // |
---|
3 | // File : rdp_info.cxx // |
---|
4 | // Purpose : // |
---|
5 | // // |
---|
6 | // =============================================================== // |
---|
7 | |
---|
8 | #include "rdp_info.h" |
---|
9 | #include "defs.h" |
---|
10 | #include "reader.h" |
---|
11 | |
---|
12 | bool parse_RDP_comment(RDP_comments& comments, RDP_comment_parser one_comment_entry, const char *key, int index, Reader& reader) { |
---|
13 | OrgInfo& orginf = comments.orginf; |
---|
14 | SeqInfo& seqinf = comments.seqinf; |
---|
15 | |
---|
16 | if (str_equal(key, "Source of strain:")) one_comment_entry(orginf.source, index, reader); |
---|
17 | else if (str_equal(key, "Culture collection:")) one_comment_entry(orginf.cultcoll, index, reader); |
---|
18 | else if (str_equal(key, "Former name:")) one_comment_entry(orginf.formname, index, reader); |
---|
19 | else if (str_equal(key, "Alternate name:")) one_comment_entry(orginf.nickname, index, reader); |
---|
20 | else if (str_equal(key, "Common name:")) one_comment_entry(orginf.commname, index, reader); |
---|
21 | else if (str_equal(key, "Host organism:")) one_comment_entry(orginf.hostorg, index, reader); |
---|
22 | else if (str_equal(key, "RDP ID:")) one_comment_entry(seqinf.RDPid, index, reader); |
---|
23 | else if (str_equal(key, "Corresponding GenBank entry:")) one_comment_entry(seqinf.gbkentry, index, reader); |
---|
24 | else if (str_equal(key, "Sequencing methods:")) one_comment_entry(seqinf.methods, index, reader); |
---|
25 | else if (str_equal(key, "5' end complete:")) { |
---|
26 | char flag[TOKENSIZE]; |
---|
27 | scan_token_or_die(flag, reader, index); |
---|
28 | if (flag[0] == 'Y') seqinf.comp5 = 'y'; |
---|
29 | else seqinf.comp5 = 'n'; |
---|
30 | ++reader; |
---|
31 | } |
---|
32 | else if (str_equal(key, "3' end complete:")) { |
---|
33 | char flag[TOKENSIZE]; |
---|
34 | scan_token_or_die(flag, reader, index); |
---|
35 | if (flag[0] == 'Y') seqinf.comp3 = 'y'; |
---|
36 | else seqinf.comp3 = 'n'; |
---|
37 | ++reader; |
---|
38 | } |
---|
39 | else if (str_equal(key, "Sequence information ")) ++reader; |
---|
40 | else if (str_equal(key, "Organism information")) ++reader; |
---|
41 | else { |
---|
42 | return false; |
---|
43 | } |
---|
44 | return true; |
---|
45 | } |
---|
46 | |
---|
47 | |
---|
48 | |
---|
49 | |
---|