Skip to content

Commit

Permalink
Merge pull request #36 from brain-bican/tdt_sprint_4
Browse files Browse the repository at this point in the history
Fix issue TDT 155
  • Loading branch information
hkir-dev authored May 2, 2024
2 parents fd85db3 + adf5306 commit d6da2e4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
requests
cas-tools==0.0.1.dev31
cas-tools==0.0.1.dev40
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name="tdta",
version="0.1.0.dev5",
version="0.1.0.dev6",
description="The aim of this project is to provide taxonomy development tools custom actions.",
long_description=README,
long_description_content_type="text/markdown",
Expand Down
9 changes: 8 additions & 1 deletion src/tdta/tdt_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ def export_cas_data(sqlite_db: str, output_file: str, dataset_cache_folder: str
if "matrix_file_id" in project_config:
matrix_file_id = str(project_config["matrix_file_id"]).strip()
anndata = resolve_matrix_file(matrix_file_id, dataset_cache_folder)
cas_json = add_cell_ids(cta.to_dict(), anndata)
labelsets = cta.labelsets.copy()
labelsets.sort(key=lambda x: x.rank)
labelset_names = [labelset.name for labelset in labelsets]

cas_json = add_cell_ids(cta.to_dict(), anndata, labelsets=labelset_names)
if cas_json is None:
print("WARN: Cell IDs population operation failed, skipping cell_id population")
cas_json = cta.to_dict()
with open(output_file, "w") as json_file:
json.dump(cas_json, json_file, indent=2)
else:
Expand Down

0 comments on commit d6da2e4

Please sign in to comment.