labsyspharm / scimap

Spatial Single-Cell Analysis Toolkit
https://scimap.xyz/
MIT License
71 stars 24 forks source link

Added functionality to sm.hl.classify() #81

Closed sarafiller closed 10 months ago

sarafiller commented 10 months ago

This PR adds 2 optional arguments to sm.hl.classify 1)failed_label string gives the user the option to provide a label name for cells that failed classify 2) showPhenotypeLabel bool if set to to True will add a column [phenotype]_[label] to adata.obs, which appends the phenotype of each classified cell with an underscore to its classify_label (if collapse_failed is set to True, also appends the phenotype to its failed_label. If collapse_failed is set to False, original phenotype names will be preserved for cells that failed classify.)

To retain the original label column added by the function, set showPhenotypeLabel to False.