jbloomlab / polyclonal

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

is the underlying statistical model correct (what about competing antibodies) #16

Closed jbloom closed 2 years ago

jbloom commented 2 years ago

The model basically cares about the weight assigned to the microstate in the partition function when no antibodies are bound. Right now it assumes that every microstate (all combinations of epitopes) could be bound (see here: https://jbloomlab.github.io/polyclonal/biophysical_model.html). In reality, we expect that some combinations of epitopes can’t be bound at the same time, and should be excluded from the partition function. My intuition is that neglecting this should not have a big effect because in the case where two epitopes are bound the states with the individual ones are bound anyway and this doesn’t make much contribution to the totally unbound microstate. But I do think it would be interesting for someone to actually write out the real math for this and figure out how accurate the assumption of no competition is. This paper by Tal sort of has some partition-function like things related to what we’d need: https://pubmed.ncbi.nlm.nih.gov/32365091/

@wsdewitt said:

Related ideas here: http://www.sfu.ca/phys/347/Lecture%2022.pdf Coupling term J appears between the two bound states, breaking the factorization of the grand partition function. Can we get a minimal model of interference by introducing learnable constants J_ij for each epitope pair {i, j}?

Then I said: I think we should consider this. But we should first somehow figure out if the models are meaningfully different in the regime where we are getting most of our information from the experiments (variants where fraction completely unbound >> 0). If they aren’t, it may not be possible to meaningfully fit any such interference parameters.

I think @timcyu and @wsdewitt are looking into this more?

timcyu commented 2 years ago

My attempt at writing the partition function is here. I took inspiration from Tal's paper and adapted it for our polyclonal model. I think Jesse is right that excluding the microstates that cannot occur due to antibody competition is not a big deal. I try to explain why this is a special case when the most informative variants have an escape fraction that approaches 1.

However, I could definitely be wrong as I am an absolute novice at statistical mechanics, so please let me know what you think! Also, if anyone has a derivation for why the Boltzmann weight for the antibody bound state in Tal's paper is c / Kd I'd love to see it.

jbloom commented 2 years ago

As far as your question about why the Boltzmann weight for the antibody bound state is c_Kd. The definition of a dissociation constant is dG = -RT ln K_d where dG is the the difference in the free energy of the bound versus unbound state, dG = G_unbound - G_bound. Since free energies are on an arbitrary scale, set G_unbound = 0 so then G_bound = dG = -RT ln K_d. Somehow it can be derived from this, although I have to think about how concentration c gets in there. Maybe @WSDeWitt remembers how to do this.

jbloom commented 2 years ago

@timcyu, as far as the other points about the partition function, I will look at that soon. But first I think we really should focus on pull requests that close issues #5, #6, #7, and #9. We are going to have real experiments going very soon, and those need to be merged into the docs in order to move forward with the experimental points.

So do you want to re-tag me on this issue after those have been closed?

timcyu commented 2 years ago

Sounds good. I'll work on those issues today.

wsdewitt commented 2 years ago

I haven't read Tim's writeup yet, but addressing @jbloom's question about concentration, here's some scribbles showing how I think the concentration gets worked in.

The minus sign in the last equation is an error.

Scanned Document 6

jbloom commented 2 years ago

Above makes sense to me!

wsdewitt commented 2 years ago

One more mistake I made: K_D is an intensive, not extensive, property, so shouldn't scale with volume (the last equation above suggests it does though). I should have had a density of states for the Ab solution configuration microstates in the partition function Z (instead of simply multiplying by N). The state multiplicities then go as density of states times volume, and then I think the pesky V will drop out at the end.

timcyu commented 2 years ago

This also makes sense to me, thanks @WSDeWitt!

wsdewitt commented 2 years ago

@timcyu BTW I read through your modeling writeup last night and all looks reasonable to me. IIUC the simplifying assumptions are justified if escape fractions near unity are what's biologically relevant to us.

timcyu commented 2 years ago

@jbloom now that the other issues have been closed, here's the partition function notebook.

My attempt at writing the partition function is here. I took inspiration from Tal's paper and adapted it for our polyclonal model. I think Jesse is right that excluding the microstates that cannot occur due to antibody competition is not a big deal. I try to explain why this is a special case when the most informative variants have an escape fraction that approaches 1.

However, I could definitely be wrong as I am an absolute novice at statistical mechanics, so please let me know what you think! Also, if anyone has a derivation for why the Boltzmann weight for the antibody bound state in Tal's paper is c / Kd I'd love to see it.

jbloom commented 2 years ago

@timcyu, this qualitatively makes sense to me, but I think it would be good to make it a bit more rigorous and explanatory, and then we can append it onto the documentation as a final notebook justifying the assumption to ignore antibody competition.

In particular: