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)
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