{"action":"created","issue":{"url":"https://api.github.com/repos/ben18785/Selection_simulations/issues/3","repository_url":"https://api.github.com/repos/ben18785/Selection_simulations","labels_url":"https://api.github.com/repos/ben18785/Selection_simulations/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/ben18785/Selection_simulations/issues/3/comments","events_url":"https://api.github.com/repos/ben18785/Selection_simulations/issues/3/events","html_url":"https://github.com/ben18785/Selection_simulations/issues/3","id":393745319,"node_id":"MDU6SXNzdWUzOTM3NDUzMTk=","number":3,"title":"what is the selection coefficient?","user":{"login":"Armand1","id":8698079,"node_id":"MDQ6VXNlcjg2OTgwNzk=","avatar_url":"https://avatars2.githubusercontent.com/u/8698079?v=4","gravatar_id":"","url":"https://api.github.com/users/Armand1","html_url":"https://github.com/Armand1","followers_url":"https://api.github.com/users/Armand1/followers","following_url":"https://api.github.com/users/Armand1/following{/other_user}","gists_url":"https://api.github.com/users/Armand1/gists{/gist_id}","starred_url":"https://api.github.com/users/Armand1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Armand1/subscriptions","organizations_url":"https://api.github.com/users/Armand1/orgs","repos_url":"https://api.github.com/users/Armand1/repos","events_url":"https://api.github.com/users/Armand1/events{/privacy}","received_events_url":"https://api.github.com/users/Armand1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-23T12:17:32Z","updated_at":"2018-12-23T14:58:26Z","closed_at":null,"author_association":"NONE","body":"Previously, we had a model of selection that looked like this:\r\n\r\nx<-sigmoid(logit(1-mu0)+aBeta * p_g0)\r\n\r\nwhere p_g0 is the frequency of a variant in a generation, mu is mutation rate and aBeta is a parameter that shapes the sigmoidal selection function.  If we plot \"selection\" v. p_g0 we see this:\r\n\r\nNow, what exactly, is \"x\" here?  It's not a selection coefficient since selection coefficients always depend on the relative fitness of two variants.  It's not the frequency of the variant in the next generation.  I think that it is an absolute fitness, W.  \r\n\r\nAn absolute fitness, W, is defined as the \"proportional\" change in abundance over one generation attributable to selection.  So, the way this is modeled, W does not change with frequency in neutrality, W decreases with frequency in -5 and -10 and (weirdly) W does not increase at all (or negligibly) with for +5 and +10.  But the last is an idiosyncratic product of this scheme.  \r\n\r\n[Absolute fitness.pdf](https://github.com/ben18785/Selection_simulations/files/2706022/Absolute.fitness.pdf)\r\n\r\nLet's calculate selection coefficients. Now, as we said S is always relative to some other variant. Let's look at S relative to a variant that has a frequency of 0.5. \r\n\r\ns = W_1/W_2 -1. where W_1 and W_2 are the absolute fitnesses. \r\n\r\n[s_relative to an intermediate allele.pdf](https://github.com/ben18785/Selection_simulations/files/2706020/s_relative.to.an.intermediate.allele.pdf)\r\n\r\nSo THAT makes sense. For negative frequency dependence, S is positive at low frequencies and negative at high frequencies. Very much so for -10, less so for -5.  The positive selection coefficients are, again, invisible against neutrality at this scale. \r\n\r\nNow, theory says that selection overpowers drift when abs(s)> 1/Ne.  So, given that Ne =1000, we need s to be > 0.001.  Assume that a new variant arises at a frequency of 1/1000.  Then, relative to an existing intermediate frequency variant, such a variant will have the following ABSOLUTE selection coefficients:\r\n\r\n-10:         0.147\r\n-5:           0.011\r\n0:              0.000\r\n5:            0.0009\r\n10:           0.0009\r\n\r\nWhich seems to tell us that our negative frequency dependent selected populations had strong enough selection to overpower drift. But our positive selection scheme did not. \r\n\r\nBEN: does this make sense?  If so, then what we need is something equivalent for the NEW selection scheme.  And we need to put in parameter values that are strong enough to change the frequencies. Also, we need to recover selection values. \r\n\r\nNow, it is unclear to me what the \"s\" in propto (1 + s * f)  is going to be.  I think it is neither a selection coefficient NOR an absolute fitness.  It is, again, just a parameter that shapes the function. \r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ben18785/Selection_simulations/issues/comments/449641724","html_url":"https://github.com/ben18785/Selection_simulations/issues/3#issuecomment-449641724","issue_url":"https://api.github.com/repos/ben18785/Selection_simulations/issues/3","id":449641724,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTY0MTcyNA==","user":{"login":"ben18785","id":4490664,"node_id":"MDQ6VXNlcjQ0OTA2NjQ=","avatar_url":"https://avatars3.githubusercontent.com/u/4490664?v=4","gravatar_id":"","url":"https://api.github.com/users/ben18785","html_url":"https://github.com/ben18785","followers_url":"https://api.github.com/users/ben18785/followers","following_url":"https://api.github.com/users/ben18785/following{/other_user}","gists_url":"https://api.github.com/users/ben18785/gists{/gist_id}","starred_url":"https://api.github.com/users/ben18785/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ben18785/subscriptions","organizations_url":"https://api.github.com/users/ben18785/orgs","repos_url":"https://api.github.com/users/ben18785/repos","events_url":"https://api.github.com/users/ben18785/events{/privacy}","received_events_url":"https://api.github.com/users/ben18785/received_events","type":"User","site_admin":false},"created_at":"2018-12-23T14:58:26Z","updated_at":"2018-12-23T14:58:26Z","author_association":"OWNER","body":"@Armand1 Thanks for the test issue!\r\n\r\nSo the one thing I'm not sure about in your above is your W. This is just the probability that ONE parent produces offspring in the next generation. To get the abundance of a variant in the next generation, you need to multiple by the frequency. So do we want?\r\n\r\nW <- sigmoid(logit(1-mu0)+aBeta * p_g0) * p_g0\r\n\r\nFollowing your above, in the new scheme, the abundance in the next generation (on average) for ONE single parent is:\r\n\r\nW <- k * (1 - mu0) * (1 + aBeta* p_g0)\r\n\r\nwhere k is a constant that ensures that the probability has appropriate bounds.\r\n\r\nNow calculating the relative selection:\r\n\r\ns = W1  / W2 - 1 = (1 + aBeta * p_g1) / (1 + aBeta * p_g2) - 1\r\n\r\nNow relative selection is just linear in p_g1 (holding p_g2 constant) so both positive and negative selections have symmetric effects.\r\n\r\nWhat do you think?\r\n\r\n@Armand1 I think that the 's' in propto (1 + s * f) is just a parameter that shapes the function, yes."}}
{"actor":{"display_login":"ben18785"}}