コード例 #1
0
 def get_study_ids(self, include_aliases=False):
     with self._index_lock:
         k = self._study_index.keys()
     if self.has_aliases and (not include_aliases):
         x = []
         for i in k:
             if DIGIT_PATTERN.match(i) or ((len(i) > 1) and (i[-2] == '_')):
                 pass
             else:
                 x.append(i)
         return x
     return list(k)
コード例 #2
0
def _get_filtered_study_ids(shard, include_aliases=False):
    """Optionally filters out aliases from standard doc-id list"""
    from peyotl.phylesystem.helper import DIGIT_PATTERN
    k = shard.get_doc_ids()
    if shard.has_aliases and (not include_aliases):
        x = []
        for i in k:
            if DIGIT_PATTERN.match(i) or ((len(i) > 1) and (i[-2] == '_')):
                pass
            else:
                x.append(i)
        return x
コード例 #3
0
ファイル: phylesystem_shard.py プロジェクト: rvosa/peyotl
 def get_study_ids(self, include_aliases=False):
     with self._index_lock:
         k = self._study_index.keys()
     if self.has_aliases and (not include_aliases):
         x = []
         for i in k:
             if DIGIT_PATTERN.match(i) or ((len(i) > 1) and (i[-2] == '_')):
                 pass
             else:
                 x.append(i)
         return x
     return list(k)
コード例 #4
0
ファイル: phylesystem_shard.py プロジェクト: mtholder/peyotl
def _get_filtered_study_ids(shard, include_aliases=False):
    """Optionally filters out aliases from standard doc-id list"""
    from peyotl.phylesystem.helper import DIGIT_PATTERN
    k = shard.get_doc_ids()
    if shard.has_aliases and (not include_aliases):
        x = []
        for i in k:
            if DIGIT_PATTERN.match(i) or ((len(i) > 1) and (i[-2] == '_')):
                pass
            else:
                x.append(i)
        return x