コード例 #1
0
    def __init__(self,**kw):
        if 'prefetch' not in kw:
            kw['prefetch'] = True
	kw['iniFile'] = os.path.join(os.path.dirname(os.path.realpath(__file__)),"glycomotif.ini")
	super(GlycoMotifTS,self).__init__(**kw)
        for k in self.keys():
	    if k != 'query_motifs':
		continue
            self.modify_method(k,partitioner())
            if self._prefetch:
                self.modify_method(k,prefetcher(usecache=False))
コード例 #2
0
 def __init__(self, **kw):
     if 'usecache' not in kw:
         kw['usecache'] = True
     if 'prefetch' not in kw:
         kw['prefetch'] = True
     if 'cachemode' not in kw:
         kw['cachemode'] = 'c'
     super(GlyCosmosTS, self).__init__(**kw)
     for k in self.keys():
         if 'hash' in self[k]:
             self.modify_method(
                 k,
                 partitioner(kwarg="hash",
                             fmt="%%0%dx.*",
                             values='hexidecimal'))
         elif 'accession' in self[k]:
             self.modify_method(k, partitioner())
         if self._prefetch:
             if 'hash' in self[k]:
                 self.modify_method(
                     k, prefetcher("hash", usecache=self._usecache))
             elif 'accession' in self[k]:
                 self.modify_method(k, prefetcher(usecache=self._usecache))
コード例 #3
0
ファイル: GlyTouCanTS.py プロジェクト: sarahz5/PyGly
 def __init__(self, **kw):
     if 'usecache' not in kw:
         kw['usecache'] = True
     if 'prefetch' not in kw:
         kw['prefetch'] = True
     if 'cachemode' not in kw:
         kw['cachemode'] = 'c'
     super(GlyTouCanTS, self).__init__(**kw)
     for k in self.keys():
         if k == "query_hashedseq":
             self.modify_method(
                 k,
                 partitioner(kwarg="hash",
                             fmt="%%0%dx.*",
                             values='hexidecimal'))
         else:
             self.modify_method(k, partitioner())
         if self._prefetch:
             if k == "query_hashedseq":
                 self.modify_method(
                     k, prefetcher("hash", usecache=self._usecache))
             else:
                 self.modify_method(k, prefetcher(usecache=self._usecache))