Fine-scale mapping of physicochemical and microbial landscapes of the coral skeleton

The coral skeleton harbours a diverse community of bacteria and microeu-karyotes exposed to light, O 2 and pH gradients, but how such physicochemical gradients affect the coral skeleton microbiome remains unclear. In this study, we employed chemical imaging of O 2 and pH, hyperspectral reflectance imaging and spatially resolved taxonomic and inferred functional microbiome characterization to explore links between the skeleton microenvironment and microbiome in the reef-building corals Porites lutea and Para-goniastrea benhami . The physicochemical environment was more stable in the deep skeleton, and the diversity and evenness of the bacterial community increased with skeletal depth, suggesting that the microbiome was stratified along the physicochemical gradients. The bulk of the coral skeleton was in a low O 2 habitat, whereas pH varied from pH 6 – 9 with depth. Physi-cochemical gradients of O 2 and pH of the coral skeleton explained the β - diversity of the bacterial communities, and skeletal layers that showed O 2 peaks had a higher relative abundance of endolithic algae, reflecting a link between the abiotic environment and the microbiome composition. Our study links the physicochemical, microbial and functional landscapes of the coral skeleton and provides new insights into the involvement of skeletal microbes in the coral holobiont metabolism.


INTRODUCTION
A dynamic, endolithic (rock-dwelling) microbiome lives within the coral skeleton along steep gradients in physicochemical properties (Kühl et al., 2008;Ricci et al., 2019).These gradients change over the skeleton's vertical axis from the surface towards the interior of the coral colony and might determine the stratification of the endolithic community, where O 2 and pH gradients can be linked to heterotrophic and autotrophic metabolism of microbiome members (Bellamy & Risk, 1982;Kühl et al., 2008;Shashar & Stambler, 1992).For instance, the coral skeleton is mainly an anoxic environment (Kühl et al., 2008) but there is some evidence indicating that the skeleton of branching species hosting a high abundance of endolithic green algae (Ostreobium spp.) can reach O 2 levels as high as 200% air saturation in light (Bellamy & Risk, 1982).These abrupt changes in the physicochemical environment can be linked to the metabolism of certain members of the microbiome such as endolithic algae and Cyanobacteria (Kühl et al., 2008;Magnusson et al., 2007), but whether these physicochemical changes, in turn, affect the presence and abundance of other microbes (including endoliths) remains to be investigated.
The calcium carbonate (CaCO 3 ) matrix of the skeleton of living scleractinian corals is colonized by endolithic communities of eukaryotes and prokaryotes (Marcelino et al., 2017;Marcelino & Verbruggen, 2016;Pollock et al., 2018;Ricci et al., 2022;Tandon, Ricci, et al., 2022).Endolithic, coenocytic green algae in the genus Ostreobium are among the most conspicuous eukaryotes found in this environment (Del Campo et al., 2017;Iha et al., 2021;Marcelino & Verbruggen, 2016;Ricci et al., 2021;Tandon, Pasella, et al., 2022), and they often form a distinct green band positioned one to a few millimetres below the coral tissue.The ability of Ostreobium filaments to dissolve and drill into the CaCO 3 matrix makes them ubiquitous colonizers of the coral skeleton (Ralph et al., 2007).Fungi also excavate the CaCO 3 matrix (Le Campion-Alsumard et al., 1995;Priess et al., 2000) and can, in some cases, attack the endolithic algae, turning green layers into black (Priess et al., 2000).The marine plant parasite Labyrinthula is one of the most abundant eukaryotes in the common coral species Isopora palifera and its distribution within the skeleton might be linked to interactions with the endolithic algae (Ricci et al., 2021).Bacterial communities can colonize shallower as well as deeper skeletal layers (Ralph et al., 2007;Ricci et al., 2021).They exhibit high diversity (Marcelino et al., 2018;Marcelino & Verbruggen, 2016;Pollock et al., 2018;Ricci et al., 2022;Sweet et al., 2011), and the microbiome composition is influenced by the skeleton architecture (Ricci et al., 2022).Some bacteria, like the order Myxococcales, and genera Spirochaeta and Endozoicomonas, show persistent association with the coral skeleton (Marcelino & Verbruggen, 2016;Pollock et al., 2018;Ricci et al., 2022) and are thought to be involved in aiding host homeostasis through nutrient cycling and antibiotic productions (Lawler et al., 2016;Neave et al., 2016;Pollock et al., 2018;Ricci et al., 2022).However, we still know very little about factors that shape the coral skeleton microbiome with increasing depths in the skeletal matrix.
The coral skeleton exhibits a distinct physicochemical environment (Ricci et al., 2019) that is strongly shaped by the physical properties of the porous CaCO 3 matrix (Wu et al., 2009) and the incident solar irradiance (Magnusson et al., 2007).While far-red light (>700 nm) penetrates the coral tissue and CaCO 3 skeleton efficiently, visible wavelengths (400-700 nm) are strongly attenuated at the level of the green Ostreobium layer, to <0.1%-15% of the incident irradiance at the coral tissue surface (Magnusson et al., 2007).The light attenuation is due to a combination of pigment absorption and strong scattering in the CaCO 3 matrix that leads to a diffuse light environment as a function of the distinctive skeletal architecture of each coral species (Enríquez et al., 2005;Marcelino et al., 2013;Ter an et al., 2010).While the skeleton is mainly an anoxic environment, O 2 is produced both near its surface in the coral tissue and in the green endolithic algal layer during the daytime and diffuses across the porous skeletal matrix (Kühl et al., 2008).Photosynthetic CO 2 fixation contributes to changes in pH in the green skeletal layer, which in the coral Porites compressa shifted from $7.7 in darkness to $8.5 in light (Shashar & Stambler, 1992).In darkness, the pH shifts to preillumination values mainly because of CO 2 production through respiration (Shashar & Stambler, 1992), but very few spatially resolved pH measurements have been done in coral skeletons (Reyes-Nivia et al., 2013;Shashar & Stambler, 1992).There is now increasing evidence for various microbial processes involved in carbon, nitrogen, sulphur and phosphorus transformations in the coral skeleton (Ferrer & Szmant, 1988;Moynihan et al., 2022;Sangsawang et al., 2017;Tandon, Ricci, et al., 2022;Yang et al., 2016;Yang et al., 2019), but quantification of such processes is rare and it remains unknown how the functions of the skeletal microbiome change with depth and skeletal architecture.By using a combination of hyperspectral imaging, planar optode sensors and spatially explicit microbiome characterization (by metabarcoding), the present study explores links between the O 2 and pH microenvironment and the composition and inferred functions of the skeletal microbiome.

Experimental design
We used the coral species Porites lutea and Paragoniastrea benhami (six specimens for each species) because their distinctive skeletal architectures influence the colony's physicochemical environment (Marcelino et al., 2013;Wu et al., 2009) and microbial community (Fordyce et al., 2021;Ricci et al., 2022).In our sampling strategy, we aimed to reduce the variability of factors known to influence the composition of the coral microbiome, such as colony age (Williams et al., 2015), health status (Maher et al., 2019) and spatial or temporal variability (Dunphy et al., 2019).Over a 3-week period in January 2020, we collected fragments (size: 6-11 cm; mean 7.35 cm) of visually healthy, adult colonies found <300 m apart from each other on the reef flat of Heron Island (Great Barrier Reef, Australia).
We cut each coral skeleton into two halves (sides A and B; Figure 1).After a period of 2 days of acclimation, we used side A for planar optode chemical imaging to characterize the O 2 and pH gradients over coral skeleton cross-sections, followed by hyperspectral reflectance imaging of the same cross-sections to map the distribution of photosynthetic pigments (Figure 1).Side B was directly processed after the cutting, and we obtained five sequential sub-samples of 4 Â 4 Â 4 mm (=64 mm 3 ) at increasing distances from the surface of the skeleton (Figure 1).We assessed the prokaryotic and eukaryotic diversity in each skeletal sub-sample using 16S and 18S rRNA gene metabarcoding in combination with functional prediction bioinformatics analyses to infer bacterial functions (Figure 1).

Sample collection and processing
Twelve coral fragments were collected at low tide (<1 m water depth) from the research zone of Heron Island reef flat, Great Barrier Reef (GBR; 23 44 0 S, 151 91 0 E), during January 2020.Specimens were collected using a hammer and chisel and placed in zip-lock polyethylene bags in seawater.Tools and zip-lock bags used for the collection of the specimens were sterilized with bleach and ethanol before sampling.Each coral skeleton was cut into two halves (sides A and B; Figure 1) using a diamond saw with a continuous flow of sterile filtered (0.22 μm) seawater (SSW).The edges of skeleton side A placed against the planar optode sensor foils were covered in black, nontoxic plasticine to prevent light and seawater penetration, and the sections were then acclimatized in shaded outdoor flow-through aquaria filled with lagoon water for 2 days.A 4-mm thick slice was cut perpendicular to the vertical growth axis of the colony from skeleton side B and thoroughly rinsed with SSW.The coral tissue was removed from the skeleton 4-mm thick slice using a waterpik and SSW, and sterilized razor blades were used to cut 4 Â 4 mm sub-samples (each representing a skeleton volume of 64 mm À3 ), resulting in a total of five skeletal sub-samples representing a depth gradient of 20 mm from the surface of each coral colony (Figure 1).The coral skeleton subsamples were collected and snap-frozen by immersion in liquid nitrogen and stored at À80 C until processing.Two samples of SSW (5 L each) were filtered using 0.22 μm filters (MilliporeSigma) and snap-frozen.To avoid possible cross-contamination, we used sterilized razor blades and tweezers for each sub-sample and sequenced the SSW and control samples taken during the DNA extraction and amplification.Afterwards, the sequences retrieved from SSW, extraction and amplification controls were removed from the dataset using the R package decontam (Davis et al., 2018).Fine-scale sampling Vignette of the study experimental design and methodologies used for data collection.Diagrams coloured in red show the methodologies used to map the physicochemical environment, green to characterize the microbial community and blue to infer bacterial functions.Scale bar is 1 cm.

Library preparation, sequencing and initial quality control
The total DNA from the intact snap-frozen skeletal subsamples was extracted using the Wizard Genomic DNA Purification Kit (Promega).Extractions were also performed on SSW, seawater taken at the time of sampling, and three blanks taken during both the extraction and amplification protocols.These SSW and blanks served as controls.We used a two-step polymerase chain reaction (PCR) amplification, the first PCR amplified the target molecular markers, and the second PCR added the Illumina adapter overhangs (underlined).The V5-V6 regions of the 16S rRNA gene were PCR amplified using the primer pairs: 784F [5 0 -GTGACCTATGAACT-CAGGAGTCAGGATTAGATACCCTGGTA-3 0 ] and 1061R [5 0 -TGAGACTTGCACATCGCAGCCRRCACGAGCTGAC GAC-3 0 ].The 18S rRNA gene was amplified using the primer pairs: NF1 [5 0 -GTGACCTATGAACTCAGGA GTCGGTGGTGCATGGCCGTTCTTAGTT-3 0 ] and 18 Sr2b [5 0 -CTGAGACTTGCACATCGCAGCTACAAAGG GCAGGGACGTAAT-3 0 ] ( Porazinska et al., 2009).For both 16S and 18S rRNA gene amplicons, the first PCR round was conducted in 20 μL reactions using the KAPA HiFi HotStart ReadyMix and 1 μL l0M of each primer, with a thermal cycling profile of 95 C for 3 min; 25 cycles of 98 C for 20 s, 60 C for 15 s, 72 C for 30 s, a final extension at 72 C for 1 min.The second PCR round was conducted in 20 μL reactions using the GoTaq Green mix and 10 μM of each custom-made Illumina index.The thermal cycling profile was: 95 C for 3 min; 24 cycles each at 95 C for 15 s, 60 C for 30 s, 72 C for 30 s, and a final extension at 72 C for 7 min.Amplicons of the skeletal sub-samples and controls were sequenced in the Illumina MiSeq platform (2 Â 300 bp paired-end reads) at the Walter and Eliza Hall Institute of Medical Research, Victoria, Australia.Sequences were processed using the QIIME2 pipeline, version 2022.2 (Bolyen et al., 2018).Cutadapt was used to remove primers (Martin, 2011), DADA2 was used to merge forward and reverse reads, remove poor-quality sequences, perform dereplication and eliminate chimeras (Callahan et al., 2016).Taxonomy was assigned using the feature-classifier plugin in-built in QIIME2.For 16S rRNA gene, we used the SILVA v132 QIIME release (Quast et al., 2012) and for 18S rRNA gene, the PR2 database (Guillou et al., 2012).The bacterial and eukaryotic phototrophic communities were curated from the 16S and 18S rRNA gene datasets based on the literature (Fenchel et al., 2012;Lohr et al., 2012).

Predicted functional abundances based on 16S rRNA gene
Functional profiles of the total skeletal microbial community were extrapolated by a conservative approach using a combination of Phylogenetic Investigation of Communities by Reconstruction of Unobserved States (PICRUSt2; Douglas et al., 2020) and Tax4Fun2 (Wemheuer et al., 2020).The amplicon sequence variant (ASV) abundance table and sequences of the whole community and phototrophs were used as input for PICRUSt2 with the following parameters, --in_traits KO and --stratified.Results from Tax4Fun2 were obtained using Tax4Fun2_ReferenceData_v2 and Ref99NR in database_mode with copy number normalization enabled.PICRUST2 NSTI cut-off value was set at 2.0 as suggested by the software developer at https://forum.qiime2.org/t/q2-picrust2-recommended-maxnsti-value/8990/2.Downstream analyses and functional pathway estimation were carried out using Kegg Ontologies (KOs) retrieved from both Tax4Fun2 and PICRUST2.KOs shared between these two methods were searched in the PICRUSt2 generated pred_meta-genome_contrib.tsv file, afterwards, we drew a table showing the number of ASVs encoded by each KO.This table was then used to draw functional abundance plots.KEGG pathway (https://www.genome.jp/kegg/pathway.html)was used to identify the KO's involved in carbon, nitrogen and sulphur metabolic pathways.

Statistical analysis
Downstream statistical analyses were conducted using RStudio version 1.2.5033 and packages ampvis2 (Andersen et al., 2018), decontam (Davis et al., 2018), ggfortify (Tang et al., 2016), ggplot2 (Wickham, 2011), ggvegan (Simpson, 2015), microbiome (Lahti & Shetty, 2012), phyloseq (McMurdie & Holmes, 2013), rgr (Garrett, 2013) and vegan (Oksanen et al., 2017).The significance level for statistical analyses was 0.05.In αand β-diversity analyses, ordination plots and heatmaps, the skeletal sub-samples collected at the same distance from the colony surface and belonging to the same coral species were combined under the same category.Observed richness (α-diversity) and Pielou's evenness of coral skeleton sub-samples were computed on unrarefied ASV tables.Differences in αdiversity indices across skeletal sub-samples were analysed via analysis of variance or Kruskal-Wallis test and pairwise comparisons were computed via a twosample t-test or Wilcoxon rank sum test.Correlations between α-diversity indices and increasing skeletal depth were computed using linear regression.The influence of pH and O 2 gradients, measured at $8, $21 and $50 μmol m À2 s À1 , on the bacterial community's β-diversity of each coral skeleton sub-sample was computed on centre log-transformed Euclidean distance matrices of the ASV tables through permutational analysis of variance (PERMANOVA).We used two-way PERMANOVA to test the combined influence of pH and O 2 gradients maxima on the bacterial community's β-diversity of each coral skeleton sub-sample, respectively.To draw attention to specific members of the bacterial community associated with different physicochemical gradients in each coral species, we assessed the influence of pH and O 2 gradients on the 200 most abundant ASVs via canonical correspondence analysis (CCA; Ter Braak, 1987), using Hellinger transformed, rarefied ASV tables (10,000 sequences per sample).CCA is a multivariate method that can disentangle patterns or changes in biological communities and identify potential associations between explanatory variables and ASVs (based on their coordinates' similarity on the CCA plots).CCA analysis was performed on the top 200 most abundant ASVs of each dataset, both to reduce its dimension and because rare taxa may have an unduly large influence on these types of analyses (Legendre & Gallagher, 2001).Independent CCA was performed using pH and O 2 gradients measured at $8, $21 and $50 μmol m À2 s À1 as explanatory variables.In Results and Discussion section, we reported results and biplots correlating the β-diversity of the bacterial communities with pH and O 2 gradients measured at $50 μmol photons m À2 s À1 for Po.lutea and $21 μmol photons m À2 s À1 for Pa.benhami because of higher statistical significance.

Chemical imaging
The O 2 -sensitive optode sensor was prepared using 100 mg of polystyrene, 1.5 mg of indicator (PT (II) meso-tetra(pentafluorophenyl)porphine), 1.5 mg of reference (Macrolex yellow ® ) and dissolved in 1 g of solvent (Tetrahydrofuran) to form a cocktail.The pHsensitive optode sensor was prepared using 200 mg of hydrogel D4, 1 mg of indicator (lipophilic 8-hydroxy-1,-3,6-pyrene-tri sulfonic acid derivate), 1 mg of reference (perylene) and dissolved in 2 g of solvent (Tetrahydrofuran) to form a cocktail.The O 2 and pH cocktails were knife-coated on dust-free polyester foils (goodfellow.com)and the final thickness of the coating was <2 μm.
The experimental setup was composed of a digital single-lens reflex (Canon EOS 1000D) with the NIR blocking filter removed and equipped with a Sigma 50 mm F2.8 EX DG Macro Lens.The camera lens was also equipped with emissions filter Schott 530 nm for O 2 and Schott 455 nm long-pass filters (Uqgoptics.com) for pH.As described in Larsen et al. (2011), the O 2 -sensitive sensor was excited by four high power blue LEDs (l-peak = 445 nm, LXHL-LR3C, Luxeon, F = 340 mW at IF = 700 mA) in combination with a 470 nm short-pass filter (blue dichroic colour filter, Uqgoptics.com),while the pH-sensitive sensor was excited by four high power UV LEDs (l-peak = 405 nm, LZ1-10UA05, LedEngin, F = 460 mW at IF = 700 mA) used in combination with a 405 nm band pass filter (NT43-156, Edmundoptics.com).The coral skeleton cross-sections were illuminated through the planar optodes by a Schott Leica KL 2500 LCD Cold Light Source.All the elements of the setup were connected to a trigger box (https://imaging.fish-n-chips.de) and controlled through a PC using the custom-made software Look@RGB.
Each planar optode was calibrated independently in an aquarium with a constant seawater temperature of 27 C in a darkened room.The calibration range was 0-340 μmol L À1 for the O 2 -sensitive planar optode and pH 6-9 for the pH-sensitive planar optodes (Figure S1).During the pH calibration, cross-sections of Po. lutea and Pa.benhami cleared skeletons were placed on the planar optodes with the aim of accounting for the scattering properties of the skeleton of each coral species (Marcelino et al., 2013).This is only an approximation, as it was not possible to use the exact same fragment for calibration and measurement.For the O 2 calibration, we accounted for the scattering properties of the skeletons by subtracting the first (calibrated) image of each experiment from subsequent images.These first images were taken $8 h after the cut coral fragments were placed on the O 2 -sensitive planar optodes in complete darkness; thus, the skeletal cross-sections were assumed to be fully anoxic and any detected signal would be due to skeletal scattering.Luminescence intensities of the planar optode are highest at anoxic conditions, which thus would result in the highest scattering.We recommend seeing Larsen et al. (2011) for detailed methods, equipment and calibration process of planar optodes in general.
All experiments were performed in a dark room at a constant temperature of 27 C to resemble the seawater temperature at the time of sampling.Groups of two or three coral halves were placed in a 4 L glass aquarium on top of transparent, calibrated planar O 2 and pHsensitive optodes, and the aquarium was placed on top of the imaging setup (Figure S2).Seawater in the aquarium was aerated with an aeration stone connected to an air pump.To impair the exchange of O 2 between the surrounding water column, the coral tissue and the coral skeletons' cut surface, nontoxic plasticine sealed the coral edges and was fixed to the optode.After this process, corals were left to acclimate overnight while fixed on the planar optode.The cut coral surface was illuminated through the optode (Figure S2) at each of the following incident photon irradiances (400-700 nm): $8, $21 and $50 μmol photons m À2 s À1 using fibre-optic halogen lamps (Schott KL 2500 LCD).Irradiance levels in the experimental setup for defined lamp settings were measured using a Walz Universal Light Meter (ULM-500) equipped with a Mini Quantum Sensor (LS-C).Unless technical problems such as electricity outages did not permit carrying out the full experiment, image sequences capturing O 2 or pH dynamics across the corals cut surfaces were acquired every minute for a total of 480 images for each light setting ($8, $21 and $50 μmol photons m À2 s À1 ).Information on the length of each experiment can be found in Table S1.
Downstream data analysis was performed using ImageJ v1.53K.Every image was split into Red, Blue, Green and Green2 RAW TIFF images.Using the Ima-geJ plugin Ratio Plus, we divided the Red by the Green RAW TIFF images (R/G) for the O 2 data analysis and the Green by the Blue RAW TIFF images (G/B) for the pH data analysis.The resulting images were colourcoded using the lookup-table 'Fire' to visualize the dynamics.Then, by using the curve fitting function Curve Fitting (Exponential with Offset for O 2 and Straight Line for pH), the images were calibrated according to the planar optode calibration values.By using the function Brightness&Contrast, the minimum and maximum displayed values of each image were set to 0 and 340 μmol L À1 for O 2 images and 6 and 9 for pH images.Given the low O 2 concentration we measured in the skeletons, we used the function Threshold to only display dissolved O 2 concentration values between 0 and 15 μmol L À1 .In the O 2 data analysis, we used the function Image Calculator to remove the first image of every experiment from the subsequent images with the aim of minimizing scattering artefacts of the skeleton.We obtained O 2 and pH values from every image by defining five regions of interest (ROI) of $4 Â 4 mm 2 from shallower to deeper skeletal layers and measuring their value using the function Measure.These ROIs were chosen according to the sub-samples collected along the vertical axis of the coral skeleton used in the characterization of the 16S and 18S rRNA genes (Figure 1).The obtained values are presented in the manuscript and were used for statistical analysis in combination with molecular data.
Chemical imaging provides fine-scale measurements in structurally complex systems (Santner et al., 2015) but our experimental setup had limitations.For instance, in our experiments the coral crosssections were illuminated through the transparent planar optodes, and the skeleton cross-section borders were sealed using black plasticine.These procedures prevented us from considering the natural vertical light gradient that penetrates the skeleton and measuring the influence of the tissue layer on the O 2 and pH gradients that could have been impacted by the metabolism of the host and its microbial community (e.g., higher O 2 concentration and pH at day and quicker O 2 consumption and lower pH at night).

Hyperspectral imaging
Hyperspectral imaging of reflected light was performed on the vertical cross-section of the skeleton of three Po.lutea and three Pa.benhami half colonies submerged in seawater (27 C and salinity = 35).The measurements were done with a hyperspectral camera system (Snapscan VNIR, Imec, Belgium) using automatic dark signal correction and normal halogen lamps without a heat filter for illumination of the coral cross-section.White referencing was done using a 95% reflectance tile (Imec, Belgium) placed at the same distance, position and light field as the coral cross-sections.Hyperspectral image analysis (and export of reflectance spectra from particular areas in the coral cross-sections) was done with the Snapscan operating software (Imec, Belgium).Hyperspectral image cubes obtained for the coral cross-sections were normalized with the white reflectance standard to obtain hyperspectral image cubes in units of % reflectance for the coral cross-sections (see also Kühl et al., 2020).Using the Imec Spectral Angle Classifier in the system software, we could highlight areas with identical spectral properties over the coral cross-sections.For this, we trained the classifier by defining small areas of the crosssection with particular spectral features, where each selection was treated as a separate class by the classifier.The classifier analysis yielded false color-coded maps of the coral cross-sections highlighting regions with similar spectral properties.

Stratification of endolithic communities in the coral skeleton
The α-diversity (observed diversity and Pielou's evenness) of the bacterial community increased from shallower to deeper skeletal layers (Figure 2A-D; Table S4).In the vertical cross-section of the coral skeleton, the observed bacterial diversity in Po. lutea and Pa.benhami increased gradually (Figure 2A,B), while Pielou's evenness of the bacterial communities of both coral species first increased steeply between 0 and 8 mm (more pronounced in Po. lutea than in Pa.benhami) and then slightly between 8 and 20 mm (Figure 2C and Pa.benhami show a progressive increase in the dispersion of samples moving from shallower to deeper skeletal layers (Figure 2E,F).In biological terms, these αand β-diversity metrics suggest that the endolithic bacterial communities of both coral species were dominated by few taxa in the shallow skeletal layers and became more evenly distributed in the deeper skeleton.For instance, ASVs attributable to the bacterial genera 'Candidatus Amoebophilus', Fulvivirga and Spirochaeta were among the dominant in shallow skeletal layers (0-8 mm) of both coral species (Figure 2G,H), whereas the deep skeleton harboured an assemblage of bacterial ASVs including the genera Tistlia, Paramaledivibacter, Woesia, Pelagibus, and so forth (Figure 2G,H).These data suggest that the deep skeleton may offer an environment suitable to a wider range of bacteria, a similar pattern to that observed in stromatolites, where deeper and more physicochemically stable layers have been shown to harbour a broader bacterial diversity (Toneatti et al., 2017).
Alongside the bacterial community, Po. lutea and Pa.benhami skeletons harboured a wide array of microeukaryotes ASVs attributable to endolithic algae, sponges, fungi, worms, apicomplexan and so forth (Figure S3a,b).In Po. lutea, endolithic algae ASVs in the groups Chlorophyta and Stramenopiles dominated the microeukaryotic community of every skeletal subsamples with an average relative abundance of 53% and 37%, respectively.Apicomplexan ASVs were retrieved at low relative abundance from shallow skeletal layers (average relative abundance across skeletal sub-samples 0-4 mm and 4-8 mm of 8%) and fungal ASVs in the phylum Ascomycota were present at low relative abundance (average relative abundance across skeletal sub-samples of 4%) throughout the whole skeleton depth gradient (Figure S3a).The retrieval of low fungal ASVs counts could have been influenced by the use of intact skeletal sub-samples during DNA extraction, which could have prevented the breakdown of the hard fungal cell wall and therefore access their DNA.In Pa.benhami, we found Porifera, Chlorophyta, Ascomycota and Stramenopiles ASVs dominating the microeukaryotes community with an average relative abundance across skeletal subsamples of 28%, 23%, 21% and 11%, respectively.Anellida ASVs were present throughout the skeleton with a low average relative abundance of 4% across skeletal sub-samples, and Apicomplexan ASVs were retrieved from shallow skeletal layers (average relative abundance across skeletal sub-samples 0-4 mm and 4-8 mm of 5%), but were mainly present in the deeper skeleton (average relative abundance across skeletal sub-samples 16-20 mm of 15%; Figure S3b).The differences in the composition of the microeukariotic communities of the two coral species could be determined by the skeletal architecture of the two coral species (Ricci et al., 2022), by the peculiar physicochemical environment of each coral colony (Ricci et al., 2019) and by benignant and antagonist interactions among members of the community.
Hyperspectral reflectance imaging on vertical crosssections of Po. lutea and Pa.benhami coral colonies revealed a diversity of chlorophylls (Chl) and bacteriochlorophylls (Bchl) sustaining both oxygenic and anoxygenic photosynthesis (Figure 3).Our 16S and 18S rRNA gene datasets are in line with the hyperspectral imaging results and contained ASVs attributable to bacterial and eukaryotic phototrophs (Table S5).Specifically, we retrieved 218 bacterial and 135 eukaryotic ASVs in Po. lutea and 217 bacterial and 113 eukaryotic ASVs in Pa.benhami (Table S5).Although our data show that there was a certain degree of variability across skeletons of the same species, the distribution of photosynthetic pigments was stratified in Po. lutea and patchy in Pa.benhami (Figure 3).This suggests that the skeletal architecture dimmed the light environment differently (Marcelino et al., 2013) and consequently affected the distribution of the photosynthetic pigments.These results support previous findings (Fordyce et al., 2021) where chlorophyll concentrations correlated with the skeletal morphology characteristics of each coral species.Chl a was more abundant in shallower layers in the proximity of the tissue than in deep skeletal layers (>20 mm from the coral surface; Figure 3; Figure S4).Although signals of Chl a in the deep skeleton indicate the presence of oxygenic phototrophs such as Cyanobacteria and endolithic algae, our data cannot confirm whether these chlorophyll pigments were photosynthetically active or rather remaining pigments from older microbial populations.
In both coral species, the phyla Proteobacteria (Orders: Rhizobiales, Cellvibrionales, Rhodobacterales and Rhodospirillales) and Chlorobi (Order: Chlorobiales) dominated the phototrophic community (Table S5).Signals of Bchl a and c were present across the vertical cross-sections of both Po.lutea and Pa.benhami skeletons (Figure 3; Figure S4).These results suggest that members of the Chlorobi that have Bchl c (Thweatt et al., 2019) and some members of the Proteobacteria (e.g., Rhizobiales, Rhodobacterales and Rhodospirillales) that have Bchl a (Imhoff et al., 2018) were present across the whole skeleton, but Proteobacteria were more abundant in deeper skeletal layers of the Po.lutea samples FRH46 and FRH47, where Bchl a signals were stronger (Figure S4).In line with the hyperspectral imaging data, the number of phototrophic bacterial ASVs increased with increasing depth in the coral skeleton (Figure S5), an environment generally regarded as more stable in comparison to shallower skeletal layers (Kühl et al., 2008;Magnusson et al., 2007).The lower biodiversity of shallower phototrophic communities in the coral skeleton could also be explained by coral host-bacterial interactions.For instance, it has been proposed that members of the Chlorobi could interact with the coral host and remove H 2 S from shallower skeletal layers (Cai et al., 2017).
H 2 S has been demonstrated toxic for many animals (Beauchamp et al., 1984), but this compound is necessary for chemolithotrophic sulphur oxidising bacteria such as the families Xanthobacteraceae, Bacillaceae, Pseudomonadaceae and Beggiatoaceae that we found at a higher relative abundance in deeper skeletal layers (8-20 mm; Table S6).S5).Our results also support previous studies reporting that skeletal oxygenic phototrophs absorb far-red wavelengths (Fordyce et al., 2021;Kühl et al., 2008;Magnusson et al., 2007;Ricci et al., 2021) and through their metabolism, influence the physicochemical environment of the skeleton (Figure 4; Shashar & Stambler, 1992;Kühl et al., 2008).Further, our data show that oxygenic and anoxygenic photosynthesis could occur in close proximity inside the coral skeleton (Figure 3), suggesting that processes such as nitrogen fixation by anoxygenic phototrophs may be regulated by the activity of oxygen phototrophs, similarly to what was proposed for other microbial environments (Paerl et al., 2000;Pinckney & Paerl, 1997).

Physicochemical gradients in the skeleton
Each coral skeleton was characterized by different O 2 and pH gradients (Figure 4; Figure S6; Table S7), shaped by the metabolism of their microbial communities.The cross-section of all coral skeleton samples exhibited some O 2 production by endoliths when illuminated, but the bulk skeletal environment remained anoxic (Figure 4).Peak concentrations of dissolved O 2 occurred in shallower skeletal layers of Po. lutea (0-8 mm) but were found deeper in the skeleton of Pa.benhami (4-16 mm; Figure 4; Table S7).Our results confirm that O 2 production can be observed inside the coral skeleton (Bellamy & Risk, 1982;Kühl et al., 2008;Shashar & Stambler, 1992) and show that different coral species and colonies are characterized by different O 2 gradients.Oxygenic phototrophs induce oxygenation and alkalinization of the skeleton through photosynthesis, but this is not the only functional group influencing the O 2 and pH gradients through their metabolism.For instance, denitrifiers and sulphate reducers induce alkalinization (Rust et al., 2000;Tran et al., 2021) and microbial respiration limits the build-up of O 2 and increases in pH (Berggren et al., 2012).In Po. lutea, O 2 and pH gradient peaks were in the same skeletal layers under irradiance levels of $8 and $21 μmol photons m À2 s À1 (Figure 4), suggesting that CO 2 fixation determined pH peaks.In contrast, O 2 and pH gradients seemed disconnected in Pa.benhami (Figure 4).In Po. lutea the pH peaks were between 4 and 16 mm from the colony surface (Figure 4; Table S7), while the pH in Pa.benhami increased steadily from shallower to deeper skeletal layers (Figure 4; Table S7) possibly due to the metabolism of denitrifiers and sulphate reducing bacteria.Although our data represent the processes happening within the coral skeleton during experimental conditions, in the natural environment, the physicochemical properties of each coral species and colony result from more complex interactions among the coral tissue thickness, skeletal architecture, autotrophic and heterotrophic metabolisms.

The inferred functional profile of the endolithic community
Using computational predictions of function from the 16S rRNA gene, we found that the bacterial community was involved in carbon, nitrogen and sulphur metabolic pathways (Figure S7) and potentially could provide fixed carbon, nitrogen and sulphur to the coral holobiont.These metabolic pathways are tightly interwoven, and some of their reactions are O 2 and pH sensitive (Pratscher et al., 2011;Šimek et al., 2002); therefore, their spatial-temporal rates are likely to be affected by the physicochemical gradients of the skeletal environment.Skeletons of Po. lutea and Pa.benhami showed high numbers of ASVs potentially involved in the transformation of inorganic and organic carbon compounds via pathways like 3-hydroxypropionate bicycle, acetate kinase-PO 4 3À acetyltransferase, Wood-Ljungdahl and reverse Krebs cycle (Figure S7).These pathways are thought to encompass various physicochemical requirements (e.g., presence/absence of O 2 , low pH, high temperature) and trophic strategies (e.g., chemoautotrophs, chemoheterotrophs; Ingram-Smith et al., 2006;Tabita, 2009;Bar-Even et al., 2012;Weiss et al., 2016).Bacteria use these pathways to convert inorganic and organic carbon compounds to energy and molecules such as acetyl-CoA and acetate (Bar-Even et al., 2012;Ingram-Smith et al., 2006;Pratscher et al., 2011;Quayle, 1972;Tabita, 2009;Weiss et al., 2016).For example, the 3-hydroxypropionate bicycle is used by bacteria in aerobic environments to autotrophically fix CO 2 and produce pyruvate through a series of reactions (Hügler & Fuchs, 2005).This bicycle was mainly found in the deep skeleton between 12 and 20 mm from the colony surface (Figure S7), an environment where we measured low O 2 (averaged concentration across skeletal sub-samples under a photon irradiance of $21 μmol photons m À2 s À1 ) in Po. lutea of 0.6 μM and in Pa.benhami of 1.2 μM, while finding a high abundance of Chloroflexi ASVs (Table S5), which are the only bacteria known to use this bicycle (Bar-Even et al., 2012).By way of another example, bacteria use the reverse Krebs cycle to fix carbon and, through a series of reactions, synthesize molecules such as acetyl-CoA and pyruvate (Bar-Even et al., 2012;Tang & Blankenship, 2010).This cycle is thought to be restricted to anaerobic environments, but studies suggest that bacteria can also operate it in presence of O 2 (Bar-Even et al., 2012) and accordingly our data show the presence of this cycle both in aerobic and anaerobic skeletal areas (Figure S7).
We inferred the involvement of endolithic bacteria in six pathways associated with nitrogen metabolism (Figure S7).Our data show that Po. lutea had more ASVs associated with diazotrophic bacteria than Pa.benhami and their abundance was higher in the deeper and less oxygenated skeleton (Figure S7).Assimilatory and dissimilatory NO 3 À reduction were among the two most abundant nitrogen pathways in both coral species (Figure S7).Through the assimilatory pathway, NO 3 À is reduced to NH 4 + and incorporated as organic nitrogen (Sias et al., 1980).In the dissimilatory pathway, NO 3 À is used as an electron acceptor and reduced through a series of steps to N 2 (Sias et al., 1980), thus allowing bacterial growth in environments that lack O 2 like the coral skeleton.Many bacterial ASVs could be responsible for reductive pathways (e.g., dissimilatory and assimilatory NO 3 À reduction, anammox and denitrification), while there were few ASVs that could be responsible for nitrification, whose end product is NO 3 À (Figure S7).Previous studies that measured NO 3 À in the skeleton found contrasting results on the concentration of this form of inorganic nitrogen (Ferrer & Szmant, 1988;Risk & Muller, 1983).One study (Risk & Muller, 1983) suggested that skeletons characterized by nearly anoxic conditions, like those measured in our study (Figure 4), promote reductive pathways, while skeletons that show higher O 2 concentrations facilitate oxidative pathways.Our results are in line with this concept.We also found low count of bacterial ASVs that could be responsible for nitrification (Figure S7) and the production of NO 3 À which is necessary to feed the reductive pathways occurring within the skeleton.Although nitrogen is a growth-limiting nutrient (Kuypers et al., 2018), our data show that endolithic bacteria had the potential to contribute to the nitrogen budget of the coral holobiont with essential compounds like NH 4 + (Figure S7).
Metabolic pathways associated with sulphur metabolism were among the most abundant in deep skeletal layers of both coral species (Figure S7).Sulphate reduction is a predominant pathway largely restricted to anaerobic environments like the deep skeleton (Wasmund et al., 2017;Figure 4; Figure S6).However, we also found this pathway in shallower skeletal layers (Figure S7) that, when illuminated, showed higher O 2 build-up (Figure 4; Figure S7).These results suggest that part of the skeleton could be characterized by temporal compartmentalization of metabolic functions (e.g., photosynthesis in daylight and sulphate reduction in darkness).The coral skeleton is an environment enriched in sulphur (Clode & Marshall, 2003;Cuif et al., 2003) and accordingly, metabolic pathways involving the processing of sulphur compounds of intermediate oxidation states were found in abundance across the whole coral skeleton cross-section (Figure S7).
The carbon, nitrogen and sulphur metabolic pathways inferred through our analysis support the hypothesis that endolithic bacteria can be considered major nutrient recyclers (Fine & Loya, 2002;Moynihan et al., 2022;Sangsawang et al., 2017;Tandon, Ricci, et al., 2022) and by showing how the abundance of these pathways changes across the skeleton depth gradient, we provide new spatial insight into the coral skeleton biogeochemical cycle.Although the pathways extrapolated from our dataset reflect some of the functional potentials of the endolithic microbial community, further studies are needed to assess their spatialtemporal expression in areas of the skeleton characterized by different O 2 and pH gradients.

The ecological microniches of the coral skeleton
Each coral skeleton was characterized by ecological microniches shaped by dynamic O 2 and pH gradients (Figure 4; Figure S6; Table S7), which harboured microbial communities that varied in their composition with depth in the skeleton (Figure 5).PERMANOVA showed that dissolved O 2 concentrations and pH measured in Po. lutea and Pa.benhami skeletons explained the β-diversity of their endolithic bacterial communities (Table S8).Considering these results, we investigated whether the abundance of specific bacterial taxa showed associations with the physicochemical properties of the skeleton, and we found that bacterial ASVs correlated with dissolved O 2 and pH gradients in the CCA biplots in both coral species (Figure 6; Figures S8 and S9; Tables S9 and S10).These results suggest that the overall bacterial community composition and the presence and abundance of certain endoliths were influenced by the physicochemical environment of the skeleton.The spatial heterogeneity of the physicochemical environment differed between the two coral species and was possibly influenced by their skeletal architecture (Figure 4A,C).In Po. lutea, O 2 and pH peaks were constrained to skeletal layers with abundant endolithic algae (Figures 4A,B and 5A; Table S7), suggesting that the more homogeneous and denser skeleton of this species limited gas and solute diffusion and that O 2 and pH peaks were mainly determined by CO 2 fixation.In Pa.benhami, dissolved O 2 concentration approached its peak in skeletal areas with abundant endolithic algae and the shape of the O 2 gradients was possibly determined by the more perforated skeletal architecture of this species (Figures 4C,D and 5B; Table S7).Interestingly, the pH of Pa.benhami increased deeper in the skeleton (Figures 4C,D and 5B), where we found ASVs belonging to Bacillus and Spirochaetaceae (Figure 2H) that may increase the skeletal matrix pH through denitrification (Rust et al., 2000;Tran et al., 2021;Wei et al., 2015), a metabolic pathway that we found at higher counts in Pa.benhami deeper skeletal layers (Figure S7).Both coral species also harboured conspicuous communities of heterotrophic microeukaryotes (Figure 5; Figure S3), which through their metabolism induced deoxygenation and acidification of the skeletal matrix.Decreases in O 2 and pH attributable to the heterotrophic metabolism of the prokaryotic and microeukaryotic communities were particularly evident when the coral skeletons were placed in darkness after a period of illumination (Figure S6).
Increased O 2 and pH values in Po. lutea skeletons correlated with ASVs belonging to the nitrogen fixing genera Spirochaeta and Tistlia (Figure 6A) and in Pa.benhami with Alteromonas and Pseudoalteromonas ASVs that are thought to take part in nitrogen cycling and antibacterial activity (Figure 6B; Shnit-Orland et al., 2012;Ceh, Kilburn, et al., 2013;Ceh, van Keulen, & Bourne, 2013).In Po. lutea, ASVs of the obligate anaerobes Chlorobi correlated with higher O 2 values, suggesting that these bacteria were likely to be found in skeletal layers characterized by higher but still hypoxic O 2 concentrations (Figure 6A).The occurrence of these presumed obligate anaerobes in the presence of O 2 is unexpected, but Chlorobi have been previously reported in coral tissue (Cai et al., 2017) and skeletons with abundant endolithic algae (Marcelino & Verbruggen, 2016).It is possible that in our study, the presence of Chlorobi in hypoxic skeletal layers resulted from their interactions with other holobiont members rather than being a direct response to the O 2 gradients.For instance, it has been proposed that these bacteria could remove toxic H 2 S generated by  and S9 and Tables S9 and S10.
sulphur-reducing bacteria (Cai et al., 2017).Accordingly, we found that predicted sox system pathways (Figure 5A; Figure S7), through which bacteria like Chlorobi oxidize H 2 S (Friedrich et al., 2001), were present in shallower layers of Po. lutea skeletons.In Pa.benhami, ASVs of another presumed strictly anaerobic bacterium, Paramaledivibacter, correlated with elevated O 2 concentrations and higher pH values (Figure 6B).These bacteria have also been found in the tissue of other coral species (Ricci et al., 2022;Santoro et al., 2021), but identification of their physiological requirements in the coral holobiont awaits further investigation.

CONCLUSION
The skeletal microenvironments of Po. lutea and Pa.benhami were characterized by microniches that are shaped by the metabolism of the endolithic microbiome, and these microniches, in turn, harboured divergent microbial communities likely adapted to the physicochemical gradients of the skeleton.The unique skeletal architecture of each coral species influenced the light available to phototrophic endoliths (Enríquez et al., 2005;Marcelino et al., 2013), which through their metabolisms shape the physicochemical environment and ultimately the microbiome.Superimposed onto this, molecules diffuse differently in the compact and dense skeletons of Po. lutea compared with the heterogeneous and perforated skeletons of Pa.benhami (Wu et al., 2009) and contribute to shaping the physicochemical environment.We also note that other important factors, such as the availability of electron donors and acceptors, that take part in structuring the microbial community were not measured in this study.The coral skeleton can be compared with other microbial systems.For instance, microbial metabolism induces abrupt physicochemical changes in stromatolites, with observations reporting shifts from high irradiance and O 2 presence in the outer layers to a predominance of infrared light, absence of O 2 and high H 2 S in the inner layers (Toneatti et al., 2017).These conditions, in stromatolites like in the coral skeleton, force stratification and metabolic adaptations of the microbial community.
With this study, we have started to link the physicochemical, microbial and functional landscapes of the coral skeleton and inferred the involvement of the skeletal microbiome in the holobiont metabolic processes.A more comprehensive picture of the mechanisms governing this intriguing system will be gained by mapping other physicochemical gradients like NH 3 or H 2 S and by characterizing the spatial heterogeneity of biochemical activity taking place across the coral skeleton and the holobiont more broadly.ORCID Francesco Ricci https://orcid.org/0000-0003-2501-6925 ,D).Principal component analysis biplots of the β-diversity of the bacterial communities of Po. lutea (H) Pa.australensis bacterial abundance across samples 20 40 60 % Reads rel.abundance S k e .0 U R E 2 Boxplots show α-diversity indexes, specifically observed diversity (A-, B) and Pielou's evenness (C, D) of the bacterial communities of each skeletal layer of Porites lutea and Paragoniastrea benhami samples.Principal component analysis (PCA) biplots show βdiversity of skeletal layers of Po. lutea (E) and Pa.benhami (F) bacterial communities.Data representing each skeletal layer are colour coded.The heatmaps show the total relative abundance of the 20 most abundant bacterial ASVs in each skeletal layer across every Po.lutea (C; n = 6) and Pa.benhami (D; n = 6) sample.
Hyperspectral imaging data showed apparent absorption in the ranges 600-640 nm (phycobiliproteins), 660-680 nm (Chl a) and 700-740 nm (far-red shifted Chl a, Chl d and/or Chl f ) in the skeletons of both coral species (Figure3; Robertson et al., 2001Hyperspectral reflectance imaging of Porites lutea FRH48 (A) and Paragoniastrea benhami FRH54 (B) skeletons showing their cross-section and spatial distribution of zones with similar reflectance properties.The graphs show the reflectance of each colour coded skeletal zone indicating apparent chlorophyll pigments composition.Scale bars next to the skeletons cross-section are 1 cm.To inspect the hyperspectral reflectance imaging data of each coral skeleton analysed in this study please see Figure S4.et al., 2020) that suggest the presence of oxygenic phototrophs and align with the detection of Chlorophyta, Stramenopiles and Rhodophyta ASVs in our 18S rRNA gene data (Table

F
Pa. benhami FRH52 under ~50 μmol photons m -2 s -Po.lutea FRH48 under ~21 μmol photons m -2 s -1 (B) Data points of each Po.lutea sample O 2 μmol L −1 ~8 O 2 μmol L −1 ~50 O 2 μmol L −1 I G U R E 4 Cross-sections of skeletons, closeup on the skeletal architecture and chemical imaging of O 2 and pH gradients during homogeneous exposure of the cut surface of the samples Porites lutea FRH48 (A) and Paragoniastrea benhami FRH52 (C).Graphs of O 2 and pH (panels A and C) refer to the area underneath the dotted line in the chemical imaging figures.Boxplots show O 2 and pH values measured through chemical imaging in the skeleton of each Po.lutea (B) and Pa.benhami (D).Scale bars of skeletons cross-sections and chemical imaging are 1 cm.Skeletal architecture scale bars are 1 mm.
ti o n N it ri fi c a ti o n D e n it ri fi c a ti o R E 5 Links between microbial community composition, physicochemical gradients and inferred functions of each skeletal layer in samples Porites lutea FRH49 (A) and Paragoniastrea benhami FRH54 (B).Panels (A) and (B) show from left to right the bacterial and eukaryotic microbiome relative abundance, the respective skeletal section, the pH and O 2 gradients measured during homogeneous exposure of the cut surface to incident photon irradiance of $21 μmol photons m À2 s À1 , and sulphur, nitrogen and carbon inferred functional profiles.Microbial groups that include oxygenic phototrophs are indicated with "*".
U R E 6 Canonical correspondence analysis (CCA) biplot representing Porites lutea (A) and Paragoniastrea benhami (B) bacterial communities structure according to the explanatory quantitative variables O 2 and pH (arrows).For CCA biplots showing all the bacterial taxa refer to Figures S8