def __get_psm(self, row): peptide_string = row[self.report_loader.peptide_column_index] scan_source_name = row[self.report_loader.scan_source_column_index] scan_source = self.report_loader.scan_source_manager.match_by_name(scan_source_name) scan_id = row[self.report_loader.scan_id_column_index] scan_reference = ScanReference(id=scan_id, source=scan_source) source_statistics = {} for source_statistic_name in self.source_statistic_names: try: source_statistics[source_statistic_name] = \ row[int(source_statistic_name)] except KeyError: pass peptide = Peptide.from_tpp_peptide_string(peptide_string) psm = Psm(peptide=peptide, scan_reference=scan_reference, source_statistics=source_statistics ) return psm
def from_tpp(self, peptide_string): return Peptide.from_tpp_peptide_string(peptide_string)