-
Notifications
You must be signed in to change notification settings - Fork 13
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
Move to scanpy 1.9.3 and other improvements #117
Conversation
pcm32
commented
Sep 21, 2022
•
edited
Loading
edited
- Moves to Scanpy 1.9.3
- Resolves h5py>3 issues in filtered marker genes
- Use mito as bool not changing to category, to avoid dtype error (addresses Calculations of mito directly generate columns with dtypes that break qc calculations on subsequent filtering #116)
- Avoids mnnpy issues with python 3.8 and numba by moving testing to conda
Since mnnpy is not taking in the PRs and this is fixed in conda, we should move testing to conda entirely. |
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.
LGTM @pcm32
@@ -12,6 +13,13 @@ def normalize(adata, log_transform=True, **kwargs): | |||
""" | |||
sc.pp.normalize_total(adata, **kwargs) | |||
if log_transform: | |||
sc.pp.log1p(adata) | |||
# Natural logarithm is the default by scanpy, if base is not set | |||
base = math.e |
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.
I don't understand this. If Natural (neperian) is the default in Scanpy, why are you defining it?
Is this related to the bump version in Scanpy?
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.
it is mostly to explicitly set it in adata.uns. There seems to be an issue by which if you call sc.pp.log1p without the base explicitly given, it doesn't record the base on the uns, and as a result later down the line you have no idea on which base the log was called.
Thanks for the review @pmb59 ! |
Addresses #123 |
It would be good to re-run tests here to make sure versions still work well and then merge and release. |
For the record, we stopped supporting mmnpy due to this testing error:
I leave this here since test logs gets lost after sometime. If anyone know how to fix this, we would be interested in knowing :-). |
Given that we are not going to support mmnpy, I would suggest as well removing the extra pinning tried for supporting it. I would leave the dependencies part like this https://github.com/ebi-gene-expression-group/scanpy-scripts/blob/5f00501bb0984af55cda04fafb5fdbd3e539d51d/test-env.yaml as it has the minimal pinning to make all the rest work. If you look at the 5f00 commit tests, all other tests are passing and it is right before the pinning changes for mnnpy that never worked. |
Great, thanks for finishing this off @anilthanki ! |