Skip to content

Commit

Permalink
Sort markers in numerical observations of AnnData objects
Browse files Browse the repository at this point in the history
  • Loading branch information
cavenel committed Feb 17, 2023
1 parent 1e853ef commit fe6d558
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tissuumaps/read_h5ad.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ def h5ad_to_tmap(basedir, path, library_id=None):
"cb_gr_rand": False,
"pie_check": False,
"scale_check": False,
"sortby_check": True,
"shape_col": False,
"shape_fixed": True,
"shape_gr": False,
Expand All @@ -321,7 +322,12 @@ def h5ad_to_tmap(basedir, path, library_id=None):
"name": "Numerical observations",
"path": os.path.basename(path),
"dropdownOptions": [
{"optionName": obs, "name": obs, "expectedHeader.cb_col": f"/obs/{obs}"}
{
"optionName": obs,
"name": obs,
"expectedHeader.cb_col": f"/obs/{obs}",
"expectedHeader.sortby_col": f"/obs/{obs}",
}
for obs in obsList
if adata.get(f"/obs/{obs}/categories") is None
and adata.get(f"/obs/__categories/{obs}") is None
Expand Down Expand Up @@ -398,6 +404,7 @@ def h5ad_to_tmap(basedir, path, library_id=None):
"scale_check": False,
"shape_col": False,
"shape_fixed": True,
"sortby_check": True,
"shape_gr": False,
"shape_gr_dict": False,
"shape_gr_rand": True,
Expand All @@ -412,6 +419,7 @@ def h5ad_to_tmap(basedir, path, library_id=None):
"optionName": gene,
"name": "Gene expression: " + gene,
"expectedHeader.cb_col": f"/X;{index}",
"expectedHeader.sortby_col": f"/X;{index}",
}
for index, gene in enumerate(varList)
],
Expand Down

0 comments on commit fe6d558

Please sign in to comment.