mirror of
https://github.com/Novartis/cellxgene-gateway.git
synced 2026-10-09 19:50:55 +08:00
#81 moved gene set check into fileitem_source
This commit is contained in:
@@ -20,23 +20,15 @@ def render_annotations(item, item_source):
|
||||
item_source.get_annotations_subpath(item), item_source.name
|
||||
)
|
||||
new_annotation = f"<a class='new' href='{url}'>new</a>"
|
||||
non_gene_set_files = []
|
||||
if item.annotations is not None:
|
||||
# Do not also display files to store gene_sets. These should be loaded
|
||||
# by clicking on the associated annotations file (i.e. without the
|
||||
# appended "_gene_sets")
|
||||
for a in item.annotations:
|
||||
if (len(a.name) < 10) or (a.name[-10:] != "_gene_sets"):
|
||||
non_gene_set_files.append(a)
|
||||
annotations = (
|
||||
", ".join(
|
||||
[
|
||||
f"<a href='{CacheKey(item, item_source, a).view_url}/'>{a.name}</a>"
|
||||
for a in non_gene_set_files
|
||||
for a in item.annotations
|
||||
]
|
||||
)
|
||||
+ ", "
|
||||
if non_gene_set_files
|
||||
if item.annotations
|
||||
else ""
|
||||
)
|
||||
return " | annotations: " + annotations + new_annotation
|
||||
|
||||
Reference in New Issue
Block a user