本文整理汇总了Python中Constants.createTermModHashAAs方法的典型用法代码示例。如果您正苦于以下问题:Python Constants.createTermModHashAAs方法的具体用法?Python Constants.createTermModHashAAs怎么用?Python Constants.createTermModHashAAs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Constants
的用法示例。
在下文中一共展示了Constants.createTermModHashAAs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: int
# 需要导入模块: import Constants [as 别名]
# 或者: from Constants import createTermModHashAAs [as 别名]
# for scanF in samePeptideClusters[pair[0]] + samePeptideClusters[pair[1]]:
# scanFDict[scanF]['sequenced'] = True
# if options.output:
# for pair in [(lightScanF, heavyScanF) for lightScanF in samePeptideClusters[pair[0]] for heavyScanF in samePeptideClusters[pair[1]]]:
# scanData['light scan'] = int(pair[0])
# scanData['heavy scan'] = int(pair[1])
# outFile.write('\t'.join([str(scanData[col]) for col in cols]) + '\n')
# else:
# print 'WARNING: Invalid sequence! Unsuccessful sequencing of %s and %s with pair configuration %s' % (str(samePeptideClusters[pair[0]]), str(samePeptideClusters[pair[1]]), pairConfigName)
# print '\nTime Taken:', time.time() - s1, '\n'
if len(paramsDict['Pair Configurations'].keys()) == 0:
unpaired = glob.glob(options.dtadir + '/*.dta')
addEnds = DNS.getSpectrumGraphEndpointInitFunction(np.array(Constants.NTermMods.values()), np.array(Constants.CTermMods.values()), paramsDict['Enzyme']['specificity'])
termModHash = Constants.createTermModHashAAs(N=Constants.NTermMods, C=Constants.CTermMods)
# hyperParameters = PNet.getHyperParameters(None)
# ambigPenaltyFun = DNS.getAmbigEdgePenaltyFunction(hyperParameters['minedge'], hyperParameters['ambigopen'], hyperParameters['ambigextend'])
# ppmPenaltyFun = DNS.getPPMPenaltyFun(hyperParameters['ppmstd'], hashedAAs, hyperParameters['minedge'], hyperParameters['ppmpen'], 0, epStep)
for cluster in samePeptideClusters:
if scanFDict[cluster[0]]['sequenced'] or True:
continue
scanData = {}
specsInfo = [DataFile.getMassIntPairs(scanFDict[scanF]['dta']) for scanF in cluster]
precMass = np.average(np.array([scanFDict[scanF]['precMass'] for scanF in cluster]))
scanData['light scan'] = None
scanData['heavy scan'] = 'N/A'
示例2: getCIDETDPairs
# 需要导入模块: import Constants [as 别名]
# 或者: from Constants import createTermModHashAAs [as 别名]
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)
)
print "Getting Pairs..."
pairs = getCIDETDPairs(scanFDict)
for pair in pairs:
scanData = {}
precMass = scanFDict[pair[0]]["precMass"]
epMean = options.ppmsyserror * precMass * 10 ** -6
epSTD = options.ppmstd * precMass * 10 ** -6
# (lightPath, heavyPath) = (scanFDict[pair[0]]['dta'], scanFDict[pair[1]]['dta'])
# scanData['shared peaks ratio'] = getSharedPeaksRatio(lightPath, heavyPath, epSTD)
scanData["shared peaks ratio"] = "N/A"