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)
def getMSMSCountSummary(self): acc = stats.Accumulator(store=True) acc.addAll([pep.msms_count for pep in self.peptide_dict.values()]) return acc.summary
def getLightIntensitySummary(self): acc = stats.Accumulator(store=True) acc.addAll([pep.light_intensity for pep in self.peptides]) return acc.summary
def getMediumIntensitySummary(self): acc = stats.Accumulator(store=True) acc.addAll(self.intensity_m_list) return acc.summary
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