-
Notifications
You must be signed in to change notification settings - Fork 53
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
Palantir v1.2 #106
Merged
Merged
Palantir v1.2 #106
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fallback to pseudo inverse of fundamental matrix
This is for consideration as there already is a function `_terminal_states_from_markov_chain`. The advantage of the new funcion beeing that specific cell types can be defined for which a terminal state ought to be found.
This commit introduces comprehensive compatibility with the AnnData object. The following major functions are updated to accept AnnData as an input, perform computations, and write results back to the AnnData object: - core.run_palantir - utils.run_pca - utils.run_diffusion_maps - run_magic_imputation - utils.determine_multiscale_space - utils.run_tsne - utils.determine_cell_clusters Key enhancements and modifications include: - All key input and output references within the AnnData structure are now customizable, providing flexibility for users to align with their existing data structures. - Detailed docstrings have been updated to provide clear and comprehensive explanations for all new functionalities. - Backwards compatibility has been ensured, and the modified functions have been tested with the [tutorial notebook](https://github.com/dpeerlab/Palantir/blob/master/notebooks/Palantir_sample_notebook.ipynb) to ensure the integrity and reliability of the updates. These changes aim to increase user-friendliness and perpare the implementation of furher features.
PhenoGraph fails to cluster with current package versions: - Python==3.10.10 - scipy==1.10.1 - numpy==1.24.3 - pandas==1.5.3 - PhenoGraph==git+https://github.com/JonathanShor/PhenoGraph@f63b02c7f5e6f2300156d7e4201818fa238bf0a4 The error is `TypeError: Expected list, got numpy.ndarray` happending in `scipy/sparse/_lil.py:473` when calling `_csparsetools.lol_flatten_to_array(self.rows, indices)`.
- bugfix: use pca_key - parallel MAGIC on optionally sparse input - remove `palantir.utils.run_tsne`
This commit enables tthe comparison while using the new implementation that uses mellon for gene trends and saves all results in the procided Anntata. To finilize the new workflow of passing on AnnData I udpated all functuions used in the tutorial and updated the tutorial itself with the new workflow. Since we decided to remove unused functions such as run_tsne I also removed the following functions that are covered by scanpy: - palantir.utils.determine_cell_clusters - palantir.plot.plot_cell_clusters
Enhancements for Tutorial Notebooks and Comprehensive Support for AnnData
Gene local variability and Mellon density
christopheragnus
pushed a commit
to christopheragnus/Palantir
that referenced
this pull request
Oct 13, 2023
Palantir v1.2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This covers multiple changes @ManuSetty and I wrote up in preparation of our cell-state density manuscript.
Version 1.2.0
New Features
palantir.utils.early_cell
To automate fining an early cell based on cell type and diffusion components.palantir.utils.find_terminal_states
To automate finding terminal cell states based on cell type and diffusion components.palantir.presults.select_branch_cells
To find cells associated to each branch based on fate probability.palantir.plot.plot_branch_selection
To inspect the cell to branch association.palantir.utils.run_local_variability
To compute local gene expression variability.palantir.utils.run_density
A wrapper for mellon.DensityEstimator.palantir.utils.run_low_density_variability
. To aggregate local gene expression variability in low density.Enhancements
Changes
scanpy.tl.leiden
for gene trend clustering.run_tsne
,determine_cell_clusters
, andplot_cell_clusters
functions. Use corresponding implementations from Scanpy, widely used single-cell analysis library and direct dependecy of Palantir.Fixes