當前位置: 首頁>>代碼示例>>Python>>正文


Python Protool.structure方法代碼示例

本文整理匯總了Python中Protool.structure方法的典型用法代碼示例。如果您正苦於以下問題:Python Protool.structure方法的具體用法?Python Protool.structure怎麽用?Python Protool.structure使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Protool的用法示例。


在下文中一共展示了Protool.structure方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: convert_PEAT_to_classic

# 需要導入模塊: import Protool [as 別名]
# 或者: from Protool import structure [as 別名]
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
開發者ID:yongwangCPH,項目名稱:peat,代碼行數:18,代碼來源:pKD_tools.py

示例2: __init__

# 需要導入模塊: import Protool [as 別名]
# 或者: from Protool import structure [as 別名]
    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
開發者ID:yongwangCPH,項目名稱:peat,代碼行數:49,代碼來源:pKa_CO.py


注:本文中的Protool.structure方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。