Teichlab / celltypist

A tool for semi-automatic cell type classification
https://www.celltypist.org/
MIT License
278 stars 44 forks source link

Subsetting celltypist model by cell type #20

Closed MarcusLCC closed 2 years ago

MarcusLCC commented 2 years ago

Hi, thanks a lot for developing this tool!

May I ask if there's a way to subset the model by cell types? The scenario is the model contains some cell types that I know is absent in the tissue I'm working on, so I want to prevent it from assigning these cell types and focus only on a subset of cell types.

(I'm working on bone marrow samples, while the model like 'Immune_All_Low.pkl' is very close but also include some cell types which are usually not seen in bone marrow).

Would it be feasible and reasonable to do this? Thanks a lot for your help!

Best regards, Marcus

ChuanXu1 commented 2 years ago

@MarcusLCC, it is not possible to "subset" the model. Theoretically cell types not present in your tissue will not be assigned to your cells. Also, there is a probability output from CellTypist (cell-by-cell-type probability matrix) based on which you can drop some columns (cell types), and check how each cell is assigned across the remaining cell types.