#81 Combined GATEWAY_ENABLE_ANNOTATIONS and GATEWAY_ENABLE_GENE_SETS flags

This commit is contained in:
Alok Saldanha
2023-07-06 08:53:19 -06:00
parent 5a650334df
commit 2754bc1ef1
7 changed files with 8 additions and 24 deletions
@@ -35,8 +35,11 @@ class FileItemSource(ItemSource):
def name(self):
return self._name or f"Files:{self.base_path}"
def is_gene_set(self, path:str) -> bool:
return ('_gene_sets' in path or '-gene-sets' in path) and path.endswith(self.annotation_file_suffix)
def is_gene_set(self, path: str) -> bool:
return ("_gene_sets" in path or "-gene-sets" in path) and path.endswith(
self.annotation_file_suffix
)
def is_h5ad_file(self, path: str) -> bool:
return path.endswith(self.h5ad_suffix) and os.path.isfile(path)