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
예제 #2
0
    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
예제 #3
0
 def headers(self):
     known = sorted(name for name, _ in reps.known())
     return [
         'Group',
         'Release',
         'PDB',
         'IFE',
         'BP',
         'NT',
         'Ratio',
         'Current',
     ] + known
예제 #4
0
 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
예제 #5
0
 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
예제 #6
0
 def empty():
     known = [name for name, _ in reps.known()]
     return dict(zip(known, [False] * len(known)))