当前位置: 首页>>代码示例>>Python>>正文


Python Constants.addPepsToAADict方法代码示例

本文整理汇总了Python中Constants.addPepsToAADict方法的典型用法代码示例。如果您正苦于以下问题:Python Constants.addPepsToAADict方法的具体用法?Python Constants.addPepsToAADict怎么用?Python Constants.addPepsToAADict使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Constants的用法示例。


在下文中一共展示了Constants.addPepsToAADict方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: open

# 需要导入模块: import Constants [as 别名]
# 或者: from Constants import addPepsToAADict [as 别名]
            "epsilon",
            "ambiguous edges",
            "num ambig edges",
        ]

    if options.output:
        outFile = open(options.output, "w")
        outFile.write("\t".join([col.upper() for col in cols]) + "\n")

    t1 = time.time()
    print "Configuring LADS for sequencing..."
    ETDPNet = PN.ProbNetwork(paramsDict["Models"]["etd"]["config"], paramsDict["Models"]["etd"]["model"])
    HCDPNet = PN.ProbNetwork(paramsDict["Models"]["hcd"]["config"], paramsDict["Models"]["hcd"]["model"])
    dtaList = glob.glob(options.dtadir + "/*.dta")
    scanFDict = getScanFDict(dtaList)
    aas = Constants.addPepsToAADict(options.minedge)
    hashedAAs = Constants.hashAAsEpsilonRange(aas, epStep, maxEp)

    ambigOpenPenalty = 0
    ambigPenaltyFun = DNS.getAmbigEdgePenaltyFunction(options.minedge, ambigOpenPenalty, options.ambigpenalty)
    ppmPenaltyFun = DNS.getPPMPenaltyFun(
        options.ppmstd, hashedAAs, options.minedge, options.ppmpenalty, options.ppmsyserror, epStep
    )

    addEnds = DNS.getSpectrumGraphEndpointInitFunction(
        np.array(Constants.NTermMods.values()),
        np.array(Constants.CTermMods.values()),
        paramsDict["Enzyme"]["specificity"],
    )
    termModHash = Constants.createTermModHashAAs(
        N=copy.deepcopy(Constants.NTermMods), C=copy.deepcopy(Constants.CTermMods)
开发者ID:adevabhaktuni,项目名称:LADS,代码行数:33,代码来源:SequenceDTAsCompFrag.py

示例2: open

# 需要导入模块: import Constants [as 别名]
# 或者: from Constants import addPepsToAADict [as 别名]
        with open(options.columns) as fin:
            cols = pickle.load(fin)
    else:
        print 'Using default cols'
        cols = ['light scan', 'heavy scan', 'pair configuration', 'M+H', 'score', 'seq', 'epsilon', 'ambiguous edges', 'num ambig edges']
    
    if options.output:
        outFile = open(options.output, 'w')
        outFile.write('\t'.join([col.upper() for col in cols]) + '\n')
    
    PNet = PN.ProbNetwork(options.config, options.model)

    dtaList = glob.glob(options.dtadir + '/*.dta')
    scanFDict = getScanFDict(dtaList)
    
    aas = Constants.addPepsToAADict(300)
    hashedAAs = Constants.hashAAsEpsilonRange(aas, epStep, maxEp)
    
    ambigOpenPenalty = 0
    ambigPenaltyFun = DNS.getAmbigEdgePenaltyFunction(options.minedge, ambigOpenPenalty, options.ambigpenalty)
    ppmPenaltyFun = DNS.getPPMPenaltyFun(options.ppmstd, hashedAAs, options.minedge, options.ppmpenalty, options.ppmsyserror, epStep)
    
    print 'Getting Clusters'
    parent = os.path.abspath(os.pardir)
    clusterSVMModel = svmutil.svm_load_model(parent + paramsDict['Cluster Configuration']['model'])
    clusterSVMRanges = svmutil.load_ranges(parent + os.path.splitext((paramsDict['Cluster Configuration']['model']))[0] + '.range')

    precMassClusters = Analytics.findSamePrecMassClusters(dtaList, ppm=options.ppmstd)
#    print 'precMassClusters', precMassClusters                                                                                                                                                                      
    samePeptideClusters = Analytics.getSamePeptideClusters(precMassClusters, scanFDict, clusterSVMModel, clusterSVMRanges, ppmSTD=options.ppmstd, cutOff=float(paramsDict['Cluster Configuration']['cutoff']))
#    samePeptideClusters = Analytics.getSamePeptideClusters(precMassClusters, scanFDict, clusterSVMModel, clusterSVMRanges, ppmSTD=options.ppmstd, cutOff=4)
开发者ID:adevabhaktuni,项目名称:LADS,代码行数:33,代码来源:SequenceDTAsTDVThreaded.py

示例3: loadInit

# 需要导入模块: import Constants [as 别名]
# 或者: from Constants import addPepsToAADict [as 别名]
 def loadInit(self):
     self._paramsDict = DataFile.parseParams(self._selectedInitFile.get())
     with open('../Misc/symbolmap.txt', 'r') as fin:
         symbolMap = pickle.load(fin)
     self._seqMap = DataFile.generateSeqMap({'LADS Unit Test': 'LADS'}, symbolMap, self._paramsDict)['LADS Unit Test']
     self._aas = Constants.addPepsToAADict(self._minedge)
开发者ID:adevabhaktuni,项目名称:LADS,代码行数:8,代码来源:LADSGUI.py


注:本文中的Constants.addPepsToAADict方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。