Trehalose mediates salinity-stress tolerance in natural populations of a freshwater crustacean

Salinization poses an increasing problem worldwide, threatening freshwater organisms and raising questions about their ability to adapt. We explored the mechanisms enabling a planktonic crustacean to tolerate elevated salinity. By gradually raising water salinity in clonal cultures from 185 Daphnia magna populations, we showed that salt tolerance strongly correlates with native habitat salinity, indicating local adaptation. A genome-wide association study (GWAS) further revealed a major effect of the Alpha,alpha-trehalose-phos-phate synthase ( TPS ) gene, suggesting that trehalose production facilitates salinity tolerance. Salinity-tolerant animals showed a positive correlation between water salinity and trehalose concentrations

In brief Santos et al. show that tolerance to elevated salinity in D. magna is mediated by trehalose.Genomic analysis and CRISPR-Cas9 technique provide evidence for the crucial role of the TPS gene in trehalose production and local adaptation.These findings reveal how this species uses a mechanism known in certain bacteria, plants, and other invertebrates.

INTRODUCTION
Salinization is an emerging threat to freshwater ecosystems, causing substantial economic losses in agriculture and aquaculture 1 and reducing biodiversity in natural habitats. 2Since most organisms can tolerate only limited salinity ranges, 3 they are forced to adjust to local conditions by developing behavioral, physiological, or structural adaptations, 4 or by migrating, when possible, to other habitats with suitable ecological conditions. 5Failure to adapt may result in local extinction.On the other hand, adaptation to the local environment can lead to genetic differentiation among populations for the genes under selection. 68][9] Several molecular mechanisms of osmoregulation have been described in invertebrates.These involve transcriptional and post-transcriptional factors, such as small RNAs, 10,11 and translational and post-translational regulators that induce protein ubiquitination. 12The expression of genes that convey salt tolerance can trigger physiological, biochemical, and molecular responses, resulting in phenotypic changes that manage salt uptake and transport, 13,14 regulate signaling molecules, 12 and modulate processes like programmed cell death. 126][17] Since salt-induced stress is energetically demanding, carbohydrate and lipid metabolism may also be activated. 17,18aphnia magna, a keystone species in standing freshwater bodies, is a crustacean with an widespread distribution across the Holarctic. 19A powerful aspect of the Daphnia system is that animals can be bred both sexually and asexually (clonally), enabling researchers to separate genetic and non-genetic effects in common garden experiments.Thus, it has become a crucial model system for understanding genetics in an environmental context, 20,21 as important ecological traits, such as resistance to environmental stressors, [22][23][24] can be linked to genomic regions.In this study, we used genotypes from populations living in habitats with a wide range of environmental salinities to determine whether salinity tolerance is a locally adapted trait in D. magna.We also sought to identify the genetic basis of salinity tolerance using a genome-wide association study (GWAS).As the Alpha,alpha-trehalose-phosphate synthase (TPS) gene, which is involved in trehalose synthesis, showed a strong association with salinity tolerance, we developed experiments to detect this sugar in individuals maintained at elevated salinity, ultimately confirming that trehalose concentration is positively correlated with salinity tolerance.From an evolutionary perspective, population genomic statistics were conducted to determine the direction of selection within the TPS gene region.Additionally, two TPS mutant lines of a salinity-tolerant genotype developed using CRISPR-Cas9 were no longer able to produce trehalose at elevated salinity and had reduced salinity tolerance, supporting the finding that the TPS gene is crucial for trehalose production and salinity tolerance in D. magna.Further experiments evaluating the metabolic rates of all animals allowed us to exclude the possibility that the stress induced by genetic manipulation was responsible for the observed differences between the TPS mutant and control genotypes.Our findings highlight the contribution of trehalose to salt stress tolerance in natural populations of an aquatic invertebrate and reveal how local selection has shaped this trait across the large geographic range of this keystone crustacean.

Salinity tolerance varies in relation to habitat salinity
To measure salinity tolerance-the ability to reproduce and survive in water with elevated salt concentrations-in D. magna, clonal lines from 185 populations were exposed to a gradual increase in salinity (measured as water conductivity [mS/cm]).To investigate whether salinity tolerance is a locally adapted trait, the maximal tolerated salinity for survival and reproduction was then correlated with conductivity data available for the site of origin for 90 of the 185 genotypes.

Figure 1. Local adaptation of salinity tolerance
The maximal recorded salinity tolerance for survival (A) and reproduction (B) in D. magna genotypes is indicated by a correlation between tolerance and water salinity at the sampling site.The high density of samples around 0.5 mS/cm on the x axis occurs because habitats reported as ''freshwater'' are assumed to have approximately this level of salinity.The red line is a linear regression with its 95% confidence interval indicated in gray shading.See also Figure S1 and Table S1.
A positive correlation was found between the maximal water salinity recorded at the genotype's site of origin and maximal tolerated salinity for survival and reproduction, supporting the hypothesis that genotypes from saltier habitats possess higher salinity tolerance (Figure 1 Genome-wide association study identifies a candidate gene for salinity tolerance Given the significant variation in salinity tolerance observed in D. magna, a GWAS was conducted to uncover the genetic basis of salinity tolerance.The maximal tolerated salinity for survival was used as a dependent variable.Whole genome-sequencing data from 178 D. magna genotypes were analyzed (Table S1).The total genomic dataset varied at 22,921,419 sites (32.1% multiallelic and 67.9% biallelic SNPs (Single Nucleotide Polymorphisms), but after filtering, only 2,934,446 SNPs were used for analysis.A strong association was found between salinity tolerance and a single genomic region located on chromosome 7, contig 000003F (Figures 2 and S2; Table S2).We identified 27 SNPs within a window of 3,676 base pairs above the genome-wide Bonferroni corrected significance p value threshold of 3.4 3 10 À9 (Figure 2; Table S2).
Using GenBank 25 and the annotated reference genome of D. magna (BioProject: PRJNA624896), we identified three genes in this peak region: the TPS gene, the guanine exchange factor Vav3 (Vav3 GEF), and an uncharacterized gene (GenBank accession numbers, GenBank: XM_032933135.1,XM_032933134.1,and XM_032933154.1,respectively) (Table S2).The two genes with known functions were also identified by blasting against the EnsemblMetazoa database 26 (EnsemblMetazoa: APZ42_022324 for TPS and EnsemblMetazoa: APZ42_022330 for Vav3 GEF).The TPS gene was depicted in 70.4% of the outliers SNPs (Table S2).Due to the TPS gene involvement in the synthesis of trehalose, a molecule known to play a role in salt tolerance, 27 we considered it as our prime candidate.
The TPS gene is under purifying selection Population genetic statistics were performed to estimate the direction of selection associated with the TPS gene.The ratio between nucleotide diversity at the non-synonymous and synonymous sites in the TPS gene was 0.093 across all 178 D. magna.This value falls outside of and below the 99% confidence interval (CI) of the estimates using the set of the rapidly involving genes involved in immunity (t = 18.97,Df = 315, mean = 0.31, CI = 0.27-0.36).It also falls below the CI for the set of arthropods Benchmarking Universal Single-Copy Orthologs (BUSCO) genes (t = 26.26,Df = 831, mean = 0.14, CI = 0.13-0.15),which are known for being conserved among species and under purifying selection.

Trehalose correlates positively with salinity levels and tolerance
The GWAS showed a strong association between salinity tolerance and the TPS gene, suggesting that D. magna may produce trehalose in relation to salinity stress.To test whether trehalose content varies among salinity-tolerant and intolerant genotypes and correlates with water salinity, we exposed ten D. magna genotypes from the previous experiment-five with low estimates of maximal tolerated salinity for survival (10-12 mS/cm) and five with high estimates (around 18 mS/cm, see Table S1)-to increased salinity.Survival, trehalose, and protein concentrations were measured.In addition, trehalose production in relation to salt stress and differences among tolerant and intolerant D. magna genotypes were quantified (Figure 3; Table S1; Figures S3 and S4).
Survival differed widely among the genotypes representing the high and low salinity tolerance groups (Figure 3A).Intolerant genotypes died at salinity levels of 10-14 mS/cm, while the tolerant genotypes survived until 18 mS/cm.Salinity intolerant genotypes had no or insignificant (not different from blank samples) amounts of trehalose in their bodies in all treatments (mean of 0.04 ± 0.04 mg/mL), while salinity-tolerant genotypes contained significant amounts of trehalose starting at 10 mS/cm salinity levels and increasing further (Figure 3B; exponential regression model: overall F-statistics = 7.33, p value = 3.8 3 10 À5 , adjusted R 2 = 0.54).Salinity-tolerant and intolerant genotypes differed significantly in trehalose content at 10 and 12 mS/cm (see

TPS mutations prevent trehalose production and reduce salinity tolerance
To confirm the TPS gene's role in trehalose content and salinity tolerance variation in D. magna adults, two CRISPR-Cas9 TPS mutant genotypes (A and B) were produced (see Tables S4-S6; Figure S5) using a D. magna genotype (National Institute of Environmental Studies [NIES], Tsukuba, Japan) that had been identified as tolerant to elevated salinity, with a maximal tolerated salinity of about 15.5-16 mS/cm for survival.As salinity was increased, survival, trehalose, and protein concentrations were measured in the TPS mutant and control (i.e., wild type for the TPS gene) genotypes.The two control genotypes used in this experiment were from identical genetic lines, but control 1 was the genotype used to derive the TPS mutant genotypes and has been kept in the laboratory of NIES, Japan, while control 2 has been kept separately for about six years at the University of Basel, Switzerland.
The control and TPS mutant genotypes differed in all variables analyzed (Figure 4).The survival of TPS mutant genotypes began decreasing at a salinity of 10 mS/cm, and all replicates died at higher salinities (Figure 4A).By contrast, the maximal tolerated salinity for the control genotypes was 16 mS/cm (Figure 4A).Animals from the control genotypes contained significant amounts of trehalose starting at 10 mS/cm, which increased further with salinity (Figure 4B; exponential regression model: overall Trehalose concentration in TPS mutant genotypes was undetectable and did not differ from the blank samples (Figure 4B).Control genotypes showed higher trehalose content (and in detectable amounts) than TPS mutant genotypes at 10 mS/cm (Figure 4B; W = 14, p value = 6.5 3 10 15 ).Protein also varied among salinity treatments, as seen in the previous experiment (Figure 4C; exponential regression model: overall F-statistics = 38.15,p value = 4.3 3 10 À7 , Adjusted R 2 = 0.95; treatment effect: Df = 6, F-statistics = 56.92,p value = 1.2 3 10 À7 ), with higher protein concentrations observed in the TPS mutant genotypes only in their maximal tolerated salinity treatment (Figure 4C; tolerance group effect: Df = 1, F-statistics = 7.55, p value = 0.02; interaction tolerance group vs. treatment: Df = 3, F-statistics = 4.94, p value = 0.02).

No link between TPS mutations and metabolic rate
To confirm that the variation in salinity tolerance among TPS mutant and control genotypes was not a result of stress caused by genetic manipulation, routine metabolic rate was estimated  S1. by measuring oxygen consumption rate for 20 adult females from each of the four genotypes (control and TPS mutant) at salinities 1.3 and 10 mS/cm.

DISCUSSION
Freshwater habitats worldwide are increasingly threatened by a rising influx of salt, changing the conditions for many freshwater species and entire aquatic communities.Here, we investigate how a widespread freshwater planktonic organism copes with elevated water salinities.Our findings reveal significant genetic variation for salinity tolerance and clear evidence of local adaptation in genotypes collected from natural D. magna populations, a model species widely used in ecology and evolution. 19A key player in adaptation to salinity stress is the TPS gene, which is responsible for the penultimate step in the production of trehalose, 27,28 a sugar known to contribute to osmoregulation. 4Using natural populations, this study reinforces the role of trehalose in salinity tolerance for an animal species.
By using D. magna genotypes across a large part of its Holarctic range, our study revealed a clear correlation between salinity tolerance and water salinity in the habitat of origin, strongly suggesting that populations are adapted to water salinity in their local environment.][31][32] This species' strongly subdivided population structure, typical for many pond-and lake-dwellers, may facilitate local adaptation. 19Our data show that maximal salinity tolerance for D. magna had a very strong genetic component, with more than 84% of total variation explained by genotype.This highlights D. magna's strong potential to adapt to changing environmental salinity.Local adaptation to environmental salinity is similarly seen in other aquatic organisms, including plants, 33 copepods, 34 molluscs, 35 crustaceans, 36 and fish, 37 although phenotypic plasticity also seems to be important. 36Indeed, salinity stress is among the oldest environmental stress factors on this planet.
Our GWAS identified a well-defined genomic region containing three genes, two with known biological functions.The highest number of associated SNPs fall within the TPS gene region, a gene involved in the production of trehalose.This natural sugar is known as a source of energy and especially for alleviating the adverse effects of environmental stresses such as desiccation, heat, cold, and elevated salinity. 16,38,39Trehalose stabilizes dry proteins and membranes by filling the spaces left by water loss. 40It has been linked to salinity stress in many species' groups.Although trehalose is a compatible solute, 27 its biosynthesis is energetically costly, 41 and its accumulation may lead to aberrations or interfere with reactive oxygen species signaling and reducing programmed cell damage. 42Thus, trehalose may only be synthesized when its benefits clearly outweigh its costs.In our experiments, trehalose was produced only at salinity levels of 10 mS/cm or higher, and its production increased exponentially with increased salinity, indicating that trehalose production is phenotypically plastic: it is produced on-demand and in response to an environmental cue.In nematodes, 43 crustaceans 12,17,44 and insects 45 similar observations were made, showing that trehalose production is related to salinity levels.In our study, plasticity in trehalose production was genotype dependent: some genotypes produced no trehalose and were thus unable to cope with elevated salinity.This suggests that animals from populations with consistently low salinity levels that never need trehalose may have lost their ability to produce it on demand.Phenotypic plastic expression of trehalose may have associated costs, 46 such as the machinery for its upkeep or the potential misinterpretation of environmental cues. 47The latter seems unlikely, however, as osmotic stress should be easy to assess with little error (unlike other cues, such as sensing and responding to potential predators).It is also possible that genetic drift may have removed the alleles responsible for salinity tolerance, although this idea implies multiple events after the recent expansion of D. magna populations. 48Alternatively, if the mechanism to produce trehalose is never used, the underlying genes may accumulate mutations that are neutral in the habitat where they arise but deleterious under conditions of elevated salinity.The estimated direction of selection for the TPS gene is consistent with negative purifying selection, as the ratio of nucleotide diversity at non-synonymous and synonymous sites is slightly below the one reported for the slow-evolving BUSCO genes. 49This hypothesis implies that salinity intolerance is a derived state and that ancestors were salinity tolerant.6][17] Daphnia magna may have preserved an osmoregulatory mechanism shared by other arthropods that transitioned from marine or brackish to freshwater organisms.
TPS is involved in the penultimate step of trehalose production, synthesizing trehalose-6-phosphate from UDP-glucose and glucose-6-P, which is later converted into trehalose by the trehalose-6-phosphate phosphatase (TPP). 27,28This pathway is unique in eukaryotes, whereas bacteria have distinct biosynthesis routes. 27Our findings confirm the role of trehalose in mediating the survival of salinity-tolerant genotypes under elevated salinities.By inhibiting the expression of the regular TPS gene, we showed that mutant genotypes could neither produce trehalose nor survive under elevated salinities.As oxygen consumption in both the TPS mutant genotypes and the control genotypes showed similar routine metabolic rates, differences in trehalose content and salinity tolerance between mutants and controls were mostly likely due to the absence of the functional TPS gene rather than non-specific energetic shifts.Such functional evidence for the role of trehalose synthesis genes under salt stress is so far missing in animals, and it has been previously described only in C. elegans. 43owever, some genomic studies have confirmed that both the TPS and TPP genes play a role in osmoregulation under salinity stress in other eukaryotes, highlighting the need to explore this functional mechanism. 50,51Additionally, other genes involved in trehalose production or transport have been associated with altered salinity in other aquatic animals. 8,52,53Our genomic analysis did not identify a role for other genes in the trehalose pathway to explain the observed variation in salinity tolerance, nor did we find evidence for the involvement of other genes unrelated to trehalose production.This seems surprising, as the quantitative variation in salinity tolerance observed here suggests that the TPS variation alone is not able to fully explain this variation.Other genes are likely to contribute, but small effect sizes, epistasis, and environmental variation may make it difficult to uncover them. 54nimals, including D. magna, also rely on trehalose to protect their resting stages against heat, freezing, and anhydrobiosis. 39,55Thus, since increased salinity often induces resting life stages production, it might be unclear whether trehalose-related genes are expressed to regulate body fluid osmolarity or to equip resting life stages with trehalose in preparation for diapause.Our study allowed us to uncouple these two causes and effects.Although D. magna genotypes produce resting eggs under salinity stress, the NIES genotype used in our genetic manipulation experiment never produced resting stages in our cultures or during the experiments at any salinity level.Thus, we believe that trehalose production in D. magna was linked to osmotic stress caused by salt in the water.
Osmoregulation in aquatic invertebrates involves the accumulation of free amino acids, 15,56,57 which requires a protein breakdown. 58Although our method was unable to detect unbound amino acids, it revealed a substantial increase in protein content near the maximal tolerated salinity in all D. magna genotypes.In intolerant genotypes, this occurs at lower salinity levels, suggesting that increased protein content may also be an adaptive response to environmental salinity.In fact, proteins involved in signaling, ions transport, and regulation have been reported as key in crustaceans osmoregulation. 59t has previously been reported in several species, 16 including Daphnia 60,61 that routine metabolic rate generally decreases under physiological stress as a defense mechanism to reduce oxidative stress 62 due to elevated salinity.However, we observed an increase in oxygen consumption under elevated salinity for all genotypes.Thus, it may be because the animals need to allocate more energy to ion pumping and other processes associated with osmoregulation, engaging a combination of costly physiological processes, such as the synthesis of trehalose and other metabolites to overcome salinity stress (see Cochran et al. 63 ).
The second gene with biological functions identified by our GWAS-the Vav3 GEF gene-is partially localized in the same genomic region as the TPS gene region and overlaps with it.Both coding regions are annotated in the D. magna genome with a distance of approximately 1,000 bp, and the 5 0 UTR region of Vav3 GEF overlaps with the coding region of the TPS gene.The Vav3 GEF gene is part of the Rho GTPases family, which contributes to signaling and cytoskeletal pathways 64 mainly by participating in and coordinating cellular responses to extracellular stimuli.It serves as a key regulator of both endothelial barrier and genomic stability 65 and has been associated with oxidative stress responses and the development of pathophysiological disorders, such as human cancer. 66Although it has been suggested that certain guanine exchange factors play a role in salinity stress, 67 to our knowledge, no published reports associate the specific Vav3 GEF gene with salinity tolerance.Therefore, we posit that the Vav3 GEF may have been identified in the GWAS study not necessarily because of its direct influence on salinity tolerance but rather because of its proximity to the TPS gene.
Our findings highlight the biological relevance of trehalose in enabling natural populations of the freshwater crustacean D. magna to withstand salinity stress, an old mechanism shared among bacteria, plants, and invertebrates.When the TPS gene was rendered non-functional, the D. magna genotypes were unable to produce trehalose and suffered drastically decreased salinity tolerance, emphasizing the importance of this sugar in their survival.By using populations from habitats with a wide range of salinity conditions, we were able to demonstrate that salinity tolerance in the Daphnia model is shaped by both local adaptation and phenotypic plasticity.Notably, only salinity-tolerant genotypes can produce trehalose, with its expression dependent on environmental salinity.Our study opens new avenues for research into how freshwater organisms adapt to elevated salinity levels, offering insights into broader potential and limitations of adaptive mechanisms in a changing world.This knowledge is not only essential for understanding ecosystem resilience but also has practical implications for the aquaculture industry and the conservation of freshwater habitats threatened by increasing salinity.We hope to inspire further investigations and help predict the fate of freshwater ecosystems facing growing salinity threats.lab/resources/list-of-drosophila-genespotentially-involved-in-the-immune-response/

Oligonucleotides
Sense oligonucleotide for sgRNA#1.5'-GAAATTAATACGACTCACTATA GCGATAAGTCTTTCCTGCGAGTTT TAGAGCTAGAAA-3' This study; see The DNA fasta alignment for every gene was extracted for each genotype and inferred haplotype using BCFtools consensus v1.9 94 and BEDtools getfasta v2.29.0. 95For haplotype inference the VCF file was phased using Beagle v5.3. 96The nucleotide diversity at the non-synonymous (pN) and synonymous sites (pS) per each gene of the tree gene sets (TPS = 1, Immune = 298, BUSCO = 797; Table S3) was estimated using the script selectionStats.py. 97ehalose and protein quantification experiment Ten D. magna genotypes were selected based on their salinity tolerance levels: specifically, five genotypes with low estimates of maximal tolerated salinity for survival (10 -12 mS/cm) and five with high (around 18 mS/cm, see Table S1).Six replicate populations per genotypes were subjected to salinity increases every two weeks using a protocol similar to that described above (see experimental design in Figure S3), except that every two weeks salinity was increased in steps of 2 mS/cm, and the number of replicate populations increased when the next higher salinity treatment was introduced, since all replicate populations were maintained until the end of the experiment.After sixteen weeks, all populations had experienced at least two weeks at each salinity level unless they had gone extinct or had failed to produce offspring.At this point eleven female in the late juvenile or early adult stage were collected from each surviving replicate population and placed into a 1.5-mL Eppendorf tube.Trehalose does not vary significantly over the time of the experiment (see Figure S4) Pilot experiments had demonstrated that eleven animals were sufficient for colorimetric quantification of both trehalose and protein.For each sample of eleven females, water was removed using a pipette, and the samples were dried at room temperature for approximately three hours until no drops ere visible in the tube.50 ml of ultra-purified water was then added and, the animals were homogenized with a small plastic pestle before being frozen for further processing within a month's time.

Trehalose quantification method
Trehalose was extracted and quantified using a Megazyme trehalose kit (Megazyme, Bray, Ireland), following the protocol described in Santos and Ebert. 55Specifically, samples were incubated at 95 C for 60 min and centrifuged for 15 min at 4 C at 13 200 r.p.m. (6 100 g) to extract the trehalose.Then, 20 ml of the supernatant was used according to the manufacturer's protocol to measure trehalose concentration.This method relies on the difference in NADPH + before and after trehalose degradation by trehalase.Falcon Microtest 96 microplates were used for absorbance reads in an Infinite M200 Tecan spectrophotometer at 340 nm.Each 96-well plate included eight blanks and two trehalose standards solution to calibrate and validate the reaction.After shaking 3 seconds, followed by 5 minutes pause, 16 measurements were taken per sample (4 3 4 matrix per well).Absorbance values were retrieved using the i-control Microplate Reader Software by Tecan before and after trehalase addition.Calculation of trehalose concentration followed the manufacturer's instructions.

Protein quantification method
Protein content was quantified using the PierceÔ Coomassie (Bradford) Protein Assay Kit (ThermoFisher Scientific, Switzerland), in accordance with the Bradford assay.

TPS gene mutations using CRISPR/Cas9
Using the D. magna genotype from the National Institute of Environmental Sciences (NIES, Tsukuba, Japan), 69 previously identified as tolerant to elevated salinity, with a maximal tolerated salinity at about 15.5 to 16 mS/cm, we generated TPS mutant genotypes by clustered, regularly interspaced, short palindromic repeats (CRISPR/Cas9) as described by Nakanishi et al. 105 Two independent single-guide RNA (sgRNA) target sites were designed to target the catalytic regions of the TPS gene (Figure S5A).These were constructed by synthesizing synthetic oligonucleotides containing a T7 promoter sequence, a gene-specific target sequence, and the first 20 nucleotides of the Cas9 binding scaffold (Table S2).The sgRNAs were then in vitro transcribed using the cloning-free method 68 and subjected to in vitro transcription using the MEGAScript T7 Transcription Kit (Invitrogen, Carlsbad, CA, USA).Each sgRNA (2 mM) and in-house-purified Cas9 protein (1 mM) were mixed, and incubated at 37 C for 5 minutes to allow ribonucleoprotein (RNP) complex to form.Alexa Fluor 568 hydrazide (Invitrogen) was added to the 5 mM final concentration as an injection marker.Microinjection into embryos was done following established procedures 106 : freshly ovulated eggs obtained from 2-or 3-weeksold D. magna were placed in ice-chilled M4 107 containing 80mM sucrose (M4-sucrose).Microinjection was performed on ice.Successfully injected eggs were transferred and cultured individually at 23 C in a 96-well plate containing 100 mL M4-sucrose for the appropriate time.
For genotyping, genomic DNA from second-generation individuals was isolated and PCR-amplified with PrimeSTAR GXL (TaKaRa, Shiga, Japan) using the primers describe in Table S4, and the presence of indels was confirmed using native PAGE gel electrophoresis.From there, the PCR products were cloned using Zero Blunt TOPO PCR Cloning Kit (Invitrogen) and sequenced.From fifteen successfully injected eggs, eight hatched; from those, seven developed into adults, and six produced offspring.Of those six G0 founder lines, five produced offspring with a mutation in sgRNA#2 target sites.Of these, two mutant candidates showing the clearest indel pattern were selected.The TPS A mutant genotype is a monoallelic mutant with a 2 bp frameshift deletion in the first allele and a 45 bp non-frameshift deletion in the second allele (Figure S5B).The TPS B mutant genotype is also monoallelic, with a larger frameshift deletion (51 bp) in one allele and 27 bp non-frameshift insertion in the second allele (Figure S5B).In both TPS mutant genotypes, alleles were predicted to produce a TPS protein with an altered glucose-6-phosphate (G6P) entry site (Figure S5C; Table S6).

TPS mutant genotypes experiment
This experiment used 20 replicate populations of four genotypes-two TPS mutant genotypes generated by CRISPR/Cas9 and two controls (NIES, genotype).The two controls were genetically identical but were kept separately at NIES, Tsukuba, Japan and at the University of Basel, Switzerland.The salinity level of the culture medium was increased in steps of 2 mS/cm every two weeks as described above (see Figure S3).Population extinction was checked at regular intervals, and samples were collected two weeks after the maximal tolerated salinity for survival was reached for the last replicate population(s).Trehalose and protein quantification followed the protocols described above.

Oxygen consumption rate
For the two TPS mutant and two control genotypes raised previously for the experiment for measuring salinity tolerance, trehalose and protein concentration, oxygen consumption rates were measured at 1.3 and 10 mS/cm water conductivity.Note that at 10 mS/ cm, salinity tolerant genotypes (i.e., control genotypes) started producing trehalose.Specifically, twenty adult females per genotype and treatment were isolated into individual 100-mL jars filled with ADaM at the corresponding salinity level.From those, one adult female from the second clutch was randomly selected five days before the oxygen consumption essay and placed in a new individual 100-mL jar with fresh ADaM at the correspondent salinity level.In total, the experiment comprised 160 individuals (4 genotypes x 2 treatments x 20 replicates).
We used the SDR device (PreSens, Germany) and 1-mL vials with 3 mm optode oxygen sensor spots to measure the oxygen decrease within the vials.The vials contained one D. magna individual each and were filled with ADaM medium of the correspondent salinity treatment (1.3 or 10 mS/cm).Measurements were done for the two salinity treatments simultaneously, using a total of four measurement blocks each with 24 samples per salinity treatment.The percentage of oxygen saturation was recorded every 15 seconds for 45 minutes at 20 C in each single-animal vial (or empty vial for the blanks) using the PreSens SDR software.The first 10 min of each recording were discarded from measurement.The mean of blanks (only ADaM, without animals) was calculated per plate.In total, the oxygen consumption rate was measured for 145 animals, since twelve animals and one blank showed strong and unexplained abnormalities or an unfitted linear regression model with R 2 values below 0.85 (the mean of R 2 value was 0.96±9.5x10 - ).Furthermore, three animals were lost during handling.The length of each individual was measured after the experiment using an eyepiece graticule (2 mm ± 0.01) in a stereomicroscope.

Statistical analysis for experimental data
The data retrieved from laboratory experiments was analysed using R software version 4.3.2 72and RStudio v. 1.3.1073. 73Data visualization was generated with the R package ggplot2 v.3.4.4. 74Mean values are presented with the standard error of the mean (SEM) and p-values are significant below the 0.05 threshold, unless otherwise stated.

Salinity tolerance variation
Genetic variance of the maximal tolerated salinity for survival and reproduction was estimated from each replicated population (n = 925).Measurements were conducted using the lmer function of the R package nlme v.3.1-148 75with genotype as a random effect.For reproduction, the average between asexual and sexual reproduction was used for each replicated population.
To assess the relation between the two dependent variables and salinity at the genotype's site of origin, Spearman tests were conducted using the mean tolerance across all five replicates of the 90 genotypes with available habitat salinity data.

Genome wide association study
Association summaries were accessed in the form of Manhattan and Quantile-quantile (QQ) plots using BoutrosLab.plotting.generalv7.0.3 92 and qqman v0.1.9 93R packages, respectively.Outliers SNPs were identified applying a Bonferroni-adjusted p-value threshold of 0.01.For an evaluation of the p-values distribution in the QQ plot, a less stringent threshold was applied to incorporate the entire peak region.

Population genetic statistics
The pN/pS ratio was calculated in R considering the number of synonymous and non-synonymous sites per gene.The mean and 99% confidence interval were obtained using a t.test for the BUSCO and immune genes sets.

Survival, trehalose, and protein content analysis
The recorded values of survival, trehalose and protein content for each sample (n = 60) at each salinity level were averaged per genotype and treatment.Non-parametric Mann-Whitney U-tests were conducted to compare averages of the salinity tolerance group factor (tolerant or intolerant; and controls or TPS mutant genotypes) for each salinity level independently, and to determine which samples showed significantly elevated concentrations of trehalose as compared to the blank samples.Exponential regression models, using the lm function, were used to test for increasing trehalose and protein with increasing salinity.For this, the factors salinity treatment, tolerance group and their interaction were considered.The significance of the factors was assessed using Anova function of the car v3.0-11 76 package.Data analysis and graphics used additional R packages cowplot v1.1.1, 77data.tablev1.14.2 78 and forcats v0.5.1. 79ygen consumption rate analysis Oxygen consumption rates were transformed from % O 2 /h to mg O 2 /h by using saturations of 9.05 and 8.79 mg/L O 2 at 100 % oxygen saturation of 1.3 and 10 mS/cm salinity water at 1 atm atmospheric pressure, respectively, and considering the respirometer vials volume of 1 mL.These values were corrected for individual animal length.
Oxygen consumption rates were averaged per sample (n = 145) and grouped by genotype and salinity treatment for data analysis and visualization.A linear regression model was conducted to test the effect of salinity treatment, genotype-type (TPS mutant or control), and genotype (considered as a random effect nested in genotype-type) on oxygen consumption rate (mg O 2 /h mm -1 ).

Figure 2 .
Figure 2. Manhattan plot of a GWAS for salinity tolerance

Figure 3 .
Figure 3. Trehalose and protein concentration related with salinity levels and tolerance (A) Survival per tolerance group and treatment, showing mean dots connected by lines and the standard error of the mean.(B) Estimated trehalose concentration per tolerance group and treatment.The dashed black line represents the mean trehalose concentration of the blank samples.Only salinity treatments of 10 mS/cm or above showed significantly higher amounts of trehalose than the blank samples, but only in tolerant genotypes.Treatments with significantly different trehalose values from the blanks (p value < 0.05) are reported with an asterisk alone.Treatments with significantly different trehalose values between salinity-tolerant and intolerant genotypes (p value < 0.05) are denoted by an asterisk combined with a horizontal squared bracket.(C) Estimated total dried protein concentration per tolerance group and treatment.Boxplots in (B) and (C) show the median, first and third quantile.Whiskers extend to 1.5 times the interquartile range upper and lower limits.The dots show data points beyond the whiskers.The artificial Daphnia medium (ADaM), used in standard Daphnia maintenance, has a salinity of 1.3 mS/cm.See also Figures S2, S3, and S4 and TableS1.

Figure 4 .
Figure 4. TPS mutations prevent trehalose production and reduce salinity tolerance (A) Survival per genotype and treatment, showing mean dots connected by lines and the standard error of the mean.(B) Estimated trehalose concentration per genotype and treatment.The dashed black line represents the mean of trehalose concentration for blank samples.Only treatments of 10 mS/cm or above showed significantly higher amounts of trehalose than the blank samples, but only in the control genotypes (p value < 0.05).Treatments with significantly different trehalose values from the blanks (p value < 0.05) are reported with an asterisk alone.Treatments with significantly different trehalose values between salinity-tolerant and intolerant genotypes (p value < 0.05) are denoted by an asterisk combined with a horizontal squared bracket.(C) Estimated total dried protein concentration per genotype and treatment.Boxplots are as in Figure 3. Artificial Daphnia medium (ADaM) has a salinity of 1.3 mS/cm.See also Figures S2, S4, and S5 and Tables S2 and S4-S6.

Figure 5 .
Figure 5. Variation in oxygen consumption rate between controls and TPS mutants at low and high salinities Control (1 and 2) and TPS mutant (A and B) genotypes were tested at low (1.3 mS/cm) and high (10 mS/cm) salinities.Respiration rate is corrected for D. magna individual body length.Data are represented as mean ± SEM.Dots represent individual measurements.Boxplots are as in Figure 3.