PEATDB/sequence_alignment.py
def Protool2pir(sequence):
    """ Reformats a protool style sequence to a regular one-letter sequence"""
    import Protool
    X=Protool.structureIO()
    seq=''
    #
    # Get rid of final stop codon
    #
    if sequence[-1][1]=='***':
        sequence=sequence[:-1]
    ignored={}
    for aa in sequence:
        if aa[1]:
            #
            # Ignore water
            #
            if not X.three_to_one.has_key(aa[1]):
                ignored[aa[1]]=1
            else:
                seq=seq+X.three_to_one[aa[1]]
        else:
            seq=seq+'-'
    return seq,ignored
 Reformats a protool style sequence to a regular one-letter sequence
Reformats a protool style sequence to a regular one-letter sequence
Reformats a protool style sequence to a regular one - letter sequence
def Protool2pir(sequence):
    import Protool
    X=Protool.structureIO()
    seq=''
     Get rid of final stop codon
    if sequence[-1][1]=='***':
        sequence=sequence[:-1]
    ignored={}
    for aa in sequence:
        if aa[1]:
             Ignore water
            if not X.three_to_one.has_key(aa[1]):
                ignored[aa[1]]=1
            else:
                seq=seq+X.three_to_one[aa[1]]
        else:
            seq=seq+'-'
    return seq,ignored
def Protool2pir ( sequence ) : import Protool X = Protool . structureIO ( ) seq = '' if sequence [ - 1 ] [ 1 ] == '***' : sequence = sequence [ : - 1 ] ignored = { } for aa in sequence : if aa [ 1 ] : if not X . three_to_one . has_key ( aa [ 1 ] ) : ignored [ aa [ 1 ] ] = 1 else : seq = seq + X . three_to_one [ aa [ 1 ] ] else : seq = seq + '-' return seq , ignored
Reformats a protool style sequence to a regular one-letter sequence
Reformats a protool style sequence to a regular one - letter sequence
""" Reformats a protool style sequence to a regular one-letter sequence""" # # Get rid of final stop codon # # # Ignore water #
sequence