-
Notifications
You must be signed in to change notification settings - Fork 46
Celltypist symbol col assignmnet fix #222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,11 @@ def format_yaml_like(data: dict, indent: int = 0) -> str: | |
| prefix = "${prefix}" | ||
| obs_key = "${obs_key}" | ||
|
|
||
| # Ensure that var_names are strings (not categorical) and unique | ||
| # For some reason this happens when coming from scanvi, maybe also given the other changes | ||
| adata.var_names = adata.var_names.astype(str) | ||
| adata.var_names_make_unique() | ||
|
|
||
|
Comment on lines
+42
to
+46
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Making the var names unique in this location should not be necessary, after unification anndata objects can not contain duplicate var names. The casting to string also looks odd to me, but I can do some testing in that matter. If it is necessary, this would still not be the optimal location
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is fixed with your suggestion over all. It was caused as a downstream byproduct of my hack, I believe. |
||
| if adata.obs[obs_key].nunique() > 1: | ||
| if (adata.X < 0).nnz == 0: | ||
| sc.pp.log1p(adata) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine