1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 import sys
19 from Bio.Seq import Seq
20 from Bio.SeqRecord import SeqRecord
21 from Bio.Alphabet import generic_alphabet, generic_protein
22
24 """Basic functions for breaking up a GenBank/EMBL file into sub sections.
25
26 The International Nucleotide Sequence Database Collaboration (INSDC)
27 between the DDBJ, EMBL, and GenBank. These organisations all use the
28 same "Feature Table" layout in their plain text flat file formats.
29
30 However, the header and sequence sections of an EMBL file are very
31 different in layout to those produced by GenBank/DDBJ."""
32
33
34 RECORD_START = "XXX"
35 HEADER_WIDTH = 3
36 FEATURE_START_MARKERS = ["XXX***FEATURES***XXX"]
37 FEATURE_END_MARKERS = ["XXX***END FEATURES***XXX"]
38 FEATURE_QUALIFIER_INDENT = 0
39 FEATURE_QUALIFIER_SPACER = ""
40 SEQUENCE_HEADERS=["XXX"]
41
49
53
55 """Read in lines until find the ID/LOCUS line, which is returned.
56
57 Any preamble (such as the header used by the NCBI on *.seq.gz archives)
58 will we ignored."""
59 while True :
60 if self.line :
61 line = self.line
62 self.line = ""
63 else :
64 line = self.handle.readline()
65 if not line :
66 if self.debug : print "End of file"
67 return None
68 if line[:self.HEADER_WIDTH]==self.RECORD_START :
69 if self.debug > 1: print "Found the start of a record:\n" + line
70 break
71 line = line.rstrip()
72 if line == "//" :
73 if self.debug > 1: print "Skipping // marking end of last record"
74 elif line == "" :
75 if self.debug > 1: print "Skipping blank line before record"
76 else :
77
78 if self.debug > 1:
79 print "Skipping header line before record:\n" + line
80 self.line = line
81 return line
82
84 """Return list of strings making up the header
85
86 New line characters are removed.
87
88 Assumes you have just read in the ID/LOCUS line.
89 """
90 assert self.line[:self.HEADER_WIDTH]==self.RECORD_START, \
91 "Not at start of record"
92
93 header_lines = []
94 while True :
95 line = self.handle.readline()
96 if not line :
97 raise SyntaxError("Premature end of line during sequence data")
98 line = line.rstrip()
99 if line in self.FEATURE_START_MARKERS :
100 if self.debug : print "Found header table"
101 break
102
103
104
105 if line[:self.HEADER_WIDTH].rstrip() in self.SEQUENCE_HEADERS :
106 if self.debug : print "Found start of sequence"
107 break
108 if line == "//" :
109 raise SyntaxError("Premature end of sequence data marker '//' found")
110 header_lines.append(line)
111 self.line = line
112 return header_lines
113
165
167 """Expects a feature as a list of strings, returns a tuple (key, location, qualifiers)
168
169 For example given this GenBank feature:
170
171 CDS complement(join(490883..490885,1..879))
172 /locus_tag="NEQ001"
173 /note="conserved hypothetical [Methanococcus jannaschii];
174 COG1583:Uncharacterized ACR; IPR001472:Bipartite nuclear
175 localization signal; IPR002743: Protein of unknown
176 function DUF57"
177 /codon_start=1
178 /transl_table=11
179 /product="hypothetical protein"
180 /protein_id="NP_963295.1"
181 /db_xref="GI:41614797"
182 /db_xref="GeneID:2732620"
183 /translation="MRLLLELKALNSIDKKQLSNYLIQGFIYNILKNTEYSWLHNWKK
184 EKYFNFTLIPKKDIIENKRYYLIISSPDKRFIEVLHNKIKDLDIITIGLAQFQLRKTK
185 KFDPKLRFPWVTITPIVLREGKIVILKGDKYYKVFVKRLEELKKYNLIKKKEPILEEP
186 IEISLNQIKDGWKIIDVKDRYYDFRNKSFSAFSNWLRDLKEQSLRKYNNFCGKNFYFE
187 EAIFEGFTFYKTVSIRIRINRGEAVYIGTLWKELNVYRKLDKEEREFYKFLYDCGLGS
188 LNSMGFGFVNTKKNSAR"
189
190 Then should give input key="CDS" and the rest of the data as a list of strings
191 lines=["complement(join(490883..490885,1..879))", ..., "LNSMGFGFVNTKKNSAR"]
192 where the leading spaces and trailing newlines have been removed.
193
194 Returns tuple containing: (key as string, location string, qualifiers as list)
195 as follows for this example:
196
197 key = "CDS", string
198 location = "complement(join(490883..490885,1..879))", string
199 qualifiers = list of string tuples:
200
201 [('locus_tag', '"NEQ001"'),
202 ('note', '"conserved hypothetical [Methanococcus jannaschii];\nCOG1583:..."'),
203 ('codon_start', '1'),
204 ('transl_table', '11'),
205 ('product', '"hypothetical protein"'),
206 ('protein_id', '"NP_963295.1"'),
207 ('db_xref', '"GI:41614797"'),
208 ('db_xref', '"GeneID:2732620"'),
209 ('translation', '"MRLLLELKALNSIDKKQLSNYLIQGFIYNILKNTEYSWLHNWKK\nEKYFNFT..."')]
210
211 In the above example, the "note" and "translation" were edited for compactness,
212 and they would contain multiple new line characters (displayed above as \n)
213
214 If a qualifier is quoted (in this case, everything except codon_start and
215 transl_table) then the quotes are NOT removed.
216
217 Note that no whitespace is removed.
218 """
219
220 iterator = iter(filter(None, lines))
221 try :
222 line = iterator.next()
223
224 feature_location = line.strip()
225 while feature_location[-1:]=="," :
226
227 feature_location += iterator.next().strip()
228
229 qualifiers=[]
230
231 for line in iterator :
232 if line[0]=="/" :
233
234 i = line.find("=")
235 key = line[1:i]
236 value = line[i+1:]
237 if i==-1 :
238
239 key = line[1:]
240 qualifiers.append((key,None))
241 elif value[0]=='"' :
242
243 if value[-1]<>'"' or value<>'"' :
244
245 while value[-1] <> '"' :
246 value += "\n" + iterator.next()
247 else :
248
249 assert value == '"'
250 if self.debug : print "Quoted line %s:%s" % (key, value)
251
252 qualifiers.append((key,value))
253 else :
254
255
256 qualifiers.append((key,value))
257 else :
258
259 assert len(qualifiers) > 0
260 assert key==qualifiers[-1][0]
261
262 qualifiers[-1] = (key, qualifiers[-1][1] + "\n" + line)
263 return (feature_key, feature_location, qualifiers)
264 except StopIteration:
265
266 raise SyntaxError("Problem with '%s' feature:\n%s" \
267 % (feature_key, "\n".join(lines)))
268
289
291 """Handle the LOCUS/ID line, passing data to the comsumer
292
293 This should be implemented by the EMBL / GenBank specific subclass
294
295 Used by the parse_records() and parse() methods.
296 """
297 pass
298
300 """Handle the header lines (list of strings), passing data to the comsumer
301
302 This should be implemented by the EMBL / GenBank specific subclass
303
304 Used by the parse_records() and parse() methods.
305 """
306 pass
307
308
322
324 """Handle any lines between features and sequence (list of strings), passing data to the consumer
325
326 This should be implemented by the EMBL / GenBank specific subclass
327
328 Used by the parse_records() and parse() methods.
329 """
330 pass
331
332 - def feed(self, handle, consumer, do_features=True) :
333 """Feed a set of data into the consumer.
334
335 This method is intended for use with the "old" code in Bio.GenBank
336
337 Arguments:
338 handle - A handle with the information to parse.
339 consumer - The consumer that should be informed of events.
340 do_features - Boolean, should the features be parsed?
341 Skipping the features can be much faster.
342
343 Return values:
344 true - Passed a record
345 false - Did not find a record
346 """
347
348
349 self.set_handle(handle)
350 if not self.find_start() :
351
352 consumer.data=None
353 return False
354
355
356
357
358
359
360 self._feed_first_line(consumer, self.line)
361 self._feed_header_lines(consumer, self.parse_header())
362
363
364 if do_features :
365 self._feed_feature_table(consumer, self.parse_features(skip=False))
366 else :
367 self.parse_features(skip=True)
368
369
370 misc_lines, sequence_string = self.parse_footer()
371 self._feed_misc_lines(consumer, misc_lines)
372
373 consumer.sequence(sequence_string)
374
375 consumer.record_end("//")
376
377 assert self.line == "//"
378
379
380 return True
381
397
398
400 """Returns a SeqRecord object iterator
401
402 Each record (from the ID/LOCUS line to the // line) becomes a SeqRecord
403
404 The SeqRecord objects include SeqFeatures if do_features=True
405
406 This method is intended for use in Bio.SeqIO
407 """
408
409 while True :
410 record = self.parse(handle)
411 if record is None : break
412 assert record.id is not None
413 assert record.name <> "<unknown name>"
414 assert record.description <> "<unknown description>"
415 yield record
416
420 """Returns SeqRecord object iterator
421
422 Each CDS feature becomes a SeqRecord.
423
424 alphabet - Used for any sequence found in a translation field.
425 tags2id - Tupple of three strings, the feature keys to use
426 for the record id, name and description,
427
428 This method is intended for use in Bio.SeqIO
429 """
430 self.set_handle(handle)
431 while self.find_start() :
432
433 self.parse_header()
434 feature_tuples = self.parse_features()
435
436 for line in self.handle :
437 if line[:2]=="//" : break
438 self.line = line.rstrip()
439
440
441 for key, location_string, qualifiers in feature_tuples :
442 if key=="CDS" :
443
444
445
446
447
448 record = SeqRecord(seq=None)
449 annotations = record.annotations
450
451
452
453
454 annotations['raw_location'] = location_string.replace(' ','')
455
456 for (qualifier_name, qualifier_data) in qualifiers :
457 if qualifier_data is not None \
458 and qualifier_data[0]=='"' and qualifier_data[-1]=='"' :
459
460 qualifier_data = qualifier_data[1:-1]
461
462 if qualifier_name == "translation" :
463 assert record.seq is None, "Multiple translations!"
464 record.seq = Seq(qualifier_data.replace("\n",""), alphabet)
465 elif qualifier_name == "db_xref" :
466
467 record.dbxrefs.append(qualifier_data)
468 else :
469 if qualifier_data is not None :
470 qualifier_data = qualifier_data.replace("\n"," ").replace(" "," ")
471 try :
472 annotations[qualifier_name] += " " + qualifier_data
473 except KeyError :
474
475 annotations[qualifier_name]= qualifier_data
476
477
478
479 try :
480 record.id = annotations[tags2id[0]]
481 except KeyError :
482 pass
483 try :
484 record.name = annotations[tags2id[1]]
485 except KeyError :
486 pass
487 try :
488 record.description = annotations[tags2id[2]]
489 except KeyError :
490 pass
491
492 yield record
493
495 """For extracting chunks of information in EMBL files"""
496
497 RECORD_START = "ID "
498 HEADER_WIDTH = 5
499 FEATURE_START_MARKERS = ["FH Key Location/Qualifiers","FH"]
500 FEATURE_END_MARKERS = ["XX"]
501 FEATURE_QUALIFIER_INDENT = 21
502 FEATURE_QUALIFIER_SPACER = "FT" + " " * (FEATURE_QUALIFIER_INDENT-2)
503 SEQUENCE_HEADERS=["SQ"]
504
538
549
551
552
553
554 assert line[:self.HEADER_WIDTH].rstrip() == "ID"
555 fields = [line[self.HEADER_WIDTH:].split(None,1)[0]]
556 fields.extend(line[self.HEADER_WIDTH:].split(None,1)[1].split(";"))
557 fields = [entry.strip() for entry in fields]
558 """
559 The tokens represent:
560 0. Primary accession number
561 (space sep)
562 1. ??? (e.g. standard)
563 (semi-colon)
564 2. Topology and/or Molecule type (e.g. 'circular DNA' or 'DNA')
565 3. Taxonomic division (e.g. 'PRO')
566 4. Sequence length (e.g. '4639675 BP.')
567 """
568 consumer.locus(fields[0])
569 consumer.residue_type(fields[2])
570 consumer.data_file_division(fields[3])
571 self._feed_seq_length(consumer, fields[4])
572
574
575
576
577 assert line[:self.HEADER_WIDTH].rstrip() == "ID"
578 fields = [data.strip() for data in line[self.HEADER_WIDTH:].strip().split(";")]
579 assert len(fields) == 7
580 """
581 The tokens represent:
582 0. Primary accession number
583 1. Sequence version number
584 2. Topology: 'circular' or 'linear'
585 3. Molecule type (e.g. 'genomic DNA')
586 4. Data class (e.g. 'STD')
587 5. Taxonomic division (e.g. 'PRO')
588 6. Sequence length (e.g. '4639675 BP.')
589 """
590
591 consumer.locus(fields[0])
592
593
594
595
596
597
598
599 version_parts = fields[1].split()
600 if len(version_parts)==2 \
601 and version_parts[0]=="SV" \
602 and version_parts[1].isdigit() :
603 consumer.version_suffix(version_parts[1])
604
605
606 consumer.residue_type(" ".join(fields[2:4]))
607
608
609
610 consumer.data_file_division(fields[5])
611
612 self._feed_seq_length(consumer, fields[6])
613
615 length_parts = text.split()
616 assert len(length_parts) == 2
617 assert length_parts[1].upper() in ["BP", "BP."]
618 consumer.size(length_parts[0])
619
621 EMBL_INDENT = self.HEADER_WIDTH
622 EMBL_SPACER = " " * EMBL_INDENT
623 consumer_dict = {
624 'AC' : 'accession',
625 'SV' : 'version',
626 'DE' : 'definition',
627
628
629
630 'RA' : 'authors',
631 'RT' : 'title',
632 'RL' : 'journal',
633 'OS' : 'organism',
634 'OC' : 'taxonomy',
635
636 'CC' : 'comment',
637
638 }
639
640
641 lines = filter(None,lines)
642 line_iter = iter(lines)
643 try :
644 while True :
645 try :
646 line = line_iter.next()
647 except StopIteration :
648 break
649 if not line : break
650 line_type = line[:EMBL_INDENT].strip()
651 data = line[EMBL_INDENT:].strip()
652
653 if line_type == 'XX' :
654 pass
655 elif line_type == 'RN' :
656
657
658 if data[0] == "[" and data[-1] == "]" : data = data[1:-1]
659 consumer.reference_num(data)
660 elif line_type == 'RP' :
661
662
663 assert data.count("-")==1
664 consumer.reference_bases("(bases " + data.replace("-", " to ") + ")")
665 elif line_type == 'RX' :
666
667
668 pass
669 elif line_type == 'CC' :
670
671 consumer.comment([data])
672 elif line_type == 'DR' :
673
674 pass
675 elif line_type in consumer_dict :
676
677 getattr(consumer, consumer_dict[line_type])(data)
678 else :
679 if self.debug :
680 print "Ignoring EMBL header line:\n%s" % line
681 except StopIteration :
682 raise SyntaxError("Problem with header")
683
687
689 """For extracting chunks of information in GenBank files"""
690
691 RECORD_START = "LOCUS "
692 HEADER_WIDTH = 12
693 FEATURE_START_MARKERS = ["FEATURES Location/Qualifiers","FEATURES"]
694 FEATURE_END_MARKERS = []
695 FEATURE_QUALIFIER_INDENT = 21
696 FEATURE_QUALIFIER_SPACER = " " * FEATURE_QUALIFIER_INDENT
697 SEQUENCE_HEADERS=["CONTIG", "ORIGIN", "BASE COUNT"]
698
740
742
743
744
745 GENBANK_INDENT = self.HEADER_WIDTH
746 GENBANK_SPACER = " "*GENBANK_INDENT
747 assert line[0:GENBANK_INDENT] == 'LOCUS ', \
748 'LOCUS line does not start correctly:\n' + line
749
750
751
752 if line[29:33] in [' bp ', ' aa '] :
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771 assert line[29:33] in [' bp ', ' aa '] , \
772 'LOCUS line does not contain size units at expected position:\n' + line
773 assert line[41:42] == ' ', \
774 'LOCUS line does not contain space at position 42:\n' + line
775 assert line[42:51].strip() in ['','linear','circular'], \
776 'LOCUS line does not contain valid entry (linear, circular, ...):\n' + line
777 assert line[51:52] == ' ', \
778 'LOCUS line does not contain space at position 52:\n' + line
779 assert line[55:62] == ' ', \
780 'LOCUS line does not contain spaces from position 56 to 62:\n' + line
781 assert line[64:65] == '-', \
782 'LOCUS line does not contain - at position 65 in date:\n' + line
783 assert line[68:69] == '-', \
784 'LOCUS line does not contain - at position 69 in date:\n' + line
785
786 name_and_length_str = line[GENBANK_INDENT:29]
787 while name_and_length_str.find(' ')<>-1 :
788 name_and_length_str = name_and_length_str.replace(' ',' ')
789 name_and_length = name_and_length_str.split(' ')
790 assert len(name_and_length)<=2, \
791 'Cannot parse the name and length in the LOCUS line:\n' + line
792 assert len(name_and_length)<>1, \
793 'Name and length collide in the LOCUS line:\n' + line
794
795
796
797 consumer.locus(name_and_length[0])
798 consumer.size(name_and_length[1])
799
800
801 if line[33:51].strip() == "" and line[29:33] == ' aa ' :
802
803
804
805
806 consumer.residue_type("PROTEIN")
807 else :
808 consumer.residue_type(line[33:51].strip())
809
810 consumer.data_file_division(line[52:55])
811 consumer.date(line[62:73])
812 elif line[40:44] in [' bp ', ' aa '] :
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832 assert line[40:44] in [' bp ', ' aa '] , \
833 'LOCUS line does not contain size units at expected position:\n' + line
834 assert line[44:47] in [' ', 'ss-', 'ds-', 'ms-'], \
835 'LOCUS line does not have valid strand type (Single stranded, ...):\n' + line
836 assert line[47:54].strip() == "" \
837 or line[47:54].strip().find('DNA') <> -1 \
838 or line[47:54].strip().find('RNA') <> -1, \
839 'LOCUS line does not contain valid sequence type (DNA, RNA, ...):\n' + line
840 assert line[54:55] == ' ', \
841 'LOCUS line does not contain space at position 55:\n' + line
842 assert line[55:63].strip() in ['','linear','circular'], \
843 'LOCUS line does not contain valid entry (linear, circular, ...):\n' + line
844 assert line[63:64] == ' ', \
845 'LOCUS line does not contain space at position 64:\n' + line
846 assert line[67:68] == ' ', \
847 'LOCUS line does not contain space at position 68:\n' + line
848 assert line[70:71] == '-', \
849 'LOCUS line does not contain - at position 71 in date:\n' + line
850 assert line[74:75] == '-', \
851 'LOCUS line does not contain - at position 75 in date:\n' + line
852
853 name_and_length_str = line[GENBANK_INDENT:40]
854 while name_and_length_str.find(' ')<>-1 :
855 name_and_length_str = name_and_length_str.replace(' ',' ')
856 name_and_length = name_and_length_str.split(' ')
857 assert len(name_and_length)<=2, \
858 'Cannot parse the name and length in the LOCUS line:\n' + line
859 assert len(name_and_length)<>1, \
860 'Name and length collide in the LOCUS line:\n' + line
861
862
863
864 consumer.locus(name_and_length[0])
865 consumer.size(name_and_length[1])
866
867 if line[44:54].strip() == "" and line[40:44] == ' aa ' :
868
869
870
871
872 consumer.residue_type(("PROTEIN " + line[54:63]).strip())
873 else :
874 consumer.residue_type(line[44:63].strip())
875
876 consumer.data_file_division(line[64:67])
877 consumer.date(line[68:79])
878 elif line[GENBANK_INDENT:].strip().count(" ")==0 :
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894 if line[GENBANK_INDENT:].strip() <> "" :
895 consumer.locus(line[GENBANK_INDENT:].strip())
896 else :
897
898
899 print >> sys.stderr, "Warning: Minimal LOCUS line found - is this correct?\n" + line
900 else :
901 raise SyntaxError('Did not recognise the LOCUS line layout:\n' + line)
902
903
905
906
907
908
909 GENBANK_INDENT = self.HEADER_WIDTH
910 GENBANK_SPACER = " "*GENBANK_INDENT
911 consumer_dict = {
912 'DEFINITION' : 'definition',
913 'ACCESSION' : 'accession',
914 'NID' : 'nid',
915 'PID' : 'pid',
916 'DBSOURCE' : 'db_source',
917 'KEYWORDS' : 'keywords',
918 'SEGMENT' : 'segment',
919 'SOURCE' : 'source',
920 'AUTHORS' : 'authors',
921 'CONSRTM' : 'consrtm',
922 'TITLE' : 'title',
923 'JOURNAL' : 'journal',
924 'MEDLINE' : 'medline_id',
925 'PUBMED' : 'pubmed_id',
926 'REMARK' : 'remark'}
927
928
929
930
931
932
933 lines = filter(None,lines)
934 lines.append("")
935 line_iter = iter(lines)
936 try :
937 line = line_iter.next()
938 while True :
939 if not line : break
940 line_type = line[:GENBANK_INDENT].strip()
941 data = line[GENBANK_INDENT:].strip()
942
943 if line_type == 'VERSION' :
944
945
946
947 while data.find(' ')<>-1:
948 data = data.replace(' ',' ')
949 if data.find(' GI:')==-1 :
950 consumer.version(data)
951 else :
952 if self.debug : print "Version [" + data.split(' GI:')[0] + "], gi [" + data.split(' GI:')[1] + "]"
953 consumer.version(data.split(' GI:')[0])
954 consumer.gi(data.split(' GI:')[1])
955
956 line = line_iter.next()
957 elif line_type == 'REFERENCE' :
958 if self.debug >1 : print "Found reference [" + data + "]"
959
960
961
962
963
964
965
966
967
968
969 data = data.strip()
970
971
972 while True:
973 line = line_iter.next()
974 if line[:GENBANK_INDENT] == GENBANK_SPACER :
975
976 data += " " + line[GENBANK_INDENT:]
977 if self.debug >1 : print "Extended reference text [" + data + "]"
978 else :
979
980 break
981
982
983
984 while data.find(' ')<>-1:
985 data = data.replace(' ',' ')
986 if data.find(' ')==-1 :
987 if self.debug >2 : print 'Reference number \"' + data + '\"'
988 consumer.reference_num(data)
989 else :
990 if self.debug >2 : print 'Reference number \"' + data[:data.find(' ')] + '\", \"' + data[data.find(' ')+1:] + '\"'
991 consumer.reference_num(data[:data.find(' ')])
992 consumer.reference_bases(data[data.find(' ')+1:])
993 elif line_type == 'ORGANISM' :
994
995 consumer.organism(data)
996 data = ""
997 while True :
998 line = line_iter.next()
999 if line[0:GENBANK_INDENT] == GENBANK_SPACER :
1000 data += ' ' + line[GENBANK_INDENT:]
1001 else :
1002
1003 if data.strip() == "" :
1004 if self.debug > 1 : print "Taxonomy line(s) missing or blank"
1005 consumer.taxonomy(data.strip())
1006
1007 break
1008 elif line_type == 'COMMENT' :
1009 if self.debug > 1 : print "Found comment"
1010
1011
1012 comment_list=[]
1013 comment_list.append(data)
1014 while True:
1015 line = line_iter.next()
1016 if line[0:GENBANK_INDENT] == GENBANK_SPACER :
1017 data = line[GENBANK_INDENT:]
1018 comment_list.append(data)
1019 if self.debug > 2 : print "Comment continuation [" + data + "]"
1020 else :
1021
1022 break
1023 consumer.comment(comment_list)
1024 del comment_list
1025 elif line_type in consumer_dict :
1026
1027
1028 while True :
1029 line = line_iter.next()
1030 if line[0:GENBANK_INDENT] == GENBANK_SPACER :
1031 data += ' ' + line[GENBANK_INDENT:]
1032 else :
1033
1034 getattr(consumer, consumer_dict[line_type])(data)
1035
1036 break
1037 else :
1038 if self.debug :
1039 print "Ignoring GenBank header line:\n" % line
1040
1041 line = line_iter.next()
1042 except StopIteration :
1043 raise SyntaxError("Problem in header")
1044
1078
1079 if __name__ == "__main__" :
1080 from StringIO import StringIO
1081
1082 gbk_example = \
1083 """LOCUS SCU49845 5028 bp DNA PLN 21-JUN-1999
1084 DEFINITION Saccharomyces cerevisiae TCP1-beta gene, partial cds, and Axl2p
1085 (AXL2) and Rev7p (REV7) genes, complete cds.
1086 ACCESSION U49845
1087 VERSION U49845.1 GI:1293613
1088 KEYWORDS .
1089 SOURCE Saccharomyces cerevisiae (baker's yeast)
1090 ORGANISM Saccharomyces cerevisiae
1091 Eukaryota; Fungi; Ascomycota; Saccharomycotina; Saccharomycetes;
1092 Saccharomycetales; Saccharomycetaceae; Saccharomyces.
1093 REFERENCE 1 (bases 1 to 5028)
1094 AUTHORS Torpey,L.E., Gibbs,P.E., Nelson,J. and Lawrence,C.W.
1095 TITLE Cloning and sequence of REV7, a gene whose function is required for
1096 DNA damage-induced mutagenesis in Saccharomyces cerevisiae
1097 JOURNAL Yeast 10 (11), 1503-1509 (1994)
1098 PUBMED 7871890
1099 REFERENCE 2 (bases 1 to 5028)
1100 AUTHORS Roemer,T., Madden,K., Chang,J. and Snyder,M.
1101 TITLE Selection of axial growth sites in yeast requires Axl2p, a novel
1102 plasma membrane glycoprotein
1103 JOURNAL Genes Dev. 10 (7), 777-793 (1996)
1104 PUBMED 8846915
1105 REFERENCE 3 (bases 1 to 5028)
1106 AUTHORS Roemer,T.
1107 TITLE Direct Submission
1108 JOURNAL Submitted (22-FEB-1996) Terry Roemer, Biology, Yale University, New
1109 Haven, CT, USA
1110 FEATURES Location/Qualifiers
1111 source 1..5028
1112 /organism="Saccharomyces cerevisiae"
1113 /db_xref="taxon:4932"
1114 /chromosome="IX"
1115 /map="9"
1116 CDS <1..206
1117 /codon_start=3
1118 /product="TCP1-beta"
1119 /protein_id="AAA98665.1"
1120 /db_xref="GI:1293614"
1121 /translation="SSIYNGISTSGLDLNNGTIADMRQLGIVESYKLKRAVVSSASEA
1122 AEVLLRVDNIIRARPRTANRQHM"
1123 gene 687..3158
1124 /gene="AXL2"
1125 CDS 687..3158
1126 /gene="AXL2"
1127 /note="plasma membrane glycoprotein"
1128 /codon_start=1
1129 /function="required for axial budding pattern of S.
1130 cerevisiae"
1131 /product="Axl2p"
1132 /protein_id="AAA98666.1"
1133 /db_xref="GI:1293615"
1134 /translation="MTQLQISLLLTATISLLHLVVATPYEAYPIGKQYPPVARVNESF
1135 TFQISNDTYKSSVDKTAQITYNCFDLPSWLSFDSSSRTFSGEPSSDLLSDANTTLYFN
1136 VILEGTDSADSTSLNNTYQFVVTNRPSISLSSDFNLLALLKNYGYTNGKNALKLDPNE
1137 VFNVTFDRSMFTNEESIVSYYGRSQLYNAPLPNWLFFDSGELKFTGTAPVINSAIAPE
1138 TSYSFVIIATDIEGFSAVEVEFELVIGAHQLTTSIQNSLIINVTDTGNVSYDLPLNYV
1139 YLDDDPISSDKLGSINLLDAPDWVALDNATISGSVPDELLGKNSNPANFSVSIYDTYG
1140 DVIYFNFEVVSTTDLFAISSLPNINATRGEWFSYYFLPSQFTDYVNTNVSLEFTNSSQ
1141 DHDWVKFQSSNLTLAGEVPKNFDKLSLGLKANQGSQSQELYFNIIGMDSKITHSNHSA
1142 NATSTRSSHHSTSTSSYTSSTYTAKISSTSAAATSSAPAALPAANKTSSHNKKAVAIA
1143 CGVAIPLGVILVALICFLIFWRRRRENPDDENLPHAISGPDLNNPANKPNQENATPLN
1144 NPFDDDASSYDDTSIARRLAALNTLKLDNHSATESDISSVDEKRDSLSGMNTYNDQFQ
1145 SQSKEELLAKPPVQPPESPFFDPQNRSSSVYMDSEPAVNKSWRYTGNLSPVSDIVRDS
1146 YGSQKTVDTEKLFDLEAPEKEKRTSRDVTMSSLDPWNSNISPSPVRKSVTPSPYNVTK
1147 HRNRHLQNIQDSQSGKNGITPTTMSTSSSDDFVPVKDGENFCWVHSMEPDRRPSKKRL
1148 VDFSNKSNVNVGQVKDIHGRIPEML"
1149 gene complement(3300..4037)
1150 /gene="REV7"
1151 CDS complement(3300..4037)
1152 /gene="REV7"
1153 /codon_start=1
1154 /product="Rev7p"
1155 /protein_id="AAA98667.1"
1156 /db_xref="GI:1293616"
1157 /translation="MNRWVEKWLRVYLKCYINLILFYRNVYPPQSFDYTTYQSFNLPQ
1158 FVPINRHPALIDYIEELILDVLSKLTHVYRFSICIINKKNDLCIEKYVLDFSELQHVD
1159 KDDQIITETEVFDEFRSSLNSLIMHLEKLPKVNDDTITFEAVINAIELELGHKLDRNR
1160 RVDSLEEKAEIERDSNWVKCQEDENLPDNNGFQPPKIKLTSLVGSDVGPLIIHQFSEK
1161 LISGDDKILNGVYSQYEEGESIFGSLF"
1162 ORIGIN
1163 1 gatcctccat atacaacggt atctccacct caggtttaga tctcaacaac ggaaccattg
1164 61 ccgacatgag acagttaggt atcgtcgaga gttacaagct aaaacgagca gtagtcagct
1165 121 ctgcatctga agccgctgaa gttctactaa gggtggataa catcatccgt gcaagaccaa
1166 181 gaaccgccaa tagacaacat atgtaacata tttaggatat acctcgaaaa taataaaccg
1167 241 ccacactgtc attattataa ttagaaacag aacgcaaaaa ttatccacta tataattcaa
1168 301 agacgcgaaa aaaaaagaac aacgcgtcat agaacttttg gcaattcgcg tcacaaataa
1169 361 attttggcaa cttatgtttc ctcttcgagc agtactcgag ccctgtctca agaatgtaat
1170 421 aatacccatc gtaggtatgg ttaaagatag catctccaca acctcaaagc tccttgccga
1171 481 gagtcgccct cctttgtcga gtaattttca cttttcatat gagaacttat tttcttattc
1172 541 tttactctca catcctgtag tgattgacac tgcaacagcc accatcacta gaagaacaga
1173 601 acaattactt aatagaaaaa ttatatcttc ctcgaaacga tttcctgctt ccaacatcta
1174 661 cgtatatcaa gaagcattca cttaccatga cacagcttca gatttcatta ttgctgacag
1175 721 ctactatatc actactccat ctagtagtgg ccacgcccta tgaggcatat cctatcggaa
1176 781 aacaataccc cccagtggca agagtcaatg aatcgtttac atttcaaatt tccaatgata
1177 841 cctataaatc gtctgtagac aagacagctc aaataacata caattgcttc gacttaccga
1178 901 gctggctttc gtttgactct agttctagaa cgttctcagg tgaaccttct tctgacttac
1179 961 tatctgatgc gaacaccacg ttgtatttca atgtaatact cgagggtacg gactctgccg
1180 1021 acagcacgtc tttgaacaat acataccaat ttgttgttac aaaccgtcca tccatctcgc
1181 1081 tatcgtcaga tttcaatcta ttggcgttgt taaaaaacta tggttatact aacggcaaaa
1182 1141 acgctctgaa actagatcct aatgaagtct tcaacgtgac ttttgaccgt tcaatgttca
1183 1201 ctaacgaaga atccattgtg tcgtattacg gacgttctca gttgtataat gcgccgttac
1184 1261 ccaattggct gttcttcgat tctggcgagt tgaagtttac tgggacggca ccggtgataa
1185 1321 actcggcgat tgctccagaa acaagctaca gttttgtcat catcgctaca gacattgaag
1186 1381 gattttctgc cgttgaggta gaattcgaat tagtcatcgg ggctcaccag ttaactacct
1187 1441 ctattcaaaa tagtttgata atcaacgtta ctgacacagg taacgtttca tatgacttac
1188 1501 ctctaaacta tgtttatctc gatgacgatc ctatttcttc tgataaattg ggttctataa
1189 1561 acttattgga tgctccagac tgggtggcat tagataatgc taccatttcc gggtctgtcc
1190 1621 cagatgaatt actcggtaag aactccaatc ctgccaattt ttctgtgtcc atttatgata
1191 1681 cttatggtga tgtgatttat ttcaacttcg aagttgtctc cacaacggat ttgtttgcca
1192 1741 ttagttctct tcccaatatt aacgctacaa ggggtgaatg gttctcctac tattttttgc
1193 1801 cttctcagtt tacagactac gtgaatacaa acgtttcatt agagtttact aattcaagcc
1194 1861 aagaccatga ctgggtgaaa ttccaatcat ctaatttaac attagctgga gaagtgccca
1195 1921 agaatttcga caagctttca ttaggtttga aagcgaacca aggttcacaa tctcaagagc
1196 1981 tatattttaa catcattggc atggattcaa agataactca ctcaaaccac agtgcgaatg
1197 2041 caacgtccac aagaagttct caccactcca cctcaacaag ttcttacaca tcttctactt
1198 2101 acactgcaaa aatttcttct acctccgctg ctgctacttc ttctgctcca gcagcgctgc
1199 2161 cagcagccaa taaaacttca tctcacaata aaaaagcagt agcaattgcg tgcggtgttg
1200 2221 ctatcccatt aggcgttatc ctagtagctc tcatttgctt cctaatattc tggagacgca
1201 2281 gaagggaaaa tccagacgat gaaaacttac cgcatgctat tagtggacct gatttgaata
1202 2341 atcctgcaaa taaaccaaat caagaaaacg ctacaccttt gaacaacccc tttgatgatg
1203 2401 atgcttcctc gtacgatgat acttcaatag caagaagatt ggctgctttg aacactttga
1204 2461 aattggataa ccactctgcc actgaatctg atatttccag cgtggatgaa aagagagatt
1205 2521 ctctatcagg tatgaataca tacaatgatc agttccaatc ccaaagtaaa gaagaattat
1206 2581 tagcaaaacc cccagtacag cctccagaga gcccgttctt tgacccacag aataggtctt
1207 2641 cttctgtgta tatggatagt gaaccagcag taaataaatc ctggcgatat actggcaacc
1208 2701 tgtcaccagt ctctgatatt gtcagagaca gttacggatc acaaaaaact gttgatacag
1209 2761 aaaaactttt cgatttagaa gcaccagaga aggaaaaacg tacgtcaagg gatgtcacta
1210 2821 tgtcttcact ggacccttgg aacagcaata ttagcccttc tcccgtaaga aaatcagtaa
1211 2881 caccatcacc atataacgta acgaagcatc gtaaccgcca cttacaaaat attcaagact
1212 2941 ctcaaagcgg taaaaacgga atcactccca caacaatgtc aacttcatct tctgacgatt
1213 3001 ttgttccggt taaagatggt gaaaattttt gctgggtcca tagcatggaa ccagacagaa
1214 3061 gaccaagtaa gaaaaggtta gtagattttt caaataagag taatgtcaat gttggtcaag
1215 3121 ttaaggacat tcacggacgc atcccagaaa tgctgtgatt atacgcaacg atattttgct
1216 3181 taattttatt ttcctgtttt attttttatt agtggtttac agatacccta tattttattt
1217 3241 agtttttata cttagagaca tttaatttta attccattct tcaaatttca tttttgcact
1218 3301 taaaacaaag atccaaaaat gctctcgccc tcttcatatt gagaatacac tccattcaaa
1219 3361 attttgtcgt caccgctgat taatttttca ctaaactgat gaataatcaa aggccccacg
1220 3421 tcagaaccga ctaaagaagt gagttttatt ttaggaggtt gaaaaccatt attgtctggt
1221 3481 aaattttcat cttcttgaca tttaacccag tttgaatccc tttcaatttc tgctttttcc
1222 3541 tccaaactat cgaccctcct gtttctgtcc aacttatgtc ctagttccaa ttcgatcgca
1223 3601 ttaataactg cttcaaatgt tattgtgtca tcgttgactt taggtaattt ctccaaatgc
1224 3661 ataatcaaac tatttaagga agatcggaat tcgtcgaaca cttcagtttc cgtaatgatc
1225 3721 tgatcgtctt tatccacatg ttgtaattca ctaaaatcta aaacgtattt ttcaatgcat
1226 3781 aaatcgttct ttttattaat aatgcagatg gaaaatctgt aaacgtgcgt taatttagaa
1227 3841 agaacatcca gtataagttc ttctatatag tcaattaaag caggatgcct attaatggga
1228 3901 acgaactgcg gcaagttgaa tgactggtaa gtagtgtagt cgaatgactg aggtgggtat
1229 3961 acatttctat aaaataaaat caaattaatg tagcatttta agtataccct cagccacttc
1230 4021 tctacccatc tattcataaa gctgacgcaa cgattactat tttttttttc ttcttggatc
1231 4081 tcagtcgtcg caaaaacgta taccttcttt ttccgacctt ttttttagct ttctggaaaa
1232 4141 gtttatatta gttaaacagg gtctagtctt agtgtgaaag ctagtggttt cgattgactg
1233 4201 atattaagaa agtggaaatt aaattagtag tgtagacgta tatgcatatg tatttctcgc
1234 4261 ctgtttatgt ttctacgtac ttttgattta tagcaagggg aaaagaaata catactattt
1235 4321 tttggtaaag gtgaaagcat aatgtaaaag ctagaataaa atggacgaaa taaagagagg
1236 4381 cttagttcat cttttttcca aaaagcaccc aatgataata actaaaatga aaaggatttg
1237 4441 ccatctgtca gcaacatcag ttgtgtgagc aataataaaa tcatcacctc cgttgccttt
1238 4501 agcgcgtttg tcgtttgtat cttccgtaat tttagtctta tcaatgggaa tcataaattt
1239 4561 tccaatgaat tagcaatttc gtccaattct ttttgagctt cttcatattt gctttggaat
1240 4621 tcttcgcact tcttttccca ttcatctctt tcttcttcca aagcaacgat ccttctaccc
1241 4681 atttgctcag agttcaaatc ggcctctttc agtttatcca ttgcttcctt cagtttggct
1242 4741 tcactgtctt ctagctgttg ttctagatcc tggtttttct tggtgtagtt ctcattatta
1243 4801 gatctcaagt tattggagtc ttcagccaat tgctttgtat cagacaattg actctctaac
1244 4861 ttctccactt cactgtcgag ttgctcgttt ttagcggaca aagatttaat ctcgttttct
1245 4921 ttttcagtgt tagattgctc taattctttg agctgttctc tcagctcctc atatttttct
1246 4981 tgccatgact cagattctaa ttttaagcta ttcaatttct ctttgatc
1247 //"""
1248
1249
1250
1251 gbk_example2 = \
1252 """LOCUS AAD51968 143 aa linear BCT 21-AUG-2001
1253 DEFINITION transcriptional regulator RovA [Yersinia enterocolitica].
1254 ACCESSION AAD51968
1255 VERSION AAD51968.1 GI:5805369
1256 DBSOURCE locus AF171097 accession AF171097.1
1257 KEYWORDS .
1258 SOURCE Yersinia enterocolitica
1259 ORGANISM Yersinia enterocolitica
1260 Bacteria; Proteobacteria; Gammaproteobacteria; Enterobacteriales;
1261 Enterobacteriaceae; Yersinia.
1262 REFERENCE 1 (residues 1 to 143)
1263 AUTHORS Revell,P.A. and Miller,V.L.
1264 TITLE A chromosomally encoded regulator is required for expression of the
1265 Yersinia enterocolitica inv gene and for virulence
1266 JOURNAL Mol. Microbiol. 35 (3), 677-685 (2000)
1267 MEDLINE 20138369
1268 PUBMED 10672189
1269 REFERENCE 2 (residues 1 to 143)
1270 AUTHORS Revell,P.A. and Miller,V.L.
1271 TITLE Direct Submission
1272 JOURNAL Submitted (22-JUL-1999) Molecular Microbiology, Washington
1273 University School of Medicine, Campus Box 8230, 660 South Euclid,
1274 St. Louis, MO 63110, USA
1275 COMMENT Method: conceptual translation.
1276 FEATURES Location/Qualifiers
1277 source 1..143
1278 /organism="Yersinia enterocolitica"
1279 /mol_type="unassigned DNA"
1280 /strain="JB580v"
1281 /serotype="O:8"
1282 /db_xref="taxon:630"
1283 Protein 1..143
1284 /product="transcriptional regulator RovA"
1285 /name="regulates inv expression"
1286 CDS 1..143
1287 /gene="rovA"
1288 /coded_by="AF171097.1:380..811"
1289 /note="regulator of virulence"
1290 /transl_table=11
1291 ORIGIN
1292 1 mestlgsdla rlvrvwrali dhrlkplelt qthwvtlhni nrlppeqsqi qlakaigieq
1293 61 pslvrtldql eekglitrht candrrakri klteqsspii eqvdgvicst rkeilggisp
1294 121 deiellsgli dklerniiql qsk
1295 //
1296 """
1297
1298 embl_example="""ID X56734; SV 1; linear; mRNA; STD; PLN; 1859 BP.
1299 XX
1300 AC X56734; S46826;
1301 XX
1302 DT 12-SEP-1991 (Rel. 29, Created)
1303 DT 25-NOV-2005 (Rel. 85, Last updated, Version 11)
1304 XX
1305 DE Trifolium repens mRNA for non-cyanogenic beta-glucosidase
1306 XX
1307 KW beta-glucosidase.
1308 XX
1309 OS Trifolium repens (white clover)
1310 OC Eukaryota; Viridiplantae; Streptophyta; Embryophyta; Tracheophyta;
1311 OC Spermatophyta; Magnoliophyta; eudicotyledons; core eudicotyledons; rosids;
1312 OC eurosids I; Fabales; Fabaceae; Papilionoideae; Trifolieae; Trifolium.
1313 XX
1314 RN [5]
1315 RP 1-1859
1316 RX PUBMED; 1907511.
1317 RA Oxtoby E., Dunn M.A., Pancoro A., Hughes M.A.;
1318 RT "Nucleotide and derived amino acid sequence of the cyanogenic
1319 RT beta-glucosidase (linamarase) from white clover (Trifolium repens L.)";
1320 RL Plant Mol. Biol. 17(2):209-219(1991).
1321 XX
1322 RN [6]
1323 RP 1-1859
1324 RA Hughes M.A.;
1325 RT ;
1326 RL Submitted (19-NOV-1990) to the EMBL/GenBank/DDBJ databases.
1327 RL Hughes M.A., University of Newcastle Upon Tyne, Medical School, Newcastle
1328 RL Upon Tyne, NE2 4HH, UK
1329 XX
1330 FH Key Location/Qualifiers
1331 FH
1332 FT source 1..1859
1333 FT /organism="Trifolium repens"
1334 FT /mol_type="mRNA"
1335 FT /clone_lib="lambda gt10"
1336 FT /clone="TRE361"
1337 FT /tissue_type="leaves"
1338 FT /db_xref="taxon:3899"
1339 FT CDS 14..1495
1340 FT /product="beta-glucosidase"
1341 FT /EC_number="3.2.1.21"
1342 FT /note="non-cyanogenic"
1343 FT /db_xref="GOA:P26204"
1344 FT /db_xref="InterPro:IPR001360"
1345 FT /db_xref="InterPro:IPR013781"
1346 FT /db_xref="UniProtKB/Swiss-Prot:P26204"
1347 FT /protein_id="CAA40058.1"
1348 FT /translation="MDFIVAIFALFVISSFTITSTNAVEASTLLDIGNLSRSSFPRGFI
1349 FT FGAGSSAYQFEGAVNEGGRGPSIWDTFTHKYPEKIRDGSNADITVDQYHRYKEDVGIMK
1350 FT DQNMDSYRFSISWPRILPKGKLSGGINHEGIKYYNNLINELLANGIQPFVTLFHWDLPQ
1351 FT VLEDEYGGFLNSGVINDFRDYTDLCFKEFGDRVRYWSTLNEPWVFSNSGYALGTNAPGR
1352 FT CSASNVAKPGDSGTGPYIVTHNQILAHAEAVHVYKTKYQAYQKGKIGITLVSNWLMPLD
1353 FT DNSIPDIKAAERSLDFQFGLFMEQLTTGDYSKSMRRIVKNRLPKFSKFESSLVNGSFDF
1354 FT IGINYYSSSYISNAPSHGNAKPSYSTNPMTNISFEKHGIPLGPRAASIWIYVYPYMFIQ
1355 FT EDFEIFCYILKINITILQFSITENGMNEFNDATLPVEEALLNTYRIDYYYRHLYYIRSA
1356 FT IRAGSNVKGFYAWSFLDCNEWFAGFTVRFGLNFVD"
1357 FT mRNA 1..1859
1358 FT /experiment="experimental evidence, no additional details
1359 FT recorded"
1360 XX
1361 SQ Sequence 1859 BP; 609 A; 314 C; 355 G; 581 T; 0 other;
1362 aaacaaacca aatatggatt ttattgtagc catatttgct ctgtttgtta ttagctcatt 60
1363 cacaattact tccacaaatg cagttgaagc ttctactctt cttgacatag gtaacctgag 120
1364 tcggagcagt tttcctcgtg gcttcatctt tggtgctgga tcttcagcat accaatttga 180
1365 aggtgcagta aacgaaggcg gtagaggacc aagtatttgg gataccttca cccataaata 240
1366 tccagaaaaa ataagggatg gaagcaatgc agacatcacg gttgaccaat atcaccgcta 300
1367 caaggaagat gttgggatta tgaaggatca aaatatggat tcgtatagat tctcaatctc 360
1368 ttggccaaga atactcccaa agggaaagtt gagcggaggc ataaatcacg aaggaatcaa 420
1369 atattacaac aaccttatca acgaactatt ggctaacggt atacaaccat ttgtaactct 480
1370 ttttcattgg gatcttcccc aagtcttaga agatgagtat ggtggtttct taaactccgg 540
1371 tgtaataaat gattttcgag actatacgga tctttgcttc aaggaatttg gagatagagt 600
1372 gaggtattgg agtactctaa atgagccatg ggtgtttagc aattctggat atgcactagg 660
1373 aacaaatgca ccaggtcgat gttcggcctc caacgtggcc aagcctggtg attctggaac 720
1374 aggaccttat atagttacac acaatcaaat tcttgctcat gcagaagctg tacatgtgta 780
1375 taagactaaa taccaggcat atcaaaaggg aaagataggc ataacgttgg tatctaactg 840
1376 gttaatgcca cttgatgata atagcatacc agatataaag gctgccgaga gatcacttga 900
1377 cttccaattt ggattgttta tggaacaatt aacaacagga gattattcta agagcatgcg 960
1378 gcgtatagtt aaaaaccgat tacctaagtt ctcaaaattc gaatcaagcc tagtgaatgg 1020
1379 ttcatttgat tttattggta taaactatta ctcttctagt tatattagca atgccccttc 1080
1380 acatggcaat gccaaaccca gttactcaac aaatcctatg accaatattt catttgaaaa 1140
1381 acatgggata cccttaggtc caagggctgc ttcaatttgg atatatgttt atccatatat 1200
1382 gtttatccaa gaggacttcg agatcttttg ttacatatta aaaataaata taacaatcct 1260
1383 gcaattttca atcactgaaa atggtatgaa tgaattcaac gatgcaacac ttccagtaga 1320
1384 agaagctctt ttgaatactt acagaattga ttactattac cgtcacttat actacattcg 1380
1385 ttctgcaatc agggctggct caaatgtgaa gggtttttac gcatggtcat ttttggactg 1440
1386 taatgaatgg tttgcaggct ttactgttcg ttttggatta aactttgtag attagaaaga 1500
1387 tggattaaaa aggtacccta agctttctgc ccaatggtac aagaactttc tcaaaagaaa 1560
1388 ctagctagta ttattaaaag aactttgtag tagattacag tacatcgttt gaagttgagt 1620
1389 tggtgcacct aattaaataa aagaggttac tcttaacata tttttaggcc attcgttgtg 1680
1390 aagttgttag gctgttattt ctattatact atgttgtagt aataagtgca ttgttgtacc 1740
1391 agaagctatg atcataacta taggttgatc cttcatgtat cagtttgatg ttgagaatac 1800
1392 tttgaattaa aagtcttttt ttattttttt aaaaaaaaaa aaaaaaaaaa aaaaaaaaa 1859
1393 //
1394 """
1395
1396 print "GenBank CDS Iteration"
1397 print "====================="
1398
1399 g = GenBankScanner()
1400 for record in g.parse_cds_features(StringIO(gbk_example)) :
1401 print record
1402
1403 g = GenBankScanner()
1404 for record in g.parse_cds_features(StringIO(gbk_example2),
1405 tags2id=('gene','locus_tag','product')) :
1406 print record
1407
1408 g = GenBankScanner()
1409 for record in g.parse_cds_features(StringIO(gbk_example + "\n" + gbk_example2),
1410 tags2id=('gene','locus_tag','product')) :
1411 print record
1412
1413 print
1414 print "GenBank Iteration"
1415 print "================="
1416 g = GenBankScanner()
1417 for record in g.parse_records(StringIO(gbk_example),do_features=False) :
1418 print record.id, record.name, record.description
1419 print record.seq
1420
1421 g = GenBankScanner()
1422 for record in g.parse_records(StringIO(gbk_example),do_features=True) :
1423 print record.id, record.name, record.description
1424 print record.seq
1425
1426 g = GenBankScanner()
1427 for record in g.parse_records(StringIO(gbk_example2),do_features=False) :
1428 print record.id, record.name, record.description
1429 print record.seq
1430
1431 g = GenBankScanner()
1432 for record in g.parse_records(StringIO(gbk_example2),do_features=True) :
1433 print record.id, record.name, record.description
1434 print record.seq
1435
1436 print
1437 print "EMBL CDS Iteration"
1438 print "=================="
1439
1440 e = EmblScanner()
1441 for record in e.parse_cds_features(StringIO(embl_example)) :
1442 print record
1443
1444 print
1445 print "EMBL Iteration"
1446 print "=============="
1447 e = EmblScanner()
1448 for record in e.parse_records(StringIO(embl_example),do_features=True) :
1449 print record.id, record.name, record.description
1450 print record.seq
1451