Exemplo n.º 1
0
def convert_PEAT_to_classic(operations):
    operations=get_single_operations(operations)
    newops=[]
    import string, Protool
    PI=Protool.structure()
    for operation in operations:
        resid=get_resid_from_mut(operation)
        old=PI.three_to_one[get_oldrestyp_from_mut(operation)]
        new=PI.three_to_one[get_newrestyp_from_mut(operation)]
        resnum=get_resnum_from_mut(operation)
        resnum=string.lstrip(resnum,'0')
        classic='%s%s%s' %(old,resnum.strip(),new)
        newops.append(classic)

    classicops=string.join(newops,'+')
    return classicops
Exemplo n.º 2
0
def convert_PEAT_to_classic(operations):
    operations = get_single_operations(operations)
    newops = []
    import string, Protool
    PI = Protool.structure()
    for operation in operations:
        resid = get_resid_from_mut(operation)
        old = PI.three_to_one[get_oldrestyp_from_mut(operation)]
        new = PI.three_to_one[get_newrestyp_from_mut(operation)]
        resnum = get_resnum_from_mut(operation)
        resnum = string.lstrip(resnum, '0')
        classic = '%s%s%s' % (old, resnum.strip(), new)
        newops.append(classic)

    classicops = string.join(newops, '+')
    return classicops
Exemplo n.º 3
0
    def __init__(self, pdbfiles):
        """Calculate a score for sequence-local contacts"""
        import Protool

        self.X = Protool.structure()

        for pdbfile in pdbfiles:
            xs = []
            ys = []
            labels = []
            count = 0
            PI = self.get_PDB(pdbfile)
            seq = PI.PirSeq(PI.sequence)
            window = 4 * [None]
            residues = 4 * [None]
            for residue, type in PI.sequence[:3]:
                window.append(type)
                residues.append(residue)
            for residue, type in PI.sequence[3:]:

                window.append(type)
                window = window[1:]
                #
                residues.append(residue)
                residues = residues[1:]
                # print window
                if window[3] in ["ASP", "GLU"]:  # ,'LYS','HIS','ARG']:
                    # print window
                    score = self.score_window(window)
                    print residues[3], window[3], score
                    xs.append(count)
                    labels.append(residues[3] + ":%s" % window[3])
                    ys.append(score)
                    count = count + 1
            #
            # Plot a bar chart
            #
            import pylab

            pylab.bar(xs, ys)
            import numpy

            xs = numpy.array(xs)
            pylab.xticks(xs + 0.5, labels, rotation="vertical", size="x-small")
            pylab.title("dpKa values")
            pylab.show()
        return
Exemplo n.º 4
0
    def __init__(self, pdbfiles):
        """Calculate a score for sequence-local contacts"""
        import Protool
        self.X = Protool.structure()

        for pdbfile in pdbfiles:
            xs = []
            ys = []
            labels = []
            count = 0
            PI = self.get_PDB(pdbfile)
            seq = PI.PirSeq(PI.sequence)
            window = 4 * [None]
            residues = 4 * [None]
            for residue, type in PI.sequence[:3]:
                window.append(type)
                residues.append(residue)
            for residue, type in PI.sequence[3:]:

                window.append(type)
                window = window[1:]
                #
                residues.append(residue)
                residues = residues[1:]
                #print window
                if window[3] in ['ASP', 'GLU']:  #,'LYS','HIS','ARG']:
                    #print window
                    score = self.score_window(window)
                    print residues[3], window[3], score
                    xs.append(count)
                    labels.append(residues[3] + ':%s' % window[3])
                    ys.append(score)
                    count = count + 1
            #
            # Plot a bar chart
            #
            import pylab
            pylab.bar(xs, ys)
            import numpy
            xs = numpy.array(xs)
            pylab.xticks(xs + 0.5, labels, rotation='vertical', size='x-small')
            pylab.title('dpKa values')
            pylab.show()
        return