satijalab / seurat-object

https://satijalab.github.io/seurat-object/
Other
24 stars 25 forks source link

Make CellsByIdentities into S3 generic #202

Open samuel-marsh opened 7 months ago

samuel-marsh commented 7 months ago

Hi Seurat Team,

This PR is definitely something optional and totally fine if rejected. Recently, I have been updating scCustomize to work with new version of liger which has substantial improvements. It's been wonderful that SeuratObject has so many data access functions as S3 generics (Cells, Features, WhichCells, etc) because I can easily reexport them and extend them to function with liger objects in seamless manner so that same function works with both Seurat and liger objects.

One function, that I recently wrote version for liger, which would be great to have as generic is CellsByIdentities. I realize this doesn't fit use cases of most other generics in SeuratObject because it's only designed to work with full objects and Assay or other classes.

For this PR:

Again, totally realize this may either not be priority or not something that you want to change and that's all good and I can implement liger version with different function name if so.

Thanks! Sam