*2.1. Materials*

Double-side polished, boron-doped silicon wafers (〈100〉, 0.8–0.9 m Ω cm, 380–400 μm) were purchased from Sil'tronix Silicon Technologies (France). Aqueous hydrofluoric acid (HF, 49%) was acquired from Chem-Lab, NV (Belgium), and absolute ethanol was obtained from VWR Chemicals (France). Phosphate buffered saline (PBS, 0.01 M phosphate, pH 7.4) and lysostaphin were purchased from Sigma-Aldrich (USA).

#### *2.2. Fabrication of Porous Silicon Layers*

The PSi layer samples were prepared by the electrochemical etch of a heavily doped *p*-type silicon substrate. The etching was carried out in a custom-made Teflon® single bath etch-cell, with a platinum coil as the counter-electrode and a potentiostat/galvanostat (PGSTAT302N from Metrohm Belgium) as the current source. The porosification was performed in HF:ethanol (3:1, in volume) electrolyte. The first step of the anodization consisted in etching a sacrificial layer at 200 mA/cm<sup>2</sup> for 30 s and removing it with a 2 M solution of KOH until no more reaction was visible. This sacrificial layer removes the transitional layer and obtains a more homogeneous pore size with depth. The sample was then rinsed once in deionized water and twice in 2-propanol before being etched again at 200 mA/cm<sup>2</sup> for 50 s. The porous samples were thermally oxidized in an oven for 30 min at 350 ◦C under an oxygen flow (1.2 L/min).

#### *2.3. Fabrication and Characterization of Porous Silicon Membranes*

Figure 1 sketches the process flow, which was inspired by the work from Zhao et al. [34]. First, 3-in. highly doped *p*-type silicon wafers were cleaned in a freshly prepared piranha solution (H2O2:H2SO4, 2:5), followed by two immersions in continuously flowing deionized (DI) water during 20 min. Afterwards, 500 nm of silicon nitride (Si3N4) was deposited using Plasma Enhanced Chemical Vapor Deposition (PECVD). To improve the chemical resistance of the nitride layer to HF, the wafers were annealed at 900 ◦C in ambient air for 3 h. A first i-line optical lithography with positive resist (AZ® MiRTM 701, MicroChemicals GmbH) provided masking for the subsequent Reactive Ion Etching (RIE) of the silicon nitride layer. The patterned nitride layer itself served as a mask during the electrochemical etch of the silicon. The porosification followed the same protocol as explained in Section 2.2, but used three different current densities in order to obtain different porosities: the sensing layer was etched at 200 mA/cm<sup>2</sup> for 50 s. This was followed by a 1500 s-etch at 50 mA/cm2, making a thick optical contrast layer characterized by lower porosity, enabling the reflection of the light required for the RIFTS method; finally, a thick mechanical support layer was etched at 100 mA/cm2. The current densities chosen for each layer have been optimized such as to guarantee a good mechanical stability and optical signal, while retaining pores large enough for the flow-through operation. The porous multilayers were passivated by thermal oxidation, for 30 min at 350 ◦C under an oxygen flow of 1.2 L/min. A second optical lithography was then performed on the backside of the wafers, where a thick positive resist (AZ® 9260, MicroChemicals GmbH) was patterned in alignment with the frontside. The thick resist served as a mask during the final step of the process, the deep reactive ion etching (DRIE) of the backside of the wafer, until the porous silicon was visible and the membranes were open.

The entire fabrication process was performed in less than a week, and could be repeated several times. Slight variations in the porous structures can happen, which can be linked to the manual positioning of the platinum electrode.

The membranes were characterized using scanning electron microscopy (SEM), both in cross section and in top view. Based on the top views, the pore size distribution could be analyzed using the ImageJ software. The porosity of each layer was determined using the spectroscopic liquid infiltration method (SLIM). In brief, the optical spectrum of a porous layer was recorded both in air and in ethanol. Using the RIFTS method described above, the EOT was calculated. Knowing the refractive indices of air, ethanol and silicon, these

data were then fitted using a two-component Bruggeman effective medium approximation in order to obtain an approximation of the open porosity and the layer thickness. The experimental set up used for the SLIM method consisted in a fiber-coupled Ocean Optics JAZ spectrometer and a halogen light source.

Using the EOT measured in both air and ethanol allowed to approximate the theoretical sensitivity of the biosensor [10,31].

**Figure 1.** Schematic illustration of the process flow for the fabrication of a porous silicon membrane. Starting from a cleaned 3" highly doped silicon wafer, the process goes through the following steps: deposition of Si3N4 layer using Plasma Enhanced Chemical Vapor Deposition (PECVD) and annealing; positive photolithography on the frontside; opening of the nitride layer using Reactive Ion Etching (RIE); formation of the porous silicon layer by anodization; passivation by thermal oxidation; positive photolithography on the backside; and finally opening of the membrane using Deep Reactive Ion Etching (DRIE).

#### *2.4. PlyB221 Endolysin Expression and Purification*

A detailed description of the expression and purification of PlyB221 endolysin can be found elsewhere [42]. The protein concentration was adjusted to 1 mg/mL.

#### *2.5. Bacterial Strains, Growth Conditions*

*B. cereus ATCC 10987* was used as reference strain and *S. epidermidis* ATCC 35984 as negative control in the PlyB221 endolysin experiments. *S. epidermidis* ATCC 35984 was also used as target when lysostaphin was applied as selective lytic agent. Bacteria were grown overnight (O/N) in Lysogeny Broth (LB) or LB-agar plates at 30 ◦C for *B. cereus* and in Tryptic Soy Broth (TSB) or Tryptic Soy Agar (TSA) plates at 37 ◦C for *S. epidermidis*. In brief, 20 mL of LB or TSB were inoculated with 200 μL of each culture and incubated for 3 h at 30 ◦C (*B. cereus*) or 37 ◦C (*S. epidermidis*). The cultures were then centrifuged at 10,000× *g* for 5 min at room temperature and the supernatants were resuspended in 20 mL of PBS. This washing step was repeated once over and the optical density (OD600) was adjusted to OD600 = 0.2 (~10<sup>6</sup> CFU/mL) for *B. cereus* and OD600 = 0.02 (~10<sup>6</sup> CFU/mL) for *S. epidermidis*. For the determination of the limit of detection, the *B. cereus* suspension was diluted 10 times twice, in order to obtain concentrations of ~10<sup>5</sup> CFU/mL and ~10<sup>4</sup> CFU/mL.

#### *2.6. Lysate Observation and Characterization*

*B. cereus suspension* and lysate were captured on a silicon surface to enable their observation using SEM. *A B. cereus* suspension was prepared as described above and adjusted to the concentrations of ~10<sup>6</sup> CFU/mL. The lysate was prepared by adding 600 μL of PlyB221 endolysin (1mg/ml) to 5.4 mL of bacterial suspension and by incubating this mixture and 30 ◦C for 30 min. Silicon dies of dimension 1 cm × 1 cm were place inside a 12 wells plate. The wells were filled with 2 mL of one of three solutions: a control solution consisting of PBS, the *B. cereus* suspension or the *B. cereus* lysate. The 12 wells plate was then incubated at 30 ◦C for 1 h, after which each die was rinsed 5 times in PBS by removing and adding 1 mL of PBS. After the last PBS wash, 1 mL of solutions remained in each well. A glutaraldehyde solution was added to each well in order to reach a final concentration of 2.5 %. The 12 wells plate was left at room temperature for 1 h, enabling the crosslinking of the bacterial cell walls. The samples were then washed three times with PBS using the same technique as explained before, making sure that the dies were never exposed to air. For the dehydration, the samples were then immersed in DI water solution of increasing ethanol content (25%, 50%, 75%, and finally 99.9%). Each immersion lasted 10 min. The silicon dies were then dried overnight at 58 ◦C. Directly before SEM observation, the samples were covered with a ~10 nm-thick layer of gold to prevent charging effects. The images were then analyzed with ImageJ to obtain information about the number and size of the bacteria and bacteria lysate.

#### *2.7. Experimental Setup and Optical Reflectivity Measurements*

PSiM samples were integrated in a custom-built polycarbonate fluidic cell. A fibercoupled Ocean Optics JAZ spectrometer and a 10-mW halogen light source were used to record reflectivity spectra. Data were recorded every 10 s, with a spectral acquisition time of 1s over a wavelength range of 500–800 nm. Analytes were injected at flow speed of 15 to 20 μL/min using a Fluigent LINEUP ™ fluidic set up. The obtained optical data were analyzed using the RIFTS method in order to obtain the effective optical thickness, EOT = *2 nL*, with *n* being the refractive index and *L* the porous layer thickness. The relative change in EOT overtime was computed as a percentage, such that

$$\frac{\Delta EOT}{EOT\_0} = \frac{EOT\_t - EOT\_0}{EOT} \times 100 [\%].$$

The significance of the relative EOT shift was then established using a Student's t-test with a 5% confidence level, with a negative control test in PBS as reference.

#### *2.8. Real-Time Detection of B. cereus in PBS on PSi Layer and PSi Membranes*

The protocol for bacteria detection on a PSi membrane is illustrated in Figure 2. First 500 μL of purified PlyB221 endolysin were added to 4.5 mL of exponential phase *B. cereus* resuspended in PBS, so as to reach a final protein concentration of 100 μg/mL. The 5 mL final volume was sufficient for at least 4 detections. The suspension was then incubated for 30 min at 30 ◦C. Before flowing the bacterial lysate, PBS solution was injected at 15 to 20 μL/min for 60 min and reference measurements were performed. *B. cereus* lysate suspensions were injected at the same flow speed. Optical measurements were carried out every 10 s for 60 min. The relative EOT was then extracted from these measurements using the method described above. A control test, with only the PlyB221 endolysin at the same concentration was also performed on both types of sensors, following the same protocol described previously. For all tests, measurements were performed at least 3 times.

**Figure 2.** Protocol of bacteria detection through their lysate: (**1**) lysis of the bacteria using a selective endolysin, (**2**) incubation for 30 min and (**3**) optical detection on a porous silicon membrane.

#### *2.9. Specificity Testing: Detection of S. epidermidis in PBS with the PlyB221 Endolysin on PSi Membranes*

For this experiment, two tests were performed: a negative one using a *S. epidermidis* suspension and a positive control using a complex sample containing both *S. epidermidis* and *B. cereus*. For each test, 4.5 mL of bacterial suspension were incubated for 30 min at 30 ◦C with the 500 μL of PlyB221 endolysin (1 mg/mL). This final volume was sufficient for at least 4 detections. Reference measurements in PBS were performed for 5 to 15 min. The bacterial suspension was injected at a flow speed of 15 to 20 μL/min and optical measurements were performed every 10 s for 60 min. The relative EOT shift was computed as described previously.

#### *2.10. Versatility of the Platform: Detection of S. epidermidis in PBS with Lysostaphin on PSi Membranes*

In this experiment, a different lytic enzyme-bacteria pair was tested. *S. epidermidis* was selected as the targeted strain and lysostaphin was chosen as selective agent. This glycyl-glycine endopeptidase is specific of the pentaglycine bridges present in the cell wall of certain Staphylococci. For the detection experiments, 1 mg of commercialized lysostaphin was diluted in 1 mL of PBS supplemented with 30% of glycerol to reach a concentration of 20 μM. For the lysis, 150 μL of this 20 μM lysostaphin was added to 2.850 mL of bacterial suspension, yielding a final endolysin concentration of 1 μM [4]. The suspension was then incubated at 37 ◦C for 30 min. Reference measurements in PBS and in lysostaphin suspensions were performed for 1 h each. The bacterial suspension was injected at a flow speed of 15–20 μL/min and optical measurements were performed every minute for 60 min. The relative EOT shift was computed as described previously.
