def methods(self, methods='*', **kwargs): if methods == '*': return reps.known() selected = [] methods = set(methods) for name, klass in reps.known(): if name in methods: selected.append((name, klass)) return selected
def representatives(self, release_id, resolution, **kwargs): def empty(): known = [name for name, _ in reps.known()] return dict(zip(known, [False] * len(known))) data = coll.defaultdict(empty) for chains in self.chains(release_id, resolution): for method, klass in reps.known(): finder = klass(self.config, self.session) rep = finder(chains) data[rep['id']][method] = True return data
def headers(self): known = sorted(name for name, _ in reps.known()) return [ 'Group', 'Release', 'PDB', 'IFE', 'BP', 'NT', 'Ratio', 'Current', ] + known
def methods(self): """Get the known methods for selecting a representative. """ if not hasattr(self, '_methods'): self._methods = set(n for n, k in reps.known()) return self._methods
def empty(): known = [name for name, _ in reps.known()] return dict(zip(known, [False] * len(known)))