Esempio n. 1
0
	def normalizePeptideIntensities(self, peptide_keys):
		# DAD: implement
		target_peps = [self.peptide_data[k] for k in peptide_keys]
		h_acc = stats.Accumulator(store=True)
		m_acc = stats.Accumulator(store=True)
		l_acc = stats.Accumulator(store=True)
		for p in target_peps:
			h_acc.addAll(p.intensity_h_list)
			m_acc.addAll(p.intensity_m_list)
			l_acc.addAll(p.intensity_l_list)
		median_h = h_acc.median
		median_m = m_acc.median
		median_l = l_acc.median
		# Normalize all peptides
		for p_key in self.peptide_data.keys():
			p = self.peptide_data[p_key]
			p.normalizeHeavyIntensity(median_h)
			p.normalizeMediumIntensity(median_m)
			p.normalizeLightIntensity(median_l)
Esempio n. 2
0
	def getMSMSCountSummary(self):
		acc = stats.Accumulator(store=True)
		acc.addAll([pep.msms_count for pep in self.peptide_dict.values()])
		return acc.summary
Esempio n. 3
0
	def getLightIntensitySummary(self):
		acc = stats.Accumulator(store=True)
		acc.addAll([pep.light_intensity for pep in self.peptides])
		return acc.summary
Esempio n. 4
0
	def getMediumIntensitySummary(self):
		acc = stats.Accumulator(store=True)
		acc.addAll(self.intensity_m_list)
		return acc.summary
Esempio n. 5
0
	def getIntensitySummary(self):
		acc = stats.Accumulator(store=True)
		for (h_int, m_int, l_int) in zip(self.intensity_h_list, self.intensity_m_list, self.intensity_l_list):
			acc.add(h_int+m_int+l_int)
		return acc.summary