File: test_nbrf.py

package info (click to toggle)
python-biopython 1.45-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 18,192 kB
  • ctags: 12,310
  • sloc: python: 83,505; xml: 13,834; ansic: 7,015; cpp: 1,855; sql: 1,144; makefile: 179
file content (28 lines) | stat: -rw-r--r-- 599 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""Tests the basic functionality of the KEGG parsers.
"""

import os

import Bio.NBRF
from Bio.File import SGMLHandle

testfiles   = [  'B_nuc.pir', 'Cw_prot.pir', 'DMA_nuc.pir', 'DMB_prot.pir',
                 'clustalw.pir']

for file in testfiles:
    fh = open(os.path.join("NBRF", file))
    print "Testing Bio.NBRF on " + file + "\n\n"
    records = Bio.NBRF.Iterator(fh, Bio.NBRF.RecordParser(debug_level=0))
    while 1:
#    for j in range( 0, 1 ):
        record = records.next()
        if record is not None:
            print record
        else:
            break
    print "\n"