Moran's I as bio conservation metric #245
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have finally added Moran's I as bio conservation metric.
Motivation:
Metric that captures bio preservation ** without cell type labels. Useful when no annotation is available or annotation is unreliable (e.g. for cell subtypes*).
Method:
Moran's I measures how clear spatially variable patterns genes have across embedding. Thus, if genes vary non-randomly on non-integrated data one would also want them to vary non-randomly across embedding on integrated data.
I have used only case B so far. But if same HVGs are used across different integrations it might be the case that B would suffice (with less computation). However, this would need to be tested.
** This corresponded strongly to ranking from other metrics on my pancreatic beta cell subtypes.
TODO:
Please check that code matches your parameter naming etc. or add any other parameters you may find necessary. For example I always recompute connectives.
Please check that it runs in your env (Moran's I was added to Scanpy only recently) - I did not try to run it in any of your envs, just in mine