Changeset 107 for biocomp.pscoils/trunk/tests/tests_coils.py
- Timestamp:
- 10/18/09 19:27:54 (3 years ago)
- Location:
- biocomp.pscoils/trunk
- Files:
-
- 2 modified
-
. (modified) (1 prop)
-
tests/tests_coils.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
biocomp.pscoils/trunk
-
Property
svn:mergeinfo set
to
/biocomp.pscoils/branches/biopython-enabled merged eligible
-
Property
svn:mergeinfo set
to
-
biocomp.pscoils/trunk/tests/tests_coils.py
r10 r107 3 3 from unittest import TestCase 4 4 import StringIO 5 import biocomp.pscoils 5 from biocomp.pscoils import pred_coil 6 from biocomp.pscoils.utils import readFasta, printCoil 7 from biocomp.pscoils.Params import Params 8 from Bio.SeqRecord import SeqRecord 6 9 7 10 class test_suite(TestCase): … … 12 15 win=21 13 16 modeprofile=False 14 seqs= biocomp.pscoils.readFasta("tests/ferritin.fasta")17 seqs=readFasta("tests/ferritin.fasta") 15 18 modefasta=True 16 19 labels='F' 17 params= biocomp.pscoils.Params.Params(weight,win)20 params=Params(weight,win) 18 21 output = StringIO.StringIO() 19 22 for name in seqs.keys(): 20 gg,gcc,prob,hept_seq,score=biocomp.pscoils.pred_coil(seqs[name],len(seqs[name]),params,biocomp.pscoils.seqScore) 21 biocomp.pscoils.printCoil(seqs[name],len(seqs[name]),hept_seq,score,prob,gcc,gg,labels,io=output) 23 seqr = SeqRecord(seqs[name], id=name) 24 seqr = pred_coil(seqr, params) 25 printCoil(seqr,labels,io=output) 22 26 bench_output = open("tests/ferritin.Coils").read() 23 27 self.assertEqual(output.getvalue(),bench_output) … … 29 33 win=21 30 34 modeprofile=False 31 seqs= biocomp.pscoils.readFasta("tests/ceba_bovin.fasta")35 seqs=readFasta("tests/ceba_bovin.fasta") 32 36 modefasta=True 33 37 labels='F' 34 params= biocomp.pscoils.Params.Params(weight,win)38 params=Params(weight,win) 35 39 output = StringIO.StringIO() 36 40 for name in seqs.keys(): 37 gg,gcc,prob,hept_seq,score=biocomp.pscoils.pred_coil(seqs[name],len(seqs[name]),params,biocomp.pscoils.seqScore) 38 biocomp.pscoils.printCoil(seqs[name],len(seqs[name]),hept_seq,score,prob,gcc,gg,labels,io=output) 41 seqr = SeqRecord(seqs[name], id=name) 42 seqr = pred_coil(seqr, params) 43 printCoil(seqr,labels,io=output) 39 44 bench_output = open("tests/ceba_bovin.Coils").read() 40 45 self.assertEqual(output.getvalue(),bench_output)
