{"id":684,"date":"2021-01-11T00:00:12","date_gmt":"2021-01-11T00:00:12","guid":{"rendered":"http:\/\/teaching.sociology.ul.ie\/bhalpin\/wordpress\/?p=684"},"modified":"2021-01-11T00:00:12","modified_gmt":"2021-01-11T00:00:12","slug":"viral-variants","status":"publish","type":"post","link":"https:\/\/teaching.sociology.ul.ie\/bhalpin\/wordpress\/?p=684","title":{"rendered":"Viral Variants"},"content":{"rendered":"<div id=\"outline-container-org64db9a0\" class=\"outline-2\">\n<h2 id=\"org64db9a0\">Scary mutant COVID-19<\/h2>\n<div id=\"text-org64db9a0\" class=\"outline-text-2\">\n<p>Since the news of a potentially more transmissible strain of C19 broke in the UK, I&#8217;ve been thinking about the mechanics.<\/p>\n<p>I was initially sceptical because it seemed to help politicians evade blame. Given the earlier fuss about a strain spread by holidaymakers returning from Spain in the summer, how much of the emergence of a new strain was down to network effects (common because it was, for example, present in a number of super-spreader events) versus inherent infectiousness?<\/p>\n<p>So I simulated, with a workbench of 160000 agents in a 2D grid network, 1600 seed infections, and daily contact between 23 of the nearest 24 neighbours, and one random remote case. Base infectiousness, death and recovery rates are set to yield an R0 of about 3 and a SIR plot as in Figure <a href=\"#orgeb081cc\">1<\/a>.<\/p>\n<div id=\"orgeb081cc\" class=\"figure\">\n<p><img decoding=\"async\" src=\"http:\/\/teaching.sociology.ul.ie\/bhalpin\/sird\/strainblogSIR.png\" alt=\"strainblogSIR.png\" width=\"70%\" \/><\/p>\n<p><span class=\"figure-number\">Figure 1: <\/span>SIR plots<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!--more--><\/p>\n<div id=\"outline-container-orgeae70c8\" class=\"outline-2\">\n<h2 id=\"orgeae70c8\">Variation in infections when no difference in infectiousness<\/h2>\n<div id=\"text-orgeae70c8\" class=\"outline-text-2\">\n<p>How much variation in infection is there across strains? Let&#8217;s start by assuming each seed is a different strain, but with exactly the same infectiousness. We can expect there will be wide variation, particularly because some lineages will die out early, and small differences in early success may persist. Over the whole run of the simulation, if we track back the lineage of each infection to the originating seed and count, we get a histogram (Figure <a href=\"#orgbb3d0a8\">2<\/a>)<\/p>\n<div id=\"orgbb3d0a8\" class=\"figure\">\n<p><img decoding=\"async\" src=\"http:\/\/teaching.sociology.ul.ie\/bhalpin\/sird\/strainbloghist.png\" alt=\"strainbloghist.png\" width=\"70%\" \/><\/p>\n<p><span class=\"figure-number\">Figure 2: <\/span>Histogram of cases by lineage<\/p>\n<\/div>\n<p>The distribution is highly skewed. Around 500 seeds cause zero or near zero infections. With the epidemic stabilising at a little less than 100% infection, the mean is a little less than 100 infections per seed, but there are significant numbers above 250, and peaks close to 1000. In other words, while each seed has the same infectiousness, the randomness of the infection process yields a really wide range of &#8220;achieved&#8221; infections. On the other hand, the most &#8220;successful&#8221; seed here accounts for less than 1% of the cases.<\/p>\n<p>As an alternative to a histogram, here&#8217;s a Lorenz curve (cumulative number infected, by seeds sorted from fewest to most cases). If every seed had the same number of cases this would be a straight line (Figure <a href=\"#orge1d362d\">3<\/a>).<\/p>\n<div id=\"orge1d362d\" class=\"figure\">\n<p><img decoding=\"async\" src=\"http:\/\/teaching.sociology.ul.ie\/bhalpin\/sird\/strainblogcumul.png\" alt=\"strainblogcumul.png\" width=\"70%\" \/><\/p>\n<p><span class=\"figure-number\">Figure 3: <\/span>Lorenz curve: cumulative coverage of lineages, from least to most successful<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"outline-container-orge60e076\" class=\"outline-2\">\n<h2 id=\"orge60e076\">What if infectiousness differs?<\/h2>\n<div id=\"text-orge60e076\" class=\"outline-text-2\">\n<p>That leads us to the second question: what happens to this distribution if we allow variability in infectiousness? The simulation allows a variable spread of the probability of transmission per encounter, (keeping the mean more or less unchanged at time 0) as in this graphic, with nine levels starting at no spread, and going up to a standard deviation of about 0.004 (around an initial P(trans) of 0.0062545). Note that higher spreads are more likely to yield a max value well above the main cluster (Figure <a href=\"#org8b2bcae\">4<\/a>).<\/p>\n<div id=\"org8b2bcae\" class=\"figure\">\n<p><img decoding=\"async\" src=\"http:\/\/teaching.sociology.ul.ie\/bhalpin\/sird\/strainblogvar.png\" alt=\"strainblogvar.png\" width=\"70%\" \/><\/p>\n<p><span class=\"figure-number\">Figure 4: <\/span>Spreads in infectiousness, nine models<\/p>\n<\/div>\n<p>Figure <a href=\"#org46f0cc4\">5<\/a> shows nine Lorenz curves. To a first approximation the curves move monotonically down and to the right (i.e., towards greater inequality) as the spread increases. In fact, for the higher levels, the curves finish practically vertical.<\/p>\n<div id=\"org46f0cc4\" class=\"figure\">\n<p><img decoding=\"async\" src=\"http:\/\/teaching.sociology.ul.ie\/bhalpin\/sird\/strainblogcumul9.png\" alt=\"strainblogcumul9.png\" width=\"70%\" \/><\/p>\n<p><span class=\"figure-number\">Figure 5: <\/span>Lorenz curves: Nine models<\/p>\n<\/div>\n<p>As <a href=\"#org117caa7\">6<\/a> shows, for spreads 6, 8 and 9, more than 50% of cases come from the most successful variant (for spread 7, by chance the highest infectivity is low relative to 6 and 8, evident in Figure <a href=\"#orgbb3d0a8\">2<\/a>). For spread 9, the most infectious lineage accounts for almost 90% of cases.<\/p>\n<div id=\"org117caa7\" class=\"figure\">\n<p><img decoding=\"async\" src=\"http:\/\/teaching.sociology.ul.ie\/bhalpin\/sird\/strainblogpct.png\" alt=\"strainblogpct.png\" width=\"70%\" \/><\/p>\n<p><span class=\"figure-number\">Figure 6: <\/span>Nine models: Proportion of cases accounted for by the largest lineage<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"outline-container-org8f3808b\" class=\"outline-2\">\n<h2 id=\"org8f3808b\">Conclusion<\/h2>\n<div id=\"text-org8f3808b\" class=\"outline-text-2\">\n<p>While there will be large variation between lineages even where there is no variation in infectiousness, adding spread to infectiousness dramatically increases the skew. This is largely driven by the extreme values, so it would be worth adapting this exercise to model the effect of a single more infectious variant (with differing increase in infectiousness) rather than simply skewing the distribution.<\/p>\n<p>One more thing is apparent, though: as a more infectious variant spreads, the average infectiousness increases and the epidemic gets faster, as Figure <a href=\"#orgee80d14\">7<\/a> shows.<\/p>\n<div id=\"orgee80d14\" class=\"figure\">\n<p><img decoding=\"async\" src=\"http:\/\/teaching.sociology.ul.ie\/bhalpin\/sird\/strainblogsir2.png\" alt=\"strainblogsir2.png\" width=\"70%\" \/><\/p>\n<p><span class=\"figure-number\">Figure 7: <\/span>Nine models: Time-series of current infections<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div id=\"outline-container-org27635bb\" class=\"outline-2\">\n<h2 id=\"org27635bb\">Code<\/h2>\n<div id=\"text-org27635bb\" class=\"outline-text-2\">\n<p>The simulation is coded in Julia. <a href=\"http:\/\/teaching\/sociology.ul.ie\/bhalpin\/sird\/sirdsen.jl\">sirdsen.jl<\/a> is the main file, <a href=\"http:\/\/teaching\/sociology.ul.ie\/bhalpin\/sird\/strain.jl\">strain.jl<\/a> has extra functions for this particular problem, and <a href=\"http:\/\/teaching\/sociology.ul.ie\/bhalpin\/sird\/strainblog.jl\">strainblog.jl<\/a> creates the graphs for this blog. <code>sirdsen.jl<\/code> can do a lot of other stuff but it&#8217;s rough and ready code.<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Scary mutant COVID-19 Since the news of a potentially more transmissible strain of C19 broke in the UK, I&#8217;ve been thinking about the mechanics. I was initially sceptical because it seemed to help politicians evade blame. Given the earlier fuss about a strain spread by holidaymakers returning from Spain in the summer, how much of &hellip; <a href=\"https:\/\/teaching.sociology.ul.ie\/bhalpin\/wordpress\/?p=684\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Viral Variants<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[12,13,14,15],"_links":{"self":[{"href":"https:\/\/teaching.sociology.ul.ie\/bhalpin\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/684"}],"collection":[{"href":"https:\/\/teaching.sociology.ul.ie\/bhalpin\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/teaching.sociology.ul.ie\/bhalpin\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/teaching.sociology.ul.ie\/bhalpin\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/teaching.sociology.ul.ie\/bhalpin\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=684"}],"version-history":[{"count":2,"href":"https:\/\/teaching.sociology.ul.ie\/bhalpin\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/684\/revisions"}],"predecessor-version":[{"id":687,"href":"https:\/\/teaching.sociology.ul.ie\/bhalpin\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/684\/revisions\/687"}],"wp:attachment":[{"href":"https:\/\/teaching.sociology.ul.ie\/bhalpin\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=684"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/teaching.sociology.ul.ie\/bhalpin\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=684"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/teaching.sociology.ul.ie\/bhalpin\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}