Skip to content
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

Generate k means clustering count/mean value matrices by cell type and marker #268

Merged
merged 13 commits into from
Oct 16, 2020

Conversation

alex-l-kong
Copy link
Contributor

What is the purpose of this PR?

Addresses and closes #255. Now that we have a method to determine the optimal k for k-means clustering of a neighborhood matrix, we add functionality to generate count and mean value matrices by cell type and marker respectively for each cluster. This finishes up point 3 of #139.

How did you implement your changes

We add a function to generate the actual k-means clusters and another to generate the corresponding count/mean value matrices.

@alex-l-kong alex-l-kong self-assigned this Oct 6, 2020
Copy link
Member

@ngreenwald ngreenwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Some more error checking and documentation mostly

ark/analysis/spatial_analysis.py Outdated Show resolved Hide resolved
ark/analysis/spatial_analysis.py Outdated Show resolved Hide resolved
ark/analysis/spatial_analysis.py Outdated Show resolved Hide resolved
ark/analysis/spatial_analysis.py Outdated Show resolved Hide resolved
ark/analysis/spatial_analysis.py Outdated Show resolved Hide resolved
ark/analysis/spatial_analysis.py Outdated Show resolved Hide resolved
Copy link
Contributor

@ackagel ackagel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Copy link
Member

@ngreenwald ngreenwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a couple questions about naming/descriptions

ark/analysis/spatial_analysis.py Outdated Show resolved Hide resolved
ark/analysis/spatial_analysis.py Outdated Show resolved Hide resolved
ark/analysis/spatial_analysis.py Outdated Show resolved Hide resolved
Copy link
Member

@ngreenwald ngreenwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, lets see if Adam has any feedback before merging

Copy link
Contributor

@ackagel ackagel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Once this is merged, I'll need to revise some lines for the global-settings pr, but it doesn't look like that'll be difficult.

@alex-l-kong alex-l-kong merged commit 1fd9912 into master Oct 16, 2020
@alex-l-kong alex-l-kong deleted the k_means_mat branch October 16, 2020 17:45
alex-l-kong added a commit that referenced this pull request Jan 14, 2021
…d marker (#268)

* Add function stubs

* Add matrix generating process for clustering

* Add testing for generate_cluster_labels

* ADd testing for generate_cluster_matrix_results

* Add exception testing for coverage

* Address code review comments

* Update docstring

* Variable and docstring fixes to make things more clear

* Fix docstring for cluster matrix function
y2kbugger pushed a commit that referenced this pull request Jul 29, 2021
…d marker (#268)

* Add function stubs

* Add matrix generating process for clustering

* Add testing for generate_cluster_labels

* ADd testing for generate_cluster_matrix_results

* Add exception testing for coverage

* Address code review comments

* Update docstring

* Variable and docstring fixes to make things more clear

* Fix docstring for cluster matrix function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate k-means matrix for clustering
3 participants