jbloomlab / polyclonal

Model mutational escape from polyclonal antibodies.
Other
3 stars 0 forks source link

`harmonize_epitopes_with` -> `epitope_harmonized_model` and add `tidy_to_corr` #97

Closed jbloom closed 1 year ago

jbloom commented 1 year ago

The old method for harmonizing epitopes, Polyclonal.harmonize_epitopes_with, had several shortcomings. It modified the model in place, and did not guarantee consistent epitope order. It worked with bootstrapping when the models to be harmonized were only created for that purpose, but won't work for things like model averaging as we are working to do to address #95.

The new Polyclonal.epitope_harmonized_model returns a copy of the original model and guarantees harmonized models in consistent order, and so is suitable for purposes like model averaging. This new method replaces Polyclonal.harmonize_epitopes_with, so this is a backward incompatible change.

Also added a general function for data frame correlations (tidy_to_corr), and now use it for thePolyclonal` epitope harmonization correlations.