Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Strand Lab
Strand Lab Cellxgene Gateway
Commits
586dc662
Commit
586dc662
authored
Mar 29, 2021
by
Alok Saldanha
Browse files
ensure annotation directory for new annotations
parent
76f3939f
Changes
2
Hide whitespace changes
Inline
Side-by-side
cellxgene_gateway/dir_util.py
View file @
586dc662
...
...
@@ -62,3 +62,8 @@ def make_h5ad(el):
def
make_annotations
(
el
):
return
el
[:
-
5
]
+
annotations_suffix
def
ensure_dir_exists
(
file_path
):
if
not
os
.
path
.
exists
(
file_path
):
os
.
makedirs
(
file_path
)
cellxgene_gateway/items/file/fileitem_source.py
View file @
586dc662
...
...
@@ -130,6 +130,7 @@ class FileItemSource(ItemSource):
)
item
=
self
.
lookup_item
(
h5ad_descriptor
)
if
item
is
not
None
:
dir_util
.
ensure_dir_exists
(
self
.
full_path
(
annotation_item
.
subpath
))
return
LookupResult
(
item
,
annotation_item
)
else
:
item
=
self
.
lookup_item
(
descriptor
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment