def on_match_isolated(self, e): """ Match the peaks in self.pks to possible combination of isolated rows of oligomers in the oligomerlist. Uses ud.make_isolated_match function. Populated the matchlistbox with the results of the matching. :param e: Unused event :return: None """ oligos = self.oligomerlistbox.list.get_list() try: tolerance = float(self.ctlmatcherror.GetValue()) except ValueError: tolerance = None oligomasslist, oligonames = ud.make_isolated_match(oligos) matchlist = ud.match(self.pks, oligomasslist, oligonames, tolerance=tolerance) self.matchlistbox.list.populate(matchlist[0], matchlist[1], matchlist[2], matchlist[3])
def on_match_all(self, e): """ Match the peaks in self.pks to all possible combination of oligomers in the oligomerlist. Uses ud.make_all_matches function. Populated the matchlistbox with the results of the matching. :param e: Unused event :return: None """ oligos = self.oligomerlistbox.list.get_list() try: tolerance = float(self.ctlmatcherror.GetValue()) except ValueError: tolerance = None oligomasslist, oligonames = ud.make_all_matches(oligos) if ud.isempty(oligomasslist): print("ERROR: Need to specify the Potential Oligomers") return matchlist = ud.match(self.pks, oligomasslist, oligonames, tolerance=tolerance) self.matchlistbox.list.populate(matchlist[0], matchlist[1], matchlist[2], matchlist[3])