An in silico FSHD muscle fiber for modeling DUX4 dynamics and predicting the impact of therapy

Facioscapulohumeral muscular dystrophy (FSHD) is an incurable myopathy linked to the over-expression of the myotoxic transcription factor DUX4. Targeting DUX4 is the leading therapeutic approach, however, it is only detectable in 0.1–3.8% of FSHD myonuclei. How rare DUX4 drives FSHD and the optimal anti-DUX4 strategy are unclear. We combine stochastic gene expression with compartment models of cell states, building a simulation of DUX4 expression and consequences in FSHD muscle fibers. Investigating iDUX4 myoblasts, scRNAseq, and snRNAseq of FSHD muscle we estimate parameters including DUX4 mRNA degradation, transcription and translation rates, and DUX4 target gene activation rates. Our model accurately recreates the distribution of DUX4 and targets gene-positive cells seen in scRNAseq of FSHD myocytes. Importantly, we show DUX4 drives significant cell death despite expression in only 0.8% of live cells. Comparing scRNAseq of unfused FSHD myocytes to snRNAseq of fused FSHD myonuclei, we find evidence of DUX4 protein syncytial diffusion and estimate its rate via genetic algorithms. We package our model into freely available tools, to rapidly investigate the consequences of anti-DUX4 therapy.


Introduction
FSHD is a prevalent (~12/100, 000 Deenen et al., 2014), incurable, inherited skeletal myopathy. The condition is characterized by progressive fatty replacement and fibrosis of specific muscle groups driving weakness and wasting (Banerji and Zammit, 2021), which is accelerated by inflammation (Dahlqvist et al., 2020). FSHD is highly heterogeneous, with both the rate of progression and order of muscle involvement varying dramatically from person to person, even between monozygotic twins (Tawil et al., 1993). Around 75% of patients exhibit a descending phenotype with weakness beginning in the facial muscles, before progressing to the shoulder girdle and latterly lower limb, while the remaining 25% exhibit a range of 'atypical' phenotypes, including facial sparing and lower limb predominant (Banerji et al., 2020a). Despite this clinical range, FSHD is associated with significant morbidity and socioeconomic costs (Schepelmann et al., 2010).
Genetically FSHD comprises two distinct subtypes: FSHD1 (OMIM: 158900, 95% of cases) and FSHD2 (OMIM: 158901, 5% of cases). Both subtypes bear a unifying epigenetic feature: derepression of the D4Z4 macrosatellite at chromosome 4q35. In FSHD1 this is due to truncation of the D4Z4 macrosatellite from the typical >100 to 10-1 units . In FSHD2, derepression is due to mutation in a chromatin modifier, typically SMCHD1 (Lemmers et al., 2012) but rarely DNMT3B (van den Boogaard et al., 2016) or LRIF1 (Hamanaka et al., 2020). In addition to D4Z4 epigenetic derepression, FSHD patients also carry certain permissive 4qA haplotypes distal to the last D4Z4 repeat encoding a polyadenylation signal . Each 3.3 kb D4Z4 repeat encodes the transcription factor DUX4, which plays a role in zygotic genome activation, after which it is silenced in somatic tissues (De Iaco et al., 2017). In FSHD, however, epigenetic derepression of the D4Z4 region allows inappropriate transcription of DUX4 from the most distal D4Z4 unit, with transcripts stabilized by splicing to the polyadenylation signal in 4qA haplotypes, allowing translation. Mis-expression of DUX4 protein is thus believed to underlie FSHD pathogenesis and DUX4 inhibition is currently the dominant approach to FSHD therapy (Tawil, 2020;Le Gall et al., 2020).
However, DUX4 is extremely difficult to detect in FSHD patient muscle, with the vast majority of transcript and protein level studies failing to detect DUX4 in FSHD muscle biospies (Banerji and Zammit, 2021). When DUX4 is detected in FSHD patient muscle, it is at very low levels, requiring highly sensitive techniques such as nested RT-qPCR for transcripts (Jones et al., 2012) and proximity ligation assays for protein (Beermann et al., 2022). Investigation of FSHD patient-derived myoblasts has confirmed this very low level of DUX4 expression (Banerji and Zammit, 2021). Single-cell and single nuclear transcriptomic studies find only 0.5-3.8% of in vitro differentiated FSHD myonuclei express DUX4 transcript (Jiang et al., 2020;van den Heuvel et al., 2019). Immunolabelling studies only detect DUX4 protein in between 0.1-5% of FSHD myonuclei Rickard et al., 2015).
As DUX4 is a transcription factor, it has been proposed that DUX4 target genes may represent a key driver of FSHD pathology. However, multiple meta-analyses have found DUX4 target gene expression to be a poor biomarker of FSHD muscle, except in the context of significant inflammation (Banerji et al., 2017;, where it may be confounded by immune cell gene expression (Banerji et al., 2020b). Importantly, a recent phase 2b clinical trial of the DUX4 inhibitor losmapimod failed to reach its primary endpoint of reduced DUX4 target gene expression in patient muscle, despite improvement in functional outcomes (Jagannathan et al., 2022). Given the challenge of detecting DUX4 in muscle biopsies (Banerji and Zammit, 2021) it is unsurprising that no data was published relating to DUX4 expression changes during the losmapimod clinical trial. An understanding as to why losmapimod did not alter the expression of DUX4 targets in patient muscle biopsies is also lacking, but hypotheses include heterogeneity in muscle sampling, low baseline levels of DUX4 targets and thus limited dynamic range, slow reversibility of DUX4-induced epigenetic changes on target gene promoters and losmapimod having limited impact on DUX4 transcriptional activity in vivo.
How can such a rare expression of DUX4 drive a pathology as significant as FSHD? DUX4 expression in FSHD patient myoblasts follows a burst-like pattern, and cells expressing DUX4 have significantly shortened lifespans, suggesting a gradual attrition of cells over time (Rickard et al., 2015). A mouse model in which DUX4 expression is induced in a rare burst-like manner bears striking histological and transcriptomic similarities to FSHD patient muscle (Bosnakovski et al., 2017;Bosnakovski et al., 2020). DUX4 expression in FSHD patient-derived, multi-nucleated myotubes also displays a gradient across myonuclei, suggesting that DUX4 may 'diffuse' either actively or passively from an origin nucleus to neighboring nuclei, bypassing their need to wait for the rare DUX4 burst (Rickard et al., 2015;Tassin et al., 2013).
A deeper understanding of DUX4 dynamics and how it drives FSHD pathology is essential to move toward anti-DUX4 therapy. Not only would this explain DUX4 target gene expression as a suboptimal monitoring tool, but would enable optimal therapeutic design, through in silico perturbation of the parameters underlying DUX4 expression and toxicity.
Despite considerable discussion of 'rare-bursts' and 'diffusion' no attempt has been made to understand DUX4 expression through stochastic processes or differential equations; the natural setting to place these dynamics. Here, we combine ordinary differentiation equation models with stochastic gene expression models to construct a tuneable in silico simulation of DUX4 regulation in FSHD cell culture, both in unfused myocytes and syncytial multinucleated myotubes.
Through analysis of iDUX4 myoblasts, scRNAseq and snRNAseq of FSHD differentiated myoblasts we derive experimental estimates for the parameters of our model, including DUX4 mRNA degradation, transcription and translation rates, and DUX4 target gene activation rates. Simulation of our model provides a striking fit to DUX4 and DUX4 target gene expressing cell proportions seen in scRNAseq of FSHD myocytes. Importantly, our model predicts that DUX4 drives significant cell death, despite expression being limited to <1% of live cells. By comparing scRNAseq of unfused FSHD myonuclei to snRNAseq of multinucleated FSHD myotubes, we find evidence of DUX4 protein syncytial diffusion. We extend our model to examine DUX4 spreading between adjacent myonuclei and project our simulation onto the surface of a muscle fiber, in a spatially relevant model. Employing genetic algorithms to fit our spatial model to snRNAseq of FSHD syncytial myotubes, we provide an estimate for the syncytial diffusion rate of DUX4 protein.
We package our model into three freely available user interfaces, presenting an in silico toolkit to assess the impact of specific anti-DUX4 therapies on FSHD cell culture in a rapid, cost-effective, and unbiased manner.

Compartment and promoter-switching models of DUX4 expression
Here, we consider two models of DUX4 expression in FSHD myocytes, a deterministic model of FSHD cell states we call the compartment model, and a stochastic model of gene expression we call the promoter switching model.
We first describe the compartment model. FSHD single myocytes can express DUX4 and, therefore, DUX4 target genes (Rickard et al., 2015;Kowaljow et al., 2007;Heher et al., 2022). We have previously demonstrated, via a library of DUX4 expression constructs, that DUX4 target gene activation is also necessary for DUX4-induced cell death (Knopp et al., 2016). We thus propose that an FSHD single myocyte at a given time t , occupies one of the following five states/compartments, defined by its transcriptomic distribution: -a susceptible state where the cell expresses no DUX4 mRNA and no DUX4 target mRNA (DUX4 -ve/Target gene -ve: DUX4 mRNA naive cell) 2. E ( t ) -an exposed state where the cell expresses DUX4 mRNA but no DUX4 target mRNA (DUX4 +ve/Target gene -ve: DUX4 transcribed but not translated) 3. I ( t ) -an infected state where the cell expresses both DUX4 mRNA and DUX4 target mRNA (DUX4 +ve/Target gene +ve: DUX4 transcribed and translated) 4. R ( t ) -a resigned state where the cell expresses no DUX4 mRNA but does express DUX4 target mRNA (DUX4 -ve/Target gene +ve: i.e., a historically DUX4 mRNA expressing cell) We propose a model in which the single FSHD myocyte can transition through these five states according to five parameters:  Figure 1A) or equivalently as a system of ordinary differential equations (ODEs) ( Figure 1B).
There are important assumptions in our compartment model: 1. Cells are assumed not to proliferate over the evolution of the model. We restrict applications to differentiating cells that have exited the cell cycle. 2. The death rate of DUX4 target gene -ve cells is negligible in comparison to the death rate of target gene +ve cells. This assumption is justifiable given published data on the death rate of DUX4 target gene-positive cells (Rickard et al., 2015). 3. The transition from DUX4 target gene -ve cell to DUX4 target gene +ve cell states is irreversible, i.e., we assume that the volume of target transcripts induced by DUX4 is sufficiently large, such that the rate of their degradation to zero is negligible in comparison to the death rate of target positive cells. This assumption is justified given that DUX4 is a potent transcriptional activator and pioneer factor (Knopp et al., 2016;Choi et al., 2016). In what follows, we derive experimental estimates for the 5 parameters underlying the compartment model.
A further preliminary is the promoter-switching model. This model is precisely the two-stage telegraph process, which has a long history of study in stochastic gene expression (Shahrezaei and Swain, 2008;Vu et al., 2016;Kim and Marioni, 2013). Under this model, we assume that the promoter of a gene n can occupy one of two states: active and inactive, and that transition from active (a) to inactive (i) state occurs at a rate k n i , with the reverse transition occurring at a rate k n a . We further assume that an active promoter can transcribe a single mRNA at a rate v n 0 , which degrades at a rate δ n . The model is represented schematically in Figure 1C. This model of gene expression has been shown to follow a Poisson-Beta distribution (Vu et al., 2016;Kim and Marioni, 2013), where the promoter state is determined by a Beta-distributed variable p ∼ Beta ( k n a /δ n , k n i /δ n ) , and the mRNA copy number distribution conditional on the promoter state follows a Poisson distribution m|p ∼ Poisson ( pv n 0 /δ n ) . Under this interpretation maximum likelihood estimates (MLEs) for the normalized underlying parameters k n a /δ n , k n i /δ n and v n 0 /δ n can be approximated from single-cell transcriptomic data (Vu et al., 2016;Kim and Marioni, 2013).
We assume that the proportion of time the promoter is in the active state, multiplied by the transcription rate of the active promoter in our promoter-switching model k n a v n 0 k n a +k n i , is a reasonable proxy for the average rate of transcription of a gene in our compartmental model. We employ this assumption to estimate the average transcription rates V D and V T for the compartment model.

Estimating the kinetics of DUX4 mRNA
Our compartment model contains two parameters governing the kinetics of DUX4 mRNA: the degradation rate d 0 and the average transcription rate V D .
To estimate the degradation rate d 0 we employed human immortalized LHCN-M2 myoblasts expressing DUX4 under the control of a doxycycline-inducible promoter (iDUX4 myoblasts) (Choi et al., 2016). DUX4 expression was induced to a level and duration we have found sufficient to drive robust DUX4 mRNA expression, but only weak activation of DUX4 target genes and no widespread apoptosis . After induction, myoblasts were washed and supplemented with fresh medium without doxycycline. Samples were harvested for RNA extraction in triplicate immediately after washing and then at 1,2,3,4,5,6,8, and 10 hr post-wash. RT-qPCR was performed employing a standard curve to quantify the DUX4 mRNA copy number over our time course, to monitor DUX4 mRNA degradation in the absence of induction ( Figure 2A).
As anticipated DUX4 mRNA levels decayed exponentially over time in the absence of doxycycline (linear regression of ln(DUX4 mRNA) vs time, p=4.1 × 10 -4 , Figure 2B), allowing us to calculate the degradation rate of DUX4 mRNA, d 0 = 0.246/hr . This estimate suggests that the half-life of DUX4 mRNA is approximately 2.8 hr, not atypical for a transcription factor, and on the faster end of the mRNA degradation distribution (Yang et al., 2003).
To estimate the mean transcription rate of DUX4, V D , we applied the promoter-switching model presented above. We considered the scRNAseq dataset of FSHD single myocytes produced by van den Heuvel et al., 2019. This dataset comprises 7047 single myocytes, which were differentiated for 3 days in the presence of EGTA to inhibit fusion. 5133/7047 (73%) single myocytes were derived from four FSHD patients (two FSHD1 and two FSHD2). Patient demographics, genotypes, and DUX4 +/-ve cell counts are displayed in Supplementary file 1. DUX4 mRNA expression was detected in 27/5133 (0.53%) single FSHD myocytes but not in control myocytes (van den Heuvel et al., 2019;. Considering the 5133 FSHD myocytes together we implemented a gradient descent algorithm to approximate the MLEs of the normalized parameters k DUX4 a /δ DUX4 , k DUX4 i /δ DUX4 and v DUX4 0 /δ DUX4 from the Poisson-Beta interpretation of the promoterswitching model of DUX4 expression ( Figure 2C).
We note that δ DUX4 = d 0 , which we have already estimated, this enabled us to renormalize these parameters and compute the average DUX4 transcription rate, As the total number of DUX4 positive cells is low, we pooled data from the four FSHD patients to allow robust estimation of the average DUX4 transcription rate for this patient cohort. We note, however, that distinct FSHD genotypes likely underlie different DUX4 transcription rates. A.

Estimating kinetics of DUX4 target activation
We next estimated the average transcription rate of the DUX4 target genes in the presence of DUX4 mRNA, V T . We focused on eight DUX4 target genes: ZSCAN4, TRIM43, RFPL1, RFPL2, RFPL4B, PRAMEF1, PRAMEF2, and PRAMEF12 that have been identified as direct DUX4 targets via ChIP-seq (Young et al., 2013). We have shown that these eight genes are the only features consistently up-regulated in human myoblasts expressing DUX4, across four independent studies (Banerji and Zammit, 2021;Rickard et al., 2015;Choi et al., 2016;Young et al., 2013;Geng et al., 2012).
Examining mRNA levels of these eight DUX4 target genes in scRNAseq (van den Heuvel et al., 2019) and snRNAseq (Jiang et al., 2020) studies of FSHD and control differentiated myoblasts, expression was restricted to FSHD cells/nuclei and never observed in controls. This pattern of expression mirrors that of DUX4 mRNA and suggests that these targets are highly specific and are unlikely to be activated in the absence of DUX4.
To confirm our hypothesis, we applied the promoter-switching model. We returned to the scRNAseq data of 5133 FSHD myocytes generated by van den Heuvel et al., 2019 and divided the data into the 27 DUX4 +ve cells and 5106 DUX4 -ve cells. For each of our eight DUX4 target genes, we implemented our gradient descent algorithm to compute the MLEs of the normalized parameters k n a /δ n , k n i /δ n , and v n 0 /δ n , underlying a promoter-switching model for the given gene across the 27 DUX4 +ve FSHD myocytes and the 5106 DUX4 -ve FSHD myocytes separately ( Figure 3A).
In the presence of DUX4 mRNA, the proportion of time the promoters of the eight DUX4 target genes remained in the active state, k n a k n a +k n i , significantly increased (paired Wilcoxon p=7.8 × 10 -3 , Figure 3B), as expected. Curiously, however, the normalized rate of transcription of the DUX4 target genes from the active promoter, v n 0 /δ n , significantly decreased in the presence of DUX4 (paired Wilcoxon p=0.039, Figure 3C).
To investigate further, we considered the moments of the distribution of mRNA copy number, m , under the promoter-switching model. It can be shown that the mean mRNA copy number satisfies (Vu et al., 2016): The changes in parameters we calculate for the DUX4 target genes confirmed that in the presence of DUX4 mRNA, the mean expression of all 8 DUX4 targets increases (paired Wilcoxon p=0.039, Figure 3D), i.e., the drop in v n 0 /δ n is over-compensated for by the rise in k n a k n a +k n i . However, it is curious that v n 0 /δ n should drop at all. It can be shown that the variance of mRNA copy number m , satisfies (Vu et al., 2016): .
This expression ensures that as the mean mRNA copy number rises, so too must the variance, however, the level to which the variance rises is controlled by a term that is monotonic increasing in v n 0 /δ n and depends on the promoter state parameters in a more complex way. We postulated the pattern of DUX4 target gene parameter changes we observe in the presence of DUX4, have the effect of raising mean target mRNA expression, while suppressing target mRNA variance, i.e., a controlled activation of target genes. To investigate this, we considered two hypothetical scenarios in which the mean expression of target mRNAs, E [ m ] in the absence of DUX4, is increased to the same level we observe in the presence of DUX4. In the first scenario, we considered only increasing v n 0 / δ n to achieve the rise in E , in the second we considered only increasing the ratio of active to inactive promotor   target mRNA than observed in our data, with the pure rise in v n 0 /δ n driving the most dramatic increase in target mRNA variance ( Figure 3E).
Taken together these results suggest that under our promoter-switching model, increasing the expression of a gene comes at the cost of increasing the variance of its expression, and that the greatest contributor to this variance comes from the normalized active promoter transcription rate v n 0 / δ n . The parameter changes we observe in DUX4 target genes, suggest a management of this trade-off by DUX4, which increases the mean expression of target mRNA through a large increase in the proportion of time the promoter is active, k n a k n a +k n i , while offsetting the resulting rise in variance through a modest decrease in normalized active promotor transcription v n 0 /δ n ( Figure 3F). We formulate the mean transcription rate of at least 1 of the 8 DUX4 targets from our compartment model, V T , as the sum of the mean transcription rates of all eight target genes in the presence of DUX4 mRNA, i.e.,: where j indexes the eight DUX4 target genes, and the promoter-switching model parameters are estimated from the 27 DUX4 expressing FSHD single myocytes. Our promoter-switching model scRNAseq-derived MLEs are normalized parameters k n a /δ n , k n i /δ n and v n 0 /δ n . We must, therefore, estimate δ n for each target gene to compute V T . As there is a range of target genes, we approximate δ n for each by the median mRNA degradation rate observed in an analysis of 5245 genes (Yang et al., 2003), and set δ n = 0.0693 resulting in V T = 6.41/hr ( Figure 3G).
As with our calculation of V D data was pooled across four FSHD patients to calculate V T . We do not anticipate patient genotype to impact the average DUX4 target transcription rate, independently of its impact on the DUX4 transcription rate. However, to confirm our findings on the impact of DUX4 on target gene promoter dynamics, in a patient-specific setting, we attempted calculation of the parameters underlying the promoter switching model for the eight DUX4 target genes in DUX4 +ve and DUX4-ve cells, for patients FSHD1.1 and FSHD2.1 separately. Due to the limited number of cells for each patient, personalised estimates for all eight target genes could not be obtained. However, where patient-specific estimates have obtained the direction of parameter differences in target genes, between DUX4 +ve and DUX4 -ve cells were in line with those of pooled estimates across four FSHD patients (Supplementary file 2).
The remaining two parameters of our compartment model were calculated from published data. For the translation rate of DUX4 mRNA to active protein T D , we considered our analysis of iDUX4 myoblasts . We induced DUX4 expression with 250 ng/ml doxycycline and performed RT-qPCR to assess the expression of DUX4, and 3/8 of our DUX4 target genes ZSCAN4, TRIM43, and PRAMEF1, at 7 hr, 16 hr, and 24 hr of induction. DUX4 mRNA levels peaked at 7 hr, while the expression of DUX4 target genes peaked between 16 and 24 hr . This suggests a delay between DUX4 mRNA production and the presence of active DUX4 protein of between 9 and 17 hr, on average 13 hr. We thus estimate T D = 1 13 /hr . For the death rate of DUX4 target positive cells, Dr , we consider the data of Rickard et al., 2015, in which differentiating FSHD myoblasts containing a DUX4-activated GFP reporter were imaged every 15 min for 120 hr. Following activation of the DUX4 reporter, cells died ~20.2 hr later (Rickard et al., 2015). We thus estimate Dr = 1 20.2 /hr . . Paired two-tailed Wilcoxon p-values are displayed comparing adjacent distributions. (F) Schematic displaying how the change in parameters underlying the promoterswitching models for the eight DUX4 target genes in the presence of DUX4 leads to stable target gene activation. (G) Schematic of the estimation of the average DUX4 target gene transcription rate V T , from scRNAseq data of 27 DUX4 +ve FSHD myocytes.
The online version of this article includes the following source data for figure 3: Source data 1. Source data for Figure 3 provides the parameters of the promoter switching model for each of the 8 DUX4 targets, derived from 5106 DUX4 -ve FSHD single cells and 27 DUX4 +vs FSHD single cells seperately.

Compartment model simulation
Having defined experimental estimates for parameters underlying the compartment model, we simulated the model forward in time to observe how an initial distribution of cells progresses through the five compartments.
To provide a ground truth we considered the scRNAseq data of van den Heuvel et al., 2019. Defining a DUX4 target gene +ve cell as expressing at least one of our eight DUX4 target genes, we assign the 5133 FSHD myocytes to 1 of the 4 live cell states of our compartment model: . If we assume that at the start of differentiation, all FSHD myocytes occupy state S ( 0 ) being DUX4 negative and DUX4 target gene negative, simulating our model we estimated that 7% of starting cells will have died over 3 days. To replicate the starting conditions of the scRNAseq data we thus set  this starting condition, we obtained cell state proportions statistically indistinguishable from the experimental scRNAseq data: Figure 4A). We next simulated our model forward over 100 days to observe how the proportion of cells in each state changed ( Figure 4B). As expected, the number of cells in the DUX4 naive, susceptible state S ( t ) gradually decreased, while the number of dead cells due to DUX4 D ( t ) gradually rose, so that after 10 days 26.3% of cells had died as a consequence of DUX4 expression. Remarkably despite cell death in our model only being attributable to DUX4 expression, the dynamics predict that this is achieved while keeping the number of DUX4 mRNA and DUX4 target mRNA positive cells extremely low. DUX4 positive cells never rose to more than 0.8% of the live cell population and DUX4 target positive cells never more than 2.9%.
Our compartment model with experimentally derived parameters thus provides an excellent fit to real-world data and gives a mechanism for how extremely low levels of DUX4 and target gene expression can drive significant cell death in FSHD myocytes.

Modeling DUX4 expression in FSHD myotubes allows syncytial diffusion
Having considered scRNAseq data of unfused FSHD myocytes differentiated for 3 days, in which DUX4 expressed in a given nucleus cannot interact with other nuclei, we next considered syncytial diffusion of DUX4. Jiang et al., 2020 published a single myonuclear RNAseq (snRNAseq) of FSHD2 myoblasts differentiated over 3 days to form multinucleated myotubes. The data describes 139 FSHD2 myonuclei and 76 control myonuclei. As with the scRNAseq data van den Heuvel et al., 2019, none of the control myonuclei express DUX4 nor any of the 8 DUX4 target genes. For FSHD myonuclei, 3/139 (2.2%) express DUX4. The number of myonuclei in each of the live 'cell' compartments of our model is: ) . Comparing the proportions of myonuclei (cells) assigned to the four live states of our compartment model in the unfused FSHD scRNAseq and syncytial FSHD snRNAseq datasets, we found significant differences in the distributions (Chi-Squared p<2.2 × 10 -16 , Figure 5A). The unfused FSHD myocytes demonstrated a higher proportion of DUX4 -ve, DUX4 target gene -ve susceptible (S) cells, while the syncytial FSHD myonuclei demonstrated a greater proportion of DUX4 -ve, DUX4 target gene +ve resigned (R) cells.
We investigated whether allowing diffusion of DUX4 protein between myonuclei in our model could explain this difference in proportions. Two states in our compartment model express DUX4 target genes and thus have evidence for DUX4 protein: , and E ( t ) do not. We updated our model to the syncytial compartment model, where we allow the DUX4 protein compatible states to 'infect' the DUX4 protein incompatible states at a rate Δ ( Figure 5B and C).
The term 'infect' is only an analogy and our model is not based on a direct mapping of e.g., viral infection to our setting. In our case, the 'infectious agent' DUX4 causes harm but does not replicate. DUX4 protein is a transcription factor and thus activates the expression of target genes. In our model, DUX4 can be seen as an 'infectious agent', and expression of DUX4 target genes can be seen as the 'infection', which leads to cell death. DUX4 can either stay in the 'infected' cell until it dies or diffuse to another cell to spread the 'infection'.
We next employed a genetic algorithm to fit our syncytial compartment model to the snRNAseq data (Jiang et al., 2020). As differentiating FSHD myoblasts take approximately 24 hr to initiate fusion , and DUX4 expressing cells show defects in fusion (Knopp et al., 2016), we assumed that day 3 of differentiation represents day 2 of syncytial myonuclei and simulated our model over 48 hr, from a starting state of S We optimized two parameters via our genetic algorithm: the DUX4 syncytial diffusion rate Δ, and the number of starting myonuclei in the susceptible state n ( Figure 5D).
The algorithm converged on a solution of n = 217 susceptible myonuclei and Δ = 7.46 × 10 -4 / hr. Simulating the syncytial compartment model over 2 days employing these parameters resulted in a statistically indistinguishable approximation to the snRNAseq data (Jiang et al., 2020): , (Chi-Squared p=0.99, Figure 5E). Thus differences in proportions of cell states in fused versus unfused Simulating the syncytial compartment model over 100 days, we found a much faster death rate than the unfused myocyte model, with 97% of myonuclei dead by day 10. DUX4 mRNA-expressing cells remain low in proportion, never exceeding 0.8% of total live nuclei, however, DUX4 target gene mRNA expressing cells can now comprise a significant proportion of living nuclei, up to 70% at 73 hr, though on average comprise only 5.6% of living nuclei ( Figure 5F).

A cellular automaton model of FSHD myotubes
A limitation of our syncytial compartment model is the assumption that any DUX4 protein-positive myonucleus can 'infect' any DUX4 protein-negative myonucleus. In practice, DUX4 can likely only spread between adjacent myonuclei in a short-range interaction (Rickard et al., 2015;Tassin et al., 2013). To overcome this limitation, we re-cast our compartment model as a cellular automaton.
In this grid-based model, squares on the grid represent myonuclei, by introducing an appropriate boundary condition, the grid is topologically equivalent to the surface of a cylinder and thus can be considered to represent myonuclei residing on the surface of a myofiber ( Figure 6A).
We evolved our cellular automaton forwards in time in two steps. First, the non-syncytial compartment model was applied to each myonucleus to update the internal state of each nucleus stochastically according to the experimentally derived transition rates and the time period that has elapsed. In the second step, myonuclei in DUX4 protein-compatible states can 'infect' any of the eight neighbouring myonuclei in the grid which are in states at a stochastic rate Δ ( Figure 6B). Our cellular automaton model, thus retains all features of the compartment model, but facilitates a more realistic topology for a muscle fiber and prevents DUX4 protein from engaging in long-range non-physiological interactions.
We next employed a genetic algorithm to fit the cellular automaton to the syncytial snRNAseq data (Jiang et al., 2020). We again assumed that day 3 of differentiation corresponds to day 2 of syncytial myotubes and simulate our model over 48 hr, in time steps of 1 hr, from a starting state of = 0 . However, we now optimized three parameters: the DUX4 local diffusion rate Δ, the myotube nuclear length l and the myotube nuclear circumference c , where n = lc .
As the cellular automaton model is stochastic due to the discrete time steps employed, one cannot expect the same set of parameters to yield the same distribution of cell states after 48 hr of simulation. Thus the solution of a genetic algorithm may represent a parameter regime optimal for replicating the snRNAseq data, or may represent an unlikely realization of a parameter regime sub-optimal for replicating the data. To overcome this limitation we implemented 100 genetic algorithms to obtain a 'family' of parameter values Δ and c , which underlie potentially optimal solutions ( Figure 6C).
We performed a clustering analysis of the 100 optimal solutions, employing the parameter values Δ, l and c as a feature space. This revealed that a cluster of 14 solutions has significantly greater myotube length than circumference (Wilcoxon p=5.0 × 10 -8 ). This implies that for these 14 solutions, the genetic algorithm has converged to the general structure of a muscle fiber cylinder (long and thin). We focused on the mean parameter values of this cluster as the most physiologically realistic solution: Δ=0.0402/hr , l = 44 myonuclei, and c = 9 myonuclei ( Figure 6D).
Simulating the cellular automaton model 100 times with this parameter range over 48 hr resulted on average in a statistically indistinguishable approximation of the snRNAseq syncytial FSHD myonuclei state distribution (Chi-squared p=0.98, Figure 6E). protein permissive states I and R, to 'infect' non-permissive states S and E. (C) Ordinary differential equations describing the syncytial compartment model. (D) Schematic of the genetic algorithm employed to estimate the DUX4 diffusion rate Δ and the starting population size n, for the syncytial compartment model from 139 fused FSHD single myonuclei. (E) Bar chart displays the number of cells in each live cell compartment (blue) in our syncytial compartment model following simulation over 2 days using experimentally estimated parameters and (red) in 139 fused single FSHD myonuclei. A Chi-squared goodness of fit p-value tests the alternate hypothesis that the two distributions are different. (F) Line plot displaying how the number of cells in each of the five compartments of the syncytial compartment model changes over 100 days from a starting state of n cells. The percentage of cells dead after 10 days is displayed alongside the maximum percentage of live cells which are DUX4 +ve (E+I) max and DUX4 target gene +ve (R+I) max . Thus after restricting DUX4 protein from spreading to only neighboring nuclei, we were still able to explain the difference between unfused and fused cell state distributions purely with a diffusion term for DUX4 protein.
A toolbox for assessing the impact of therapies on DUX4-mediated myotoxicity Anti-DUX4 therapy for FSHD can target any aspect of DUX4 expression. To understand the impact of a given therapeutic strategy one requires two key pieces of information: 1. The true value of the parameters underlying DUX4 expression. 2. How a proposed change in these parameters by a therapeutic will impact cell death.
Here, we have derived experimental estimates for the parameters underlying DUX4 expression which can be modified by anti-DUX4 therapy, while our compartmental and cellular automaton models provide the framework for investigating how parameter changes will impact cell death.
To facilitate other investigators using our models to guide anti-DUX4 therapy development, we have packaged them into graphical user interfaces to provide three user-friendly tools.
The first tool allows investigators to visualize the compartment model and syncytial version, for a range of parameter choices. Sliders allow the investigator to perturb the six parameters of our models: V D , d 0 , V T , T D , Dr , and Δ, and outputs the temporal evolution of the models over as many hours as required, from any starting number of susceptible cells/nuclei, as well as histograms comparing the perturbed model to the experimental data of van den Heuvel et al., 2019 andJiang et al., 2020. The second tool implements the cellular automaton model of DUX4 in a syncytium. As with the first tool users can employ sliders to perturb the 6 parameters of the model V D , d 0 , V T , T D , Dr , and Δ, as well as the dimensions of the myofiber grid l and c , and the number of hours over which the automaton should be simulated. The automaton can then be started and the nuclear state updates will be dynamically played on a grid, while a histogram dynamically updates the proportions of nuclei in each state.
The final tool allows investigators to compare dead cell proportions over time for a chosen parameter regime ( (V D ) , d 0 , V T , T D , Dr , and ∆, l and c ), with cell death under our experimentally derived parameters. Users can again select their parameter regime and dynamically view changes in dead cell proportions under the single cell compartment model, to simulate realizations of the cellular automaton model and perform comparisons of cell death via Cox proportional hazard models.
The tools are hosted at the following web addresses: 1. Compartment Models: https://crsbanerji.shinyapps.io/compartment_models/ 2. Cellular Automaton: https://crsbanerji.shinyapps.io/ca_shiny/ 3. Survival Analysis: https://crsbanerji.shinyapps.io/survival_sim/ The three tools can be used to understand how anti-DUX4 therapies aimed at different model parameters alter the proportion of cells in each compartment of our model at given times. This can guide the optimal therapeutic approaches, as well as optimal time points to assay to validate given therapies using cell culture approaches.

Discussion
Anti-DUX4 therapy is the leading candidate for an FSHD treatment, with several compounds currently in clinical trials (Tawil, 2020;Jagannathan et al., 2022;Le Gall et al., 2020). However, DUX4 expression in FSHD muscle demonstrates a complex dynamic (Banerji and Zammit, 2021; estimate the DUX4 diffusion rate Δ, myotube length l , and myotube circumference c for the cellular automaton model from 139 fused FSHD single myonuclei. (D) Heatmap displays the clustering solution of the 100 optimal parameter regimes l, c and Δ produced by fitting 100 genetic algorithms to 139 fused FSHD myonuclei. The highlighted cluster represents a parameter regime in which myotubes are long and thin, the average parameter values of this cluster are displayed in red. (E) Bar chart displays the average proportion of cells in each live cell compartment (blue) in our cellular automaton model following simulation over 2 days using experimentally estimated parameters, alongside standard error of the mean, and (red) in 139 fused single FSHD myonuclei. A Chi-squared goodness of fit p-value tests the alternate hypothesis that the two distributions are different. Figure 6 continued . Understanding this complex dynamic is essential to the construction of optimal therapy, as it is currently unclear which stage of the DUX4 'central-dogma' one should target to have the most significant impact on pathology. This has led to diverse strategies, targeting epigenetic regulation of DUX4 (Lemmers et al., 2012;Block et al., 2013), DUX4 mRNA (Wallace et al., 2012;Ciszewski et al., 2020), DUX4 protein (Klingler et al., 2020), and DUX4 downstream effects (Heher et al., 2022).
Here, we present a mathematical model of DUX4 expression in differentiated FSHD myoblasts, based on ordinary differential equations and stochastic gene expression. By analyzing human myoblasts expressing inducible DUX4 as well as scRNAseq and snRNAseq of FSHD patient myocytes and myotubes, we compute experimental estimates for the parameters underlying our model. These include the first estimates of DUX4 transcription, translation, and mRNA degradation rates. Simulating our model with experimentally derived parameters we find that it accurately predicts the proportion of DUX4 +ve/-ve and DUX4 target gene +ve/-ve cells observed in actual scRNAseq of FSHD patient myocytes. We package our model into graphical user interface tools to allow investigators to rapidly observe the impact of any given anti-DUX4 therapy on cell viability.
As with all models, ours are subject to assumptions, such as combining the multi-step processes of transcription and promoter activation into single steps. We further assumed that cells expressing our 8 DUX4 target genes are historic DUX4-expressing cells. We selected these eight genes as they are confirmed DUX4 targets by ChIP-seq and have been identified as upregulated in every transcriptomic analysis of DUX4 over-expressing human myoblasts (Banerji and Zammit, 2021). Tissue expression patterns of these eight genes are not well characterized outside of the FSHD context, however, their expression has been reported during zygotic genome activation (Taubenschmid-Stowers et al., 2022) and in testicular tissue (Taubenschmid-Stowers et al., 2022;Ishiguro et al., 2017), both settings where DUX4 is physiologically expressed. We found further evidence for the expression of these genes indicating historic DUX4 in this study. First, we never find a single transcript for any of these eight target genes in 1914 single myocytes and 77 single nuclei from control individuals, suggesting that their expression requires an FSHD genotype (and thus likely DUX4 expression). Second, our investigation of these genes in scRNAseq data of FSHD myocytes demonstrated that in the presence of DUX4, the expression of all eight genes significantly increases, indicating activation by DUX4. While this is evidence that the eight targets are specific to DUX4, it is possible that they may also be induced at a much lower level, by some other factor related to the FSHD genotype and thus a small proportion of DUX4 target gene +ve cells in this study may not be historically DUX4 +ve.
We also limited our model to differentiated muscle culture, when DUX4 expression is more robust. DUX4 mRNA is typically detected in a small proportion (0.5-3.8%) of FSHD myoblasts in vitro (Jiang et al., 2020;van den Heuvel et al., 2019;, and protein expression is similarly rare (0.1%) . The situation is qualitatively different in FSHD muscle biopsies, where DUX4 mRNA detection is highly variable and DUX4 protein detection is extremely rare. DUX4 target gene expression is detected in inflamed FSHD muscle biopsies but less robustly in non-inflamed muscle, implying that a systemic component may also activate DUX4 expression in vivo (Banerji and Zammit, 2021;Banerji, 2020;Banerji et al., 2020b). Despite the added complexity of DUX4 expression in the muscle biopsy setting, all anti-DUX4 therapies currently under consideration were first investigated in myogenic cells in vitro. Thus, it is encouraging that we can simulate DUX4 and target gene expression single-cell distributions which are indistinguishable from those observed in FSHD patient muscle cell culture. Through theoretical investigation, we can also explore processes such as DUX4 protein syncytial diffusion and DUX4 target gene activation, which may be less accessible to experimentation.
FSHD is a rare disease and public datasets describing scRNAseq and snRNAseq of patient-derived primary myocytes are currently limited to those used in this study. Consequently, we have pooled data describing 4 individual patients of different FSHD genotypes to estimate two of the parameters of our model: V T and V D . DUX4 expression levels depend on D4Z4 repeat length and methylation status, and can differ between cell lines isolated from different FSHD patients (Jones et al., 2012;Homma et al., 2012), as well as between genetically identical cell lines isolated from the same mosaic FSHD patient . We computed patient-specific estimates of V D for 2/4 patients with sufficient data and found these comparable to the pooled estimate. By pooling patients, we obtained parameter estimates that may not be true for an individual but represented the 'average' parameter values across these four FSHD patients. Our in silico model of DUX4 expression is proposed as a pre-in vitro screening tool to guide anti-DUX4 therapy for the general population. However, as more data on FSHD is generated our models will evolve. In particular, as higher volumes of scRNAseq data describing FSHD patients with different genotypes become available, the model can be updated to facilitate genotype-stratified and even personalized anti-DUX4 therapy design. Moreover, new data describing scRNAseq of proliferating FSHD primary myoblasts, alongside quantification of how DUX4 and DUX4 target gene expression impacts myoblast proliferation rates, would allow natural extension of our model to understand DUX4 expression during FSHD myoblast proliferation.
DUX4 is myotoxic (Kowaljow et al., 2007), but how its rare expression drives and sustains significant pathology is unclear. DUX4 has been proposed to undergo a rare burst-like expression dynamic (Bosnakovski et al., 2017;Tassin et al., 2013), though no attempt has previously been made to understand DUX4 expression as a stochastic process. Here, we model DUX4 and its target gene expression directly as stochastic processes via our promoter-switching model and estimate the underlying parameters. Our cell-biology informed model predicts that in single FSHD myocytes/myotubes, DUX4 can drive significant cell death, eventually depleting the entire population, while being expressed in only 0.8% of live cells. This level matches well with the proportion of DUX4-positive cells seen in published studies (Banerji and Zammit, 2021;van den Heuvel et al., 2019;Snider et al., 2010) and confirms that a burst-like mechanism of DUX4 expression can drive significant pathology while making DUX4 difficult to detect.
DUX4 has also been proposed to spread through the myofiber syncytium from its originator nucleus to 'infect' DUX4 naïve nuclei, bypassing the need for a rare expression burst and accelerating pathology (Tassin et al., 2013;Barro et al., 2010). The proportion of DUX4 target positive cells is greater in snRNAseq of syncytial FSHD myotubes than scRNAseq of unfused myocytes, while the proportion of DUX4 positive cells is comparable, supporting a syncytial diffusion mechanism. We model DUX4 in FSHD myotubes as an infectious agent, able to spread from one nucleus to another (but not replicate) by adapting epidemiological compartment models, which we package as a cellular automaton to provide a realistic myotube surface on which to monitor DUX4 expression. Incorporation of a diffusion term is sufficient to account for the difference in DUX4 target gene +ve/-ve nuclear proportions, between syncytial FSHD myotubes and unfused FSHD myocytes, while maintaining comparable proportions of DUX4 +ve cells. We thus demonstrate that the theoretical hypothesis of DUX4 syncytial diffusion is compatible with biological data, and provide an estimate for the DUX4 diffusion rate.
Our model predicts <2.9% of single FSHD myocytes will be DUX4 target gene mRNA positive at any given time, despite significant DUX4-driven cell death. While in FSHD myotube nuclei this proportion can transiently spike at 70%, on average it remains much lower at only ~5.6%. This suggests that in FSHD muscle, expression of DUX4 target genes at any given time typically remains restricted to a small number of myonuclei. This may explain why DUX4 target gene expression is an inconsistent biomarker of FSHD muscle (Banerji et al., 2017;. Moreover, our model predicts that DUX4 target gene expression does not typically increase over time, supporting the finding that DUX4 target gene expression in FSHD muscle has not been validated as a marker of disease progression (Banerji, 2020;Wong et al., 2020). Lastly, due to the typically low levels observed, it may be difficult to detect changes in DUX4 target gene activation following anti-DUX4 therapies. This may have contributed to the recent phase 2b trial of losmapimod in FSHD failing to reach its primary outcome measure of suppressing DUX4 target gene expression in patient muscle biopsies (Jagannathan et al., 2022).
By modeling DUX4 target gene expression as stochastic processes, we found that DUX4 increases the proportion of time target gene promoters are in an active configuration, while curiously decreasing the normalized active promoter transcription rate. Through analytic investigation of our model, we found the rise in active promotor time drove increased DUX4 target gene expression, while the drop in normalized active promotor transcription rate dampened the noise associated with this higher expression level. This suggests that DUX4 modifies the expression of its target genes to orchestrate a precise, stable activation. It has been shown that DUX4 is a pioneer factor and increases target gene promoter activation via C-terminal recruitment of p300 to drive H3K27 acetylation (Choi et al., 2016). How DUX4 may limit normalized active promoter transcription rates of its target genes is unclear, but could involve interaction with the transcriptional complex, or feeding back to decrease the stability of target mRNA.
We thus present our model of DUX4 expression as a theoretical setting to understand the complex dynamics of this important disease gene and as an open source, in silico platform to rapidly and cheaply pre-screen anti-DUX4 therapy for FSHD.

Standard curve to compute d 0
The length of the DUX4 construct used in our standard curve was 8938 bp and the number of copies per ng was calculated via the following formula: copy number/ng : = NA 8938 ( 660×10 −9 ) = 1.02 × 10 9 Where N A = 6.022 × 10 23 mol -1 is Avogadro's number and 660 g/mol is the molecular weight of a single DNA base pair. Linear regression of the standard curve confirmed that DUX4 threshold cycles (Cts) are a linear function of log 10 ( copy number ) (R 2 =0.994), with a slope of 30.4 and intercept of -2.70. These values were employed to convert DUX4 Cts from our iDUX4 assay to DUX4 copy number via the following formula: copy number = 10  In our iDUX4 assay, we sample RNA immediately after washing off doxycycline and at multiple time points post-wash. We assume that no DUX4 can be transcribed post-wash and model the DUX4 copy number as an exponential decay: Linear regression of ln ( DUX4 copy number ) against time post wash (t) yielded a slope of 0.246, giving our estimate of d 0 , the degradation rate of DUX4.

scRNAseq and snRNAseq data
Normalized read counts for scRNAseq of 7047 FSHD and controls single myocytes produced by van den Heuvel et al., 2019 were downloaded from the GEO data base accession GSE122873. This dataset contains 5133 single myocytes derived from four FSHD patients (two FSHD1 and two FSHD2) and 1914 single myocytes from two control individuals. Myocytes were differentiated for 3 days in the presence of EGTA to prevent fusion.
Normalized read counts for snRNAseq of 317 FSHD and controls single myonuclei produced by Jiang et al., 2020 were downloaded from the GEO database accession GSE143492. This data comprised 47 FSHD2 nuclei at day 0 of differentiation and 139 FSHD2 nuclei at day 3, from two seperate patients, alongside 54 control nuclei at day 0 and 77 control nuclei at day 3 from two separate individuals. For comparison with the scRNAseq data, we focused on myonuclei from day 3 of differentiation.
All myocytes and myonuclei nuclei were assigned to 1 of 4 live cell compartments via the following criteria: Estimation of MLEs of promoter-switching model parameters from scRNAseq data To calculate the transcription rate for DUX4 and DUX4 targets we adopt the approach employed by Larsson et al. and Trung et al. where a maximum likelihood estimation (MLE) methodology is used to infer the parameters for the two-state model of stochastic gene expression (Vu et al., 2016;Larsson et al., 2019). This is implemented in the poisbeta python package available at https://github.com/ aksarkar/poisbeta. The procedure takes the Poisson-Beta distribution discussed in the results: and minimizes the negative log-likelihood for each gene where p is a Beta-distributed variable describing the promotor state, N is the number of cells, m i is the number of mRNA transcripts for cell i = 1, . . . , N , and θ = [ v n 0 /δ n , k n a /δ n , k n i /δ n ] , is the parameter space. From here on we will not include the normalizing δ n term for brevity.
As a first estimate of θ , we use the method of moments derived by Peccoud and Ycart for the twostate promotor model (Peccoud and Ycart, 1995) θ is then optimized via the Nelder-Mead method using the Gauss-Jacobi quadrature to evaluate the likelihood function /2 to substitute the beta-distributed parameter, K is the number of points integrated over, w k is the weight of the Jacobi polynomial of degree k , and y k is the root. The optimizer, quadrature method, beta distribution, and Poisson distribution are implemented in the scipy package available from https://scipy.org/install/.

Statistical comparison of promoter-switching model parameters
The three normalized parameters of the promoter-switching model v n 0 /δ n , k n a /δ n , k n i /δ n , were computed as above for each of the 8 DUX4 target genes ZSCAN4, TRIM43, RFPL1, RFPL2, RFPL4B, PRAMEF1, PRAMEF2, and PRAMEF12, in the 27/5133 FSHD single myocytes with detectable DUX4 mRNA and separately in the 5106 FSHD single myocytes without detectable DUX4, in the dataset of van den Heuvel et al., 2019. The normalized active promoter transcription rate v n 0 /δ n , the proportion of time spent with a promoter active . In the case of v n 0 /δ n , we assume that in this case is simply: We can thus choose x , to achieve the rise in E [ m ] seen under DUX4 expression d ( µ ) as: , the target mRNA copy number variances under our two hypothetical scenarios. These variances were compared with the true mRNA copy number variance in the 27 DUX4 +ve myocytes, as well as with each other via two-tailed paired Wilcoxon tests, significance was assessed at the 5% level.

Compartment model simulation
After the estimation of the five parameters V D , d 0 , V T , T D , and Dr , the ODEs underlying the compartment model ( Figure 1B) were simulated from an initial state of all cells in state S ( 0 ) , over a period of 100 days in timesteps of 1 hr using the deSolve package in R (Soetaert et al., 2010). For comparison with the 5133 single FSHD myocytes differentiated for 3 days described by van den Heuvel et al., 2019, an initial population sized 5133 was simulated for 3 days, after which 6.901% of starting cells were in the dead cell state. In order to replicate the live cell population of 5133 after 3 days we thus employed a starting population of 5133 (1+0.06901) cells in state S ( 0 ) . After simulation for 3 days the proportion of cells in each live cell state S , and R ( 3 days ) was compared between the model simulation and the true scRNAseq data, via a Chi-squared test.
For the syncytial compartment model, simulation was performed as above with V D , d 0 , V T , T D , and Dr unchanged. The additional parameter Δ was estimated via the genetic algorithm (below) alongside the starting population n of cells in state S . After simulation for 2 days (as there is assumed no syncytium for the first 24 hr of fusion) the proportion of cells in each live cell state was compared between the model simulation and the true snRNAseq data of Jiang et al., 2020 via a Chi-Squared test. Significance was assessed at the 5% level.

Cellular automaton model
The cellular automaton model was evolved on an l × c rectangular grid describing the length and circumference of the myotube. Individual cells on the grid correspond to single myonuclei in a syncytium. Each cell was evolved stochastically over a discrete time-step of 1 hr. In each time-step 2 independent actions were performed.
First, the state of each cell was evolved according to the non-syncytial compartment model. Transition from connected states was modeled as an exponential process with a rate parameter equal to the transition rate (e.g. transition from S to E occurred according to exp ). An event occurring or not under this exponential distribution within 1 hr was simulated during each time step. If the event occurred a transition in cell state occurred, otherwise the cell state remained the same. In the situation where a cell state could transition in two possible directions (e.g. state E can transition to S at a rate d 0 and to I at a rate T D V T ) competing exponential clocks were set up. Using the property that , we simulated a transition occurring in either direction within 1 hr. If a transition occurred, we simulated the exponential clocks describing transition in either direction independently, and transitioned the cell state according to whichever experienced an event faster. If no transition occurred the cell state remained the same.
Once every cell was evolved according to the non-syncytial compartment model we updated the model according to the diffusion of DUX4. Cells in states I or R at the start of the time-step can interact with cells in states S or E if they are among their eight immediate neighbors ( Figure 6B). Each interaction was again modeled as an exponential distribution with rate Δ, which was simulated for an event occurring within 1 hr. If the event occurred then the state of the neighboring cell was updated S → I or E → R , otherwise the state of the neighboring cell remained the same.
We implement a boundary condition so that cells at position 1 on the circumference dimension are able to interact with cells in position c , to allow our grid topological equivalence to a cylinder ( Figure 6A). The cellular automaton model was evolved from a starting distribution of all cells in state S over 48 hr time-steps, employing the parameters V D , d 0 , V T , T D and Dr estimated from the non-syncytial compartment model and ∆, l and c estimated from the genetic algorithm and clustering analysis (see below). Due to the stochastic nature of the exponential clocks involved, 100 simulations were performed to obtain an average behavior of cell type proportions under our model. The proportion of cells in each of the live cell states obtained from the average behavior of our model was compared to the true snRNAseq data of Jiang et al., 2020 via a Chi-Squared test. Significance was assessed at the 5% level.

Genetic algorithms
We employed genetic algorithms twice, firstly in the syncytial compartment model to fit the number of myonuclei n in the starting state S and the diffusion parameter Δ. Second in the cellular automaton model to again fit Δ, and the length l and circumference c of the automaton grid, and thus again the number of cells n = l × c in the starting state S .
Both algorithms employed the same fitness function aimed at minimizing the difference in the proportion of cells in the live states between the simulated model after 2 days and the snRNAseq of Jiang et al., 2020 Where n live n − D sim ( 2days ) and ε ≪ 1 is chosen to prevent singularity while rewarding models which obtain values of E sim ( 2days ) n live close to 0. This fitness function was chosen as it outperformed conventional functions based on Minkowski and Euclidean distances. A value of ε = 0.1 , proved sufficient to generate models with live cell state proportions indistinguishable from the snRNAseq data via the Chi-squared test.
Genetic algorithms were implemented using the GA package in R (Scrucca, 2013) using default parameters: starting population of 50 models, elitism of 0.05, mutation probability 0.1, crossover probability 0.8, and an optimal model was selected if maximum fitness was stable for 10 generations. The cellular automaton model evolves stochastically and thus an optimal fitness function for a population could represent an optimal parameter regime, or an unlikely simulation of a sub-optimal parameter regime. We thus ran 100 genetic algorithms on the cellular automaton to generate 100 optimal parameter regimes and examined their structure via clustering analysis (below).

Clustering analysis
Clustering analysis was performed on the 3 × 100 feature space of parameter regimes ∆, l and c found optimal in the 100 genetic algorithms performed on the cellular automaton model. The Consensus-ClusterPlus package in R (Wilkerson and Hayes, 2010) implemented K-medoids clustering using a Euclidean distance metric, and consensus-CDF cluster stability plots ascertained the optimal number of clusters in the parameter feature space as 5.
Two-tailed paired Wilcoxon tests comparing the distribution of l and c values in each cluster, demonstrated that only one parameter cluster output significantly long and thin myotubes, in line with the microanatomy of muscle ( Figure 6D). The average values of ∆, l , and c from this cluster were thus considered the optimal parameter regime for the cellular automaton model.

Shiny tools
Three GUI tools were written using the shiny package in R (Chang et al., 2014). The first tool outputs the compartment models for user parameter inputs and is implemented using the deSolve package (Soetaert et al., 2010). The second tool outputs a dynamic realization of the stochastic cellular automaton model for user parameter inputs, the automaton is displayed using the lattice package in R (Sarkar & Deepayan, 2008). The third tool displays the proportion of dead cells under the compartment model comparing our experimentally derived parameter regime to a user-selected parameter regime. In addition, the third tool simulates two realizations of the cellular automaton model, one using our experimentally derived parameter regime and another using the user-selected regime ( l and c are kept the same for both simulations to allow comparable starting populations). Survival analysis using Cox-proportional hazard models is implemented via the survival package in R (Therneau and Grambsch, 2018), to compare cell death rates in the two realizations, with p-values displayed on a corresponding Kaplan-Meier plot.
The three tools can be accessed at: For each of the eight DUX4 target genes considered the three parameters underlying the promoter switching model ( k n a /δ n , k n i /δ n , and v n 0 /δ n ) derived from DUX4 +ve and DUX4-ve cells separately for patients FSHD1.1 and FSHD2.1 separately are presented.

• MDAR checklist
Data availability All data generated or analysed during this study are publicly available or included in the manuscript, all code employed is published as part of our shiny app at 3 public domain URLs listed in the manuscript, and available at GitHub: https:// github. com/ MVCowley/ in-silico-FSHD-muscle-fiber-tools, copy archived at Cowley, 2023.
The following previously published datasets were used: