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

Add support to Celltypist for non-human species. #98

Closed
tbrittoborges opened this issue Sep 20, 2024 · 0 comments
Closed

Add support to Celltypist for non-human species. #98

tbrittoborges opened this issue Sep 20, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@tbrittoborges
Copy link
Contributor

Description of feature

Currently, CELLTYPE_ASSIGNMENT:CELLTYPES_CELLTYPIST fails for data other than from human:

  Traceback (most recent call last):
    File ".command.sh", line 42, in <module>
      predictions = celltypist.annotate(
                    ^^^^^^^^^^^^^^^^^^^^
    File "/opt/conda/lib/python3.12/site-packages/celltypist/annotate.py", line 81, in annotate
      predictions = clf.celltype(mode = mode, p_thres = p_thres)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/opt/conda/lib/python3.12/site-packages/celltypist/classifier.py", line 355, in celltype
      raise ValueError(
  ValueError: 🛑 No features overlap with the model. Please provide gene symbols

However, Celltypist supports species conversion. See this issue for details.

There are many ways one can approach a fix two this:

  • Try-except block, trying to recover from the ValueError with a convert step.
  • Allowing users to provide map_file, which maps human genes to their target organism.
  • Allowing users to provide a local model (pkl file), pre-converted.

The last provides more flexibility for users that train their own model.

@tbrittoborges tbrittoborges added the enhancement New feature or request label Sep 20, 2024
@nictru nictru closed this as completed in 736ef28 Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant