ncborcherding / scRepertoire

A toolkit for single-cell immune profiling
https://www.borch.dev/uploads/screpertoire/
MIT License
311 stars 54 forks source link

[Feature request] Add options for BCR clonotype inference #424

Open Qile0317 opened 1 month ago

Qile0317 commented 1 month ago

I think it may be worthwhile to refactor combineBCR with some new argument like "cloneDefinition" where users can input different methods with the ellipsis argument ... to allow for parameters. While I have no issue with the current definition of clonotypes for BCRs, I can't help but feel it may be better for less technical users to incorporate some of the new methods in the future. There have been quite a few papers just from a quick googlesearch where different methods to cluster BCRs either independently or WITH scRNA data (this can be in a seperate function like inferBCRclonotypes or something) and those can be added.

API wise call.related.clones will be deprecated in favour of something like cloneDefinition="lvCompare" and threshold will be refactored into ... so not a huge change. This chaging process with be eased as well with the newly introduced lifecycle package in #417

Computational speed wise - parseBCR can still be re-done in rcpp I believe since the clonotype inference is done afterwards with lvCompare.

Thoughts? @ncborcherding