jbloomlab / polyclonal

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

average across `Polyclonal` models #95

Closed jbloom closed 1 year ago

jbloom commented 1 year ago

We need to be able to average Polyclonal models fit to different experimental replicates or libraries. It appears that this is better than bootstrapping to really estimate error.

This addition will become version 1.0 as it involves some backward-incompatible changes:

  1. The bootstrapping as currently written is done by the PolyclonalCollection class. This isn't really correct. PolyclonalCollection should be a general use base class for collections of Polyclonal objects (which can include bootstrapping, averaging, etc), and then should be sub-classed by specific classes for uses cases. So the first change is to make PolyclonalCollection general for any collection and just have those general methods, and then make a new class PolyclonalBootstrap that is the actual bootstrapping. This will be backward incompatible because what was called PolyclonalCollection will become PolyclonalBootstrap.

  2. Make a new PolyclonalAverage class for averaging that subclasses PolyclonalBootstrap.

  3. Make a notebook illustrating the averaging, and clearly suggest that when possible experimental replicates are preferable to bootstrapping.