nf-core / scdownstream

A single cell transcriptomics pipeline for QC, integration and making the data presentable
https://nf-co.re/scdownstream
MIT License
30 stars 7 forks source link

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

Closed tbrittoborges closed 1 week ago

tbrittoborges commented 2 weeks ago

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:

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