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


Python Constants.getTermModHashForPairConfig方法代码示例

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


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

示例1: getPairsThread

# 需要导入模块: import Constants [as 别名]
# 或者: from Constants import getTermModHashForPairConfig [as 别名]
    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)
#    samePeptideClusters = An.getSamePeptideClusters(precMassClusters, scanFDict, clusterSVMModel, clusterSVMRanges, ppmSTD=options.ppmstd, cutOff=4)

    # To test without any clustering
    #samePeptideClusters = [[scanF] for scanF in scanFDict]
    
    for pairConfigName in paramsDict['Pair Configurations']:
        
        print 'Getting heavy-light pairs for %s' % (pairConfigName,)
        t1 = time.time()

        pairConfig = paramsDict['Pair Configurations'][pairConfigName]
        pairs = Analytics.findDeltaPairsClusters(samePeptideClusters, scanFDict, pairConfig['NMod']+pairConfig['CMod'], ppm=options.ppmstd)
        addEnds = DNS.getSpectrumGraphEndpointInitFunction(pairConfig['NStatic'], pairConfig['CStatic'], paramsDict['Enzyme']['specificity'])
        termModHash = Constants.getTermModHashForPairConfig(pairConfig)
        
        svmModel = svmutil.svm_load_model(parent + pairConfig['Model'])
        svmRange = svmutil.load_ranges(parent + os.path.splitext(pairConfig['Model'])[0] + '.range')
        
        xVals = []
        # xVals = getPairsThread(pairs)
        for pair in pairs:
            lightSpecs = [DataFile.getMassIntPairs(scanFDict[lightScanF]['dta']) for lightScanF in samePeptideClusters[pair[0]]]
            heavySpecs = [DataFile.getMassIntPairs(scanFDict[heavyScanF]['dta']) for heavyScanF in samePeptideClusters[pair[1]]]
            lightPrecMass = np.average(np.array([scanFDict[lightScanF]['precMass'] for lightScanF in samePeptideClusters[pair[0]]]))

            epSTD = options.ppmstd * 10 ** -6 * lightPrecMass

            lightMergedSpec = SA.mergeSpectra(lightSpecs, epsilon=2*epSTD)
            heavyMergedSpec = SA.mergeSpectra(heavySpecs, epsilon=2*epSTD)
开发者ID:adevabhaktuni,项目名称:LADS,代码行数:33,代码来源:SequenceDTAsTDVThreaded.py


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