Introduction

Pathogens and parasites are a key source of mortality and fitness reduction in essentially all organisms. Consequently, pathogens and parasites are expected to be key drivers of evolution, adaptation, and speciation (Van Valen 1973). Parasites and pathogens are expected to play especially key roles in group living species, as disease can spread more easily when organisms live at high densities and frequently interact (Cremer et al. 2007; Nunn et al. 2015). As such, group living organisms are expected to show numerous adaptations to parasites and pathogens (Schmid-Hempel 1988). Variation among individuals in their genes is the raw material upon which selection acts to generate adaptive change and may help protect populations from disease by increasing the chances at least some individuals will be partially resistant (Altermatt and Ebert 2008). However, genetic variation in fitness-relevant traits is expected to be low, and in some group-living organisms individuals may be related due to inbreeding, hence lowering genetic diversity within the group even further (Hatchwell 2010; Settepani et al. 2017). Social groups therefore present a challenge: how do they cope with exposure to parasites and pathogens when living at high densities and when genetic variation among group members is low?

Key candidate mechanisms through which populations with low genetic diversity can still show rapid responses to environmental threats are epigenetic modifications such as histone modification and DNA methylation (Flores et al. 2013). Epigenetic mechanisms can act within an organism’s life to alter gene expression and therefore phenotypes without altering the genetic code (Ledon-Rettig et al. 2012), allowing much more rapid responses to immune challenges compared to adaptive change though changes in allele frequencies across 10 s of generations. For example, in both silkworm (Bombyx mori) and a mosquito (Anopheles albimanus) the immune response is modulated by DNA methylation in the midgut (Wu et al. 2017; Claudio-Piedras et al. 2020). DNA methylation occurs when the carbon-5 position of a cytosine base gains a methyl group. DNA methylation is one of the more commonly studied epigenetic mechanisms, and in mammals and plants is known to reduce expression of genes when bases within genes promoters are methylated (Bird 2002; He et al. 2011; Elhamamsy 2016). Further, in both plants (Deleris et al. 2016) and mammals (Mostoslavsky and Bergman 1997; Morales-Nebreda et al. 2019) DNA methylation plays a key role in the immune response to both bacterial and viral pathogens. The role of DNA methylation is less clear in arthropods and other invertebrates however, with DNA methylation being associated with both increased, decreased, and stabilised gene expression (Richard et al. 2021; Duncan et al. 2022), and so whether DNA methylation plays an important role in the immune response requires investigating.

Social spiders are an excellent model system to study how group living species resist parasites and pathogens as they live in dense aggregations with constant social interactions among individuals, creating the perfect conditions for disease transmission. The convergent evolution of sociality in spiders is associated with the complete elimination of juvenile dispersal, which leads to an obligatory inbreeding mating system (Lubin and Bilde 2007). Further, social spiders have strong primary female-biased sex ratio, reproductive skew and cooperative brood care. This combination of traits causes reductions in effective population size which leads to very low population genetic diversity (pi < 0.0003), which is a 10x reduction compared to their solitary sister-species (Settepani et al. 2017), and much lower than social insects (Romiguier et al. 2014). Social spiders should therefore be especially susceptible to pathogens. This is supported by the recent findings that social spiders have impaired immune responses compared to their non-social sister-species (Bechsgaard et al. 2022), and that nests do not persist very long, likely due to diseases (Busck et al. 2022). Despite this, populations of social spiders persist.

Comparative genomic approaches have recently shown that genes rapidly evolving in social spiders compared to their solitary sister species include those important in immune function (Tong et al. 2020), indicating this is the ideal taxon to explore how parasites and pathogens drive evolution in group-living organisms. Further, the genome of the social spider Stegodyphus dumicola has relatively high methylation level, with a bimodal distribution common in invertebrates, and the patterns are consistent with a role of DNA methylation in local adaptation and also in regulating plasticity in gene expression (Liu et al. 2019; Aagaard et al. 2022, 2024). Genes that are methylated show higher expression (Liu et al. 2019), suggesting that DNA methylation could be a mechanism underpinning changes in gene expression and therefore phenotypic plasticity. Additionally, some genes underpinning expression in plasticity in temperature tolerance phenotypes were generally highly methylated (Aagaard et al. 2024), supporting for a role of DNA methylation in mediating phenotypic plasticity. However, the patterns and functions of DNA methylation in invertebrates and in this taxon are still opaque. The spider immune response involves phagocytosis and encapsulation, production of effector molecules such as hemocyanin and phenoloxidase, and a clotting cascade (as well as constitutive responses; Kuhn-Nentwig and Nentwig 2013; Bechsgaard et al. 2016) all of which could be regulated by gene expression and therefore DNA methylation.

Here we aim to characterise how patterns of DNA methylation change in S. dumicola shortly before nest extinction, which is associated with a high bacterial load (Busck et al. 2022). Given the high bacterial load typically present in nests before they die off, we can expect them to be mounting an immune response compared to when they are healthy. By comparing DNA methylation profiles of a nest when it is healthy and when it is about to die off, we can therefore determine the role of DNA methylation in the immune response. We performed this comparison at a range of scales (base, gene, chromosome, whole genome) to gain a holistic understanding of how DNA methylation changes in response to infection.

Methods

Sample collection

Stegodyphus dumicola is a social spider found in central and southern Africa (Majer et al. 2013). Individuals live in groups of tens to hundreds of individuals. As there is no juvenile or pre-mating dispersal (Lubin and Bilde 2007; Lubin et al. 2009; Smith et al. 2009), social spiders are strictly inbreeding and nest mates are genetically homozygous (Lubin and Bilde 2007; Settepani et al. 2017). New nests are established post-mating by single inseminated females who take off from the natal nest by ballooning (flying on silk threads), which is the only means of long-distance dispersal and lineage propagation (Lubin and Bilde 2007). An existing nest can split by fission to establish a new nest on the same tree or bush, in which case individuals move back and forth between the two nests, but this process is similar to extending the nest rather than propagating the lineage (Lubin and Bilde 2007). Social spiders have a one-year generation time, but a social spider nest has a relatively short lifetime of a few generations due to high predation rates and by succumbing to diseases (Henschel 1998; Crouch and Lubin 2001; Bilde et al. 2007; Busck et al. 2022). Social spiders cooperate in prey capture during which digestive fluids are injected into prey and shared during communal feeding (typically flying insects). Homogenization of bacterial symbionts by social transmission leads to highly similar microbiomes among nest mates (Busck et al. 2020; Rose et al. 2023). Such close interactions also create the ideal conditions for the transmission of pathogens, and indeed it is thought both bacterial and fungal infections are a key source of disease and mortality (Henschel 1998; McEwen et al. 2020; Busck et al. 2022).

As part of a larger study, we located five nests on farmland in northern Namibia (a subset of the nests used in Busck et al. 2022). After locating the first of these nests in April 2017, we returned approximately every three months to locate new nests, record the survivorship of existing nests, and sample three individuals from each nest continuously until the nest “died”. Individuals were extracted by vibrating the capture web or gently squeezing the nest until spiders emerged which were then placed individually in microcentrifuge tubes with ATL buffer (Qiagen, Hilden, Germany) and transferred to a portable freezer. Here we used the three spiders from the last time point a nest was sampled before it “died” (when it was no longer observed as being alive or was observed to be devoid of live spiders) and compared their genome-wide DNA methylation profiles to three spiders from a time point 6–12 months prior to that (hereafter “alive”; see Fig. 1 and Table S1). Once a nest is declining, it shows clear signs of deterioration with less fresh capture silk and less spider activity, and individuals appear in an unhealthy condition and usually die (Trine Bilde and Tharina Bird pers. obs.; Henschel 1998; Crouch and Lubin 2001). Indeed, dead spiders were observed in the dying/or dead nests in this study (Tharina Bird, pers. obs.). Although individuals could in principle leave a dying nest, it is only adult inseminated females that can propagate the lineage and they leave immediately post-mating (Lubin and Bilde 2007; Bilde et al. 2007). Potential movement of remaining spiders from an infected nest at other life stages is however highly limited as it has no propagating function (Lubin et al. 2009; Smith et al. 2009). Importantly, all individuals in the nests were likely infected by disease at the last sampling (Busck et al. 2022). The spiders are synchronous in development, and attempt were made to best possibly match the sizes the sampled spiders (average size in the alive group was 3.4 mm, in the dying group it was 4.1 mm). Given nest extinctions are associated with a large increase in bacterial load both in the last observation before nest death was established (Busck et al. 2022), by comparing infected spiders with those 6–12 months prior of the same nest we aimed to conduct a paired analysis of infected compared to non-infected nests. A paired design is preferable to comparing a group of infected nests and a group of healthy nests as among-colony variation in methylation profiles is large in eusocial hymenoptera (Libbrecht et al. 2016; Marshall et al. 2019; Cardoso-Júnior et al. 2021) and a similar pattern in social spiders would limit our ability to detect a difference between the infected and non-infected groups.

Fig. 1: Time points our samples took place, with a smoothed line in red showing the mean temperature (and 95% confidence intervals in grey) during that time to give an idea of season.
Fig. 1: Time points our samples took place, with a smoothed line in red showing the mean temperature (and 95% confidence intervals in grey) during that time to give an idea of season.
Full size image

The earlier time point for each nest is the alive time point, while the latter is the dying time point. Positions of the nests on the y-axis are just for illustration.

DNA extraction and sequencing

We extracted DNA from the entire spider using a DNeasy Blood and Tissue kit from Qiagen (Hilden, Germany). We pooled the DNA from the three spiders from each nest at each time point to reduce the impact of individual variation and to assess nest-specific responses. DNA contributions from each spider were equalised by altering the concentrations of each extraction before pooling, see Table S2 for concentrations and scaling factors. We then subjected each of these ten samples to bisulfite treatment. Bisulfite treatment converts unmethylated cytosines to uracils, while methylated cytosines are unconverted (Cokus et al. 2008). Subsequent sequencing and mapping to a reference genome (Ma et al. 2024) then allows one to determine the location of each methylated cytosine. We used DNBSEQ-400 for 100 bp paired-end sequencing (BGI, Hong Kong). To measure the bisulfite conversion error rate we used λDNA, which indicated that >99% of unmethylated cytosines were successfully converted. After sequencing adaptor sequences, contamination, and low-quality reads were removed from the raw data.

DNA methylation quantification

We identified methylated and unmethylated cytosines using Bismark v 0.23.1 (Krueger and Andrews 2011). First, we indexed the reference genome via bowtie2 with “bismark_genome_preparation”, using the default parameters. Following this, we used the function “bismark” to map the bisulfite converted sequencing reads for a given sample, and the alignment was used to call the methylation status of all cytosines across the genome (default parameters). A small number of alignments can be duplicated, so we removed these using “deduplicate_bismark”. Following this, we extracted the coverage and methylation status for each cytosine base covered by at least one read using “bismark_methylation_extractor”, indicating paired ends (-p), including only a single read from overlapping sections (--no_overlap), and including cytosines in all contexts (--comprehensive). We did this as, while CpG DNA methylation is the most common, both generally and in the S. dumicola genome (Liu et al. 2019; note also that the genome has a GC content of 33.3%), important patterns can appear in CHG and CHH contexts; (Dubin et al. 2015; Hämälä et al. 2022). We then created M-bias plots to determine if there were biases in the methylation calls in our reads (Hansen et al. 2012). We observed a bias towards low methylation percentages in the first two bases of the 3’ end, which is often found and results from the sequence of the adapter used. We also observed high variability in the first five bases of the 5’ prime end (Figs. S110). As such, we repeated the bismark_methylation_extractor call with --ignore 5 and --ignore_r2 2 to remove these areas of bias. We additionally generated a “bedgraph” format output file containing the position of each cytosine, the coverage, the number of methylated cytosines, the number of unmethylated cytosines, and the percentage of reads that were methylated, for cytosines in each of the CpG, CHG, and CHH contexts. We excluded cytosines from this output file if they had a coverage of less than five reads, as their methylation status would be more uncertain, and those with more than 29 reads, which likely indicated some sort of PCR bias (99.9% of bases had fewer than 30 reads). These steps resulted in thirty output files, three for each of the ten samples.

DNA methylation analysis

We first determined if the overall percentage of methylated cytosines across the entire genome changed between the alive and dying time points. To do this we followed Liu et al. (2019) in defining each cytosine in our output files as either methylated or not using a binomial test. For each cytosine, the number of methylated reads was entered as the number successes and the coverage as the number of trials, and we tested whether the observed proportion methylated was greater than 0.01 (the error rate estimated with the λDNA, see above). We corrected all p values using the Benjamini-Hochberg procedure for multiple tests, and defined bases with a p value lower than 0.05 as methylated, and all others as not. For each sample we calculated the genome-wide mean methylation proportion and tested whether there was a clear difference between the alive and dying time points using a Wilcoxon signed rank test. We predicted that overall methylation would increase if methylation was integral to fighting the infection as there would be increased methylation to increase gene expression of relevant pathways. We also calculated the mean methylation proportion per chromosome, and the mean methylation proportion per 1000 bp region (S. dumicola’s GC content is 33.3%, and average exon and intron lengths are 381 and 5453 respectively; Liu et al. 2019 which means on average there are 27 CpGs, 22 CHGs, and 115 CHHs per 1000 bp), and used Wilcox-tests to determine if counts in these regions were different between the alive and dying time points and F tests to determine if the variances among these regions were different between the alive and dying time points. We predicted that both the mean and the variance would be greater in the dying group than the alive group, as differentially methylating immune genes would lead to overall-higher but also a more heterogeneous patterns of methylation. Next, we examined the methylation response at the base and gene level using the R package “methylKit” v 1.20.0 (Akalin et al. 2012). For this we returned to the original bedgraph output files. First, we filtered out bases with fewer than 5 or more than 30 reads, but otherwise we retained information on number of reads and percentage that were methylated, rather than assigning a cytosine the status of methylated or not. We also only used bases that were read in at least three samples i.e., their methylation state was observed for at least two different nests.

Base-level analyses

We performed an F-test with the McCullagh and Nelder (1989) correction for overdispersion to test for bases that were consistently differentially methylated (either hypo or hypermethylated) between the alive and dying time points, treating each nest as a biological replicate rather than pooling them, including nest identity as a categorical effect, and calculated the mean methylation difference using read coverage as weights. We identified bases that were clearly differentially methylated (DMBs) as those with a change in methylation percentage of at least five percentage points, and with a p value, after a Benjamini-Hochberg correction for false discovery rate, of ≤0.05. In the CpG context this corrected p value corresponds to an uncorrected p value of 1.3086 × 10−7, only marginally higher than the commonly-used cut off of 5 × 10−8 (recently reviewed by Chen et al. 2021; note that the S. dumicola genome is of similar size to the human genome; Risch and Merikangas 1996). We excluded bases on scaffolds 6 and 16 as these are not genuine chromosomes. We then associated the DMBs with an annotated genome using the R packages “plyranges” (Lee et al. 2019) and “Granges” (Lawrence et al. 2013). This allowed us to determine the genome features DMBs tended to be in e.g., regions of coding or repetitive DNA.

Gene-level analyses

To test which genes were differentially methylated, we used the original bedgraph output files and summarised the number of methylated and unmethylated cytosines by gene (as defined by the genome annotation file) using the “regionCounts” function in methylKit. We then filtered to remove all genes with more than 100,000 cytosines as these were unusually high (between 95 and 99th percentile and above) and might represent a PCR bias. We then removed all genes that did not feature in at least three samples, as we did for the base-level analysis. We then performed an F-test with the McCullagh and Nelder correction for overdispersion to test for genes that were differentially methylated across samples. This analysis takes into account the total methylated and unmethylated cytosines in each gene (similar to a weighted methylation level; Schultz et al. 2012) when comparing the alive and dying time points. We corrected each p value for false discovery rate and reported all those genes with a corrected p value of less than 0.05. We performed this for all colonies in the CpG context, but due to the lower rates of methylation we could not do this for the CHH context. In the CHG context, we had to exclude the “alive” sample for nest T54 and the “dying” sample for nest T55 due to no overlap between read cytosines and genes in the annotation file, and so the analysis took place on eight samples, four in each condition.

Finally, to determine if genes with a suggested immune function were differentially methylated between the alive and dying time points, we compiled a list of candidates based on immune genes identified as being present in the congeneric social spider S. mimosarum by Bechsgaard et al. (2016) and in the fellow Araneomorphid Parasteatoda tepidariorum by both Bechsgaard et al. and Palmer and Jiggins (2015; their Table S5). The FlyBase IDs for these genes (46 in total) are listed in Table S3. We used the program BLAST and the command “tblastx” to identify which of these genes were present in our S. dumicola genome. We then used the methylation difference % per gene calculated for the gene-level analysis for these immune genes and tested whether these gene-level scores were different from zero using a two-tailed t-test.

Results

We obtained on average 249,287,506 alignments per sample, of which on average 2.244% (5,591,062 per alignment) were duplicates and so removed. On average across all ten samples (five nests, both alive and dying) each sample contained 6,851,906,773 cytosines; 1,124,453,155 in the CpG context, 1,244,000,324 in the CHG context, and 4,145,816,481 in the CHH context (some cytosines could not be assigned a context). Mean coverage ranged from 8.808 to 9.975 (Table S1). The mean percentage of methylated cytosines in each was 10.22%, 0.72%, and 0.99% for the CpG, CHG, and CHH contexts respectively (114,911,915, 8,990,689, and 34,680,101 methylated cytosines in the CpG, CHG, and CHH contexts respectively).

CpG

Three colonies showed an increase in genome wide methylation rate, while two showed essentially no change (Fig. 2a) meaning there was no clear change overall (paired Wilcoxon signed-rank test, V = 3, p = 0.313). Chromosomes showed consistent rates of methylation, with increases across all nests when the nest was dying compared to when alive (Fig. S11; paired Wilcoxon signed-rank test, V = 240, p < 0.001). There was no difference in the variance of methylation rates at the chromosome level between the alive and dying samples (variance alive = 0.0001, variance dying = 0.0001, F-test, F = 0.996, df = 69, p = 0.988). There was a small increase in mean methylation rates from alive to dying at the level of 1000 base pairs (Wilcoxon signed-rank test, V = 1.058 × 1014, p = 0.001) and a small decrease in the variance in methylation rates (variance alive = 0.1521, variance dying = 0.1517, F-test, F = 1.002, df = 14,545,555, p < 0.001) but this is a very small difference made clear by the very large sample size. Note the much greater variance in methylation rates at the 1000 base pair level is because many sets of 1000 base pairs have no methylation at all.

Fig. 2: Change in genome-wide methylation percentage of cytosines in each context for nests between being alive and when dying.
Fig. 2: Change in genome-wide methylation percentage of cytosines in each context for nests between being alive and when dying.
Full size image

For each nest (T52-56, depicted with different colours), we show the percentage of the whole genome methylated in each of the three cytosine contexts (CpG, CHG, CHH). In each panel, we give the nests' statuses as either Alive (A), the first time point they were measured at, or Dying (D), the second time point. We link the two statuses for the same nest within one context with a solid line.

We identified 19 DMBs (differentially methylated bases) across all nests in the CpG context, eight hypermethylated and 11 hypomethylated (Fig. 3a, b). Of the hypermethylated DMBs, seven were in regions of repetitive DNA, with two LTR retrotransposons (Gypsy, BEL), three LINE retrotransposons (all I-Jockey), one DNA transposons TcMar and two unclassified repeats. The remaining hypermethylated DMB was in a gene intron. Of the hypomethylated DMBs, six were in unclassified repeats in regions of repetitive DNA. The remaining hypomethylated DMBs were in gene introns.

Fig. 3: Results of the differential methylation analysis by base for each context.
Fig. 3: Results of the differential methylation analysis by base for each context.
Full size image

Plot a, b show the CpG context, c, d the CHH context and e, f the CHH context. The left column (a, c, e) show -log10 of p values for the statistical test, while the right column (b, d, f) shows the percentage difference in DNA methylation. The red line in a. indicates where the p value, after a correction for the false discovery rate, was < 0.05 and is our threshold for a clear difference in methylation. Note no bases passed the threshold for statistical significance in the CHG and CHH contexts The use of blue and orange highlights each chromosome.

Our analysis of weighted methylation levels per gene revealed a single gene in the that was differentially methylated between alive and dying the in CpG context. This gene had a weighted methylation increase of 3.690 (q = 0.016, p (fdr) = 0.017), and so was hypermethylated in the dying colonies. Using the NCBI “blastp” tool at https://blast.ncbi.nlm.nih.gov/Blast.cgi we searched the gene’s sequence and found it was 99.59% identical to a heparan-sulfate 6-O-sulfotransferase 2 detected from our study species’ congener S. mimosarum (accession number: KFM63315; no other matches were above 88% identical).

The sequences of the 46 putative immune genes we selected were detected 8893 times in the genome. 7417 of these copies appeared in at least three samples for which we could evaluate the methylation change in the CpG context, with a mean methylation difference of 0.259% (min = −8.284, max = 7.925) from alive colonies to dying colonies. The mean is very close to zero, but significantly different due to the large sample size (t7560 = 22.709, p < 0.001, 95% CIs = 0.237 to 0.282).

CHG

All colonies showed an increase in genome wide methylation rate when dying (Fig. 2b) although this was not clearly different from zero, presumably due to the small sample size (Wilcoxon signed-rank test, V = 0, p = 0.063). All chromosomes showed increases from alive to dying (Fig. S12; paired Wilcoxon signed rank test, V = 444, p < 0.001). The variance of methylation rates at the chromosome level was higher in the dying compared to the alive samples (variance alive = 1.511 × 10−10, variance dying = 3.618 × 10−10, F-test, F = 0.417, df = 69, p < 0.001). Both the mean and the variance at the level of 1000 base pairs was also higher in the dying compared to alive colonies (Wilcoxon signed rank test, W = 1.066 × 1014, p < 0.001; variance alive = 7.342 × 10−6, variance dying = 9.750 × 10−5, F-test, F = 0.753, df = 14,592,315, p < 0.001).

No cytosines were differentially methylated after correcting for multiple testing in the CHG context (Fig. 3c). There was however a clear spike in the p values (Fig. 3c) and % differences in methylation (Fig. 3d) at chromosome 13, approximately between bases 704,000 and 821,000. Bases at chromosome 13 were often hypermethylated when dying; the mean methylation percentage difference was +20.872%, compared to +0.125% across the whole genome (see also the increase for chromosome 13 in Fig. S12).

There were no genes that were differentially methylated in the CHG context. For the CHG context there were 7167 copies of immune genes with differential methylation data in at least three samples, with a mean methylation difference of 0.019% (min = −1.645, max = 1.739). Again, the mean is near zero but significantly different due to the large number of genes (t7302 = 6.498, p < 0.001, 95% CIs = 0.013 to 0.025).

CHH

Three colonies showed an increase in genome wide methylation rate, while two showed a decrease (Fig. 2c). Overall, the change was not different from zero (Wilcoxon signed-rank test, V = 6, p = 0.813). Chromosomes showed no clear change in median values from alive to dying (Wilcox-test, V = 1053, p = 0.269; Fig. S13). Variance of methylation rates at the chromosome level was similar between alive and dying colonies (variance alive = 3.092 × 10−10, variance dying = 3.673 × 10−10, F-test, F = 0.842, df = 69, p = 0.476). Groups of 1000 bases showed no clear change in median values from alive to dying (Wilcox-test, V = 1.073 × 1014, p = 0.477). Variance at the level of 1000 base pairs was also similar between alive and dying colonies (variance alive = 2.259 × 10−6, variance dying = 2.032 × 10−6, F-test, F = 1.112, df = 14,644,457, p < 0.001; note the p value is very small due to the large sample size rather than a large effect size).

No cytosines were differentially methylated after correcting for multiple testing in the CHH context (Fig. 3e). There was however a clear spike in the % differences in methylation at the start of chromosome 13, in the same region as for the CHG context (Fig. 3f), but there was no equivalent spike in p values (Fig. 3e). Cytosines on chromosome 13 were not consistently hypo- or hypermethylated; the mean methylation difference was −0.104% compared to +0.054% overall (which does not mark it out among the other chromosomes; see Fig. S13).

No gene-level analysis was possible for the CHH context (including for putative immune genes) as we could not calculate weighted methylation levels in this context for each gene, possibly due to the lack of overlap between cytosines methylated in the CHH context and cytosines appearing in gene bodies.

Discussion

When comparing the genomes of social spiders dying from infection with the genomes of spiders from the same nests while healthy, we saw some increases in the mean and variance of genome- and chromosome-wide methylation levels, but these were only significant in the CHG context. At the per-base level, we saw few differentially methylated-bases in the CpG context, which were mostly associated with regions of repetitive DNA (although this was not an overrepresentation as more than half the genome consists of repeats), and none in the CHG and CHH contexts. There was however a spike of methylation changes in the CHG context in a particular region of chromosome 13. One gene was differentially methylated in the CpG context, but none were in the CHG context and we could not test this in the CHH context. Finally, genes with a known immune function in spiders had cytosines with mean methylation levels close to zero, suggesting this epigenetic modification is not key for changes in gene expression underpinning phenotypic immune responses.

Mean methylation levels in healthy colonies were around 12%, 0.009%, and 0.010% in the CpG, CHG, and CHH contexts respectively, and typically these each increased small amounts when the colonies were dying of infection. However, there was considerable among-nest variation in both means and changes, and so in no context were these differences statistically clear. We had predicted an increase in methylation levels, as we expected genes associated with an immune response to be upregulated and, in this species, methylation in the gene body is associated with higher expression (Liu et al. 2019). At the level of chromosomes and 1000 bases the increases in some of the contexts were clearer, suggesting the lack of clear increase at the nest level may have been due to the low number of colonies (five) rather than by a lack of effect. Similar results have been found in mosquitos Aedes aegypti, where infection with Wolbachia was associated with relatively few consistent changes in DNA methylation across the genome (Ye et al. 2013). In contrast, Abudukadier et al. (2021) found that Wolbachia infection in the spider Hylyphantes graminicola lead to genome-wide reductions in DNA methylation (due to reduced expression of the DNMT1 enzyme, see also Negri et al. 2009). Therefore, whether DNA methylation plays a key role in arthropod plastic immune response remains uncertain. Changes in methylation in response to stress can be increases or decreases depending on whether a gene is highly or lowly methylated (Dixon et al. 2018) and so we may need to investigate more subtle changes than general up or down methylation of genes or bases to determine DNA methylation’s function role.

Research into the role of DNA methylation in phenotypic plasticity has typically focused on methylation in the CpG context, as it is more common than the other contexts. In mammals and plants methylation in the CpG context is clearly associated with changes in gene expression (He et al. 2011; Elhamamsy 2016), but in invertebrates the association between DNA methylation and gene expression is much more variable (Richard et al. 2021; Duncan et al. 2022). Although not statistically significant after correcting for false discovery rate, patterns of differential methylation in the CHG context (and to a lesser extent in the CHH context) were much more localised than in the CpG context, suggesting this context may have a functional role in S. dumicola. Intriguingly, recent work in plants has suggested that differential methylation in non-CpG contexts may be associated with environmental variation and response to stress (Li et al. 2020; López et al. 2022; Antro et al. 2022). For example, woodland strawberry (Fragaria vesca) show global decrease of 1.8% in CHG methylation in response to salt stress and an increase of 3.1% when challenged with simulated hormone stress, while differential methylation was more common in the CHH context than either of the CpG or CHG contexts (López et al. 2022). While known to play important roles in plants (Kenchanmane Raju et al. 2019), the role of non-CpG context methylation in animals is not yet clear. Non-CpG methylation may play a role in the neural systems of birds and mammals (De Mendoza et al. 2021; Klughammer et al. 2023). More relevantly, non-CpG methylation may be important in insect development, for instance Royle et al. (2024) found increased CHG and CHG methylation for genes in various signalling pathways in the moth Helicoverpa armigera in adults compared to pupae, while Araujo and Arias (2021) found non-CpG methylation was key for changes in behaviours between nurse and foraging bees. This importance in development is perhaps down to the role of DNA methylation in controlling alternative splicing, as suggested by work in honey bees Apis mellifera (Cingolani et al. 2013) and ants Camponotus floridanus and Harpegnathos saltator (Bonasio et al. 2012). While these results are intriguing they have not yet confirmed a clear role for CHG and CHH methylation in phenotypic expression, and so along with our results highlight the need for more work to be done on these contexts.

We found mean methylation percentage changes of cytosines in putative immune genes to be around zero, in contrast to our predictions that changes in methylation would be targeted at these genes to alter their expression as part of the immune response. This supports our findings of limited base-level differential methylation and overall suggests limited role of DNA methylation in controlling any plastic responses specifically to infection. In our gene-level analysis we identified one gene that was differentially methylated in the CpG context. Given the number of tests making conclusions about this gene would be unwise. Some studies on invertebrates have found that particular genes are differentially methylated in response to infection, such as genes associated with membrane transport in A. aegypti (Ye et al. 2013) and genes associated with the spliceosome, RNA transport, and protein processing in B. mori (Huang et al. 2019; see also: Kausar et al. 2022). However, given that methylation is not consistently associated with gene expression in insects (Richard et al. 2021; Duncan et al. 2022), these might be the exceptions rather than the rule.

Although across most of the genome we saw limited changes due to infection, there was a region on chromosome 13 that showed patterns of hypermethylation when infected in both the CHG and CHH contexts (although due to the number of bases tested none of these passed the threshold for statistical significance after correcting for false discovery rate). This was near the start of the chromosome, from approximately bases 704,000 to 821,000. Further analysis showed hypermethylation in this region was similar across genomic features (mean increases of 24.5% in introns and 20.5% in exons) which suggests a non-targeted increase rather directed methylation in order to alter gene expression. We use BLAST to search the NCBI database with the sequences of the two sequences showing the most clear (lowest p value) change in methylation (p < 3.00 × 10−5, compared to > 1.43 × 10−2 for all other genes; accession numbers in Table S4). The best match for one sequence was an uncharacterised protein also found in the bark scorpion (Centruroides sculpturatus), while the best match for the other was for a fructose aldolase from the bacterium Mycoplasma anserisalpingitidis. These hits do not suggest the region of hypermethylation in response to infection we have identified here plays much of a role in the immune system. Given there was also a spike in CHH methylation, an increase in untargeted methylation may have occurred at this region, although why that would be associated with the transition from healthy to infected state is unclear.

In conclusion, we found limited role for specific patterns of DNA methylation in the response to an immune challenge in social spiders S. dumicola. Instead, we saw some small genome-wide increases in the mean and variability of each type of methylation. These results suggest that there may be a genome-wide response in DNA methylation to infection, although whether this is adaptive plasticity or a neutral or maladaptive reaction to being infected is not clear. Further work on the prevalence and function of methylation in non-CpG contexts is required to better understand the intriguing patterns of differential methylation in the CHG context at a highly localised site in chromosome 13 we detected.