コード例 #1
0
 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
ファイル: builder.py プロジェクト: BGSU-RNA/RNA-3D-Hub-core
 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)))