1
2
3
4
5
6
7 from Bio.GenBank.Scanner import GenBankScanner, EmblScanner
8 from Bio.Alphabet import generic_protein
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
31 """Breaks up a Genbank file into SeqRecord objects
32
33 Every section from the LOCUS line to the terminating // becomes
34 a single SeqRecord with associated annotation and features.
35
36 Note that for genomes or chromosomes, there is typically only
37 one record."""
38
39 return GenBankScanner(debug=0).parse_records(handle)
40
42 """Breaks up an EMBL file into SeqRecord objects
43
44 Every section from the LOCUS line to the terminating // becomes
45 a single SeqRecord with associated annotation and features.
46
47 Note that for genomes or chromosomes, there is typically only
48 one record."""
49
50 return EmblScanner(debug=0).parse_records(handle)
51
53 """Breaks up a Genbank file into SeqRecord objects for each CDS feature
54
55 Every section from the LOCUS line to the terminating // can contain
56 many CDS features. These are returned as with the stated amino acid
57 translation sequence (if given).
58 """
59
60 return GenBankScanner(debug=0).parse_cds_features(handle, alphabet)
61
63 """Breaks up a EMBL file into SeqRecord objects for each CDS feature
64
65 Every section from the LOCUS line to the terminating // can contain
66 many CDS features. These are returned as with the stated amino acid
67 translation sequence (if given).
68 """
69
70 return EmblScanner(debug=0).parse_cds_features(handle, alphabet)
71