Show
Ignore:
Timestamp:
10/18/09 19:27:54 (3 years ago)
Author:
mauro
Message:

pre tag 1.0.0

Location:
biocomp.pscoils/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • biocomp.pscoils/trunk

  • biocomp.pscoils/trunk/tests/tests_coils.py

    r10 r107  
    33from unittest import TestCase 
    44import StringIO 
    5 import biocomp.pscoils 
     5from biocomp.pscoils import pred_coil 
     6from biocomp.pscoils.utils import readFasta, printCoil 
     7from biocomp.pscoils.Params import Params 
     8from Bio.SeqRecord import SeqRecord 
    69 
    710class test_suite(TestCase): 
     
    1215        win=21 
    1316        modeprofile=False 
    14         seqs=biocomp.pscoils.readFasta("tests/ferritin.fasta") 
     17        seqs=readFasta("tests/ferritin.fasta") 
    1518        modefasta=True 
    1619        labels='F' 
    17         params=biocomp.pscoils.Params.Params(weight,win) 
     20        params=Params(weight,win) 
    1821        output = StringIO.StringIO() 
    1922        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) 
    2226        bench_output = open("tests/ferritin.Coils").read() 
    2327        self.assertEqual(output.getvalue(),bench_output)         
     
    2933        win=21 
    3034        modeprofile=False 
    31         seqs=biocomp.pscoils.readFasta("tests/ceba_bovin.fasta") 
     35        seqs=readFasta("tests/ceba_bovin.fasta") 
    3236        modefasta=True 
    3337        labels='F' 
    34         params=biocomp.pscoils.Params.Params(weight,win) 
     38        params=Params(weight,win) 
    3539        output = StringIO.StringIO() 
    3640        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) 
    3944        bench_output = open("tests/ceba_bovin.Coils").read() 
    4045        self.assertEqual(output.getvalue(),bench_output)