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

Is there a way to run k-means only clustering inside scimap module? #571

Open
emir-radkevich opened this issue Jan 25, 2025 · 5 comments
Open

Comments

@emir-radkevich
Copy link

Hi.
I would like to have k-means and leiden clustering outputs only. Is there a way to specify that behaviour in params.yml?
Thanks.

@ArtemSokolov
Copy link
Collaborator

Hi @emir-radkevich,

Looking at the code, it doesn't look like it. Seems the wrapper purposefully runs all four clustering methods.

@ajitjohnson: Would it be possible to expose --clustering-method to the CLI user?

@ajitjohnson
Copy link

@ArtemSokolov

exposed a parameter called method

# single method
python -m scimap.cli._scimap_mcmicro input.csv -o output_dir --method kmeans

# multiple methods
python -m scimap.cli._scimap_mcmicro input.csv -o output_dir --method kmeans leiden

# all methods
python -m scimap.cli._scimap_mcmicro input.csv -o output_dir --method all

let me know if it works. I can then rebuild the docker for mcmicro.

@ArtemSokolov
Copy link
Collaborator

Thanks so much, @ajitjohnson.

I would say let's go ahead and build the container. We will want to test it in a containerized workflow anyway.

Based on this CI script, I think it will automatically docker build and docker push when you make a new release.

@emir-radkevich
Copy link
Author

Thanks.

As a follow-up question, what is the difference between scanpy and scimap steps?
I thought scanpy calculates leiden clustering, scimap -- k-means, phenograph and spatial. Based on the code, leiden is calculated in scimap as well.

@ArtemSokolov
Copy link
Collaborator

They are just different toolboxes developed by different people.

Scimap exposes clustering to MCMICRO, but the toolbox itself is standalone and has a lot of other functionality for doing downstream analysis of spatial data: https://scimap.xyz/

"scanpy" is one of three clustering modules that were developed to have standardized i/o interface, with the other two being:

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

No branches or pull requests

3 participants