Show
Ignore:
Timestamp:
06/10/08 23:46:02 (4 years ago)
Author:
mauro
Message:
 
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • biocomp.pscoils/branches/biopython-enabled/scripts/pscoils

    r24 r27  
    22import sys 
    33import biocomp.pscoils 
     4from biocomp.pscoils import pred_coil 
     5from biocomp.pscoils.utils import readFasta, printCoil 
    46import getopt 
    57import string 
     8from Bio.SeqRecord import SeqRecord 
    69 
    710def usage(prog): 
     
    3134    for o,a in opts: 
    3235        if o == '-f': 
    33             seqs=biocomp.pscoils.readFasta(a) 
     36            seqs=readFasta(a) 
    3437            modefasta=True 
    3538        elif o == '-p': 
     
    5558        #use both  
    5659        for name in seqs.keys(): # WARNING We assume only one sequence!!! 
    57             gg,gcc,prob,hept_seq,score=biocomp.pscoils.pred_coil2(seqs[name],prof,params,wlambda)  
    58             biocomp.pscoils.printCoil(seqs[name],len(seqs[name]),hept_seq,score,prob,gcc,gg,labels) 
     60                # TODO 
     61            raise("TODO") 
     62            gg,gcc,prob,hept_seq,score=biocomp.pscoils.pred_coil2(seqs[name],prof,params,wlambda)  
     63            printCoil(seqs[name],len(seqs[name]),hept_seq,score,prob,gcc,gg,labels) 
    5964    elif modefasta: 
    6065        for name in seqs.keys(): 
    61             gg,gcc,prob,hept_seq,score=biocomp.pscoils.pred_coil(seqs[name],len(seqs[name]),params,biocomp.pscoils.seqScore) 
    62             biocomp.pscoils.printCoil(seqs[name],len(seqs[name]),hept_seq,score,prob,gcc,gg,labels) 
     66                seqr = SeqRecord(seqs[name], id=name) 
     67                seqr = pred_coil(seqr, params) 
     68                printCoil(seqr,labels) 
    6369    elif modeprofile: 
     70        # TODO 
     71        raise("TODO") 
    6472        gg,gcc,prob,hept_seq,score=biocomp.pscoils.pred_coil(prof,profLen,params,biocomp.pscoils.profScore) 
    6573        biocomp.pscoils.printCoil('x'*profLen,profLen,hept_seq,score,prob,gcc,gg,labels)