\documentclass[fleqn,10pt]{wlscirep}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{subcaption}
\usepackage{multirow}

\title{\textsc{Supplementary information}\\
Identification of extracellular vesicles from their Raman spectra via self-supervised learning}

\author[1]{Mathias N. Jensen}
\author[2]{Eduarda M. Guerreiro}
\author[3,4,5]{Agustin Enciso-Martinez}
\author[6]{Sergei G. Kruglik}
\author[7]{Cees Otto}
\author[2,8]{Omri Snir}
\author[1]{Benjamin Ricaud}
\author[1,*]{Olav Gaute Hellesø}
\affil[1]{Department of Physics and Technology, UiT The Arctic University of Norway, Tromsø, Norway.}
\affil[2]{Thrombosis Research Group (TREC), Department of Clinical Medicine, UiT The Arctic University of Norway, Tromsø, Norway.}
\affil[3]{Oncode Institute and Ten Dijke/Chemical Signaling Laboratory, Department of Cell and Chemical Biology, Leiden University Medical Center, Leiden, The Netherlands}
\affil[4]{Amsterdam Vesicle Center, Department of Biomedical Engineering and Physics, Amsterdam University  Medical Centers, Amsterdam, The Netherlands}
\affil[5]{Laboratory of Experimental Clinical Chemistry, Department of Clinical Chemistry, Amsterdam University Medical Centers, Amsterdam, The Netherlands}
\affil[6]{CNRS, Institut de Biologie Paris-Seine, Laboratoire Jean Perrin, Sorbonne University, Paris, France}
\affil[7]{Department of Medical Cell BioPhysics, TechMed Centre, University of Twente, Enschede, The Netherlands}
\affil[8]{Department of Medical Biology, UiT The Arctic University of Norway, Tromsø, Norway}


\affil[*]{olav.gaute.helleso@uit.no}

\begin{abstract}
Extracellular vesicles (EVs) released from cells attract interest for their possible role in health and diseases. The detection and characterization of EVs is challenging due to the lack of specialized methodologies. Raman spectroscopy, however, has been suggested as a novel approach for biochemical analysis of EVs. To extract information from the spectra, a novel deep learning architecture is explored as a versatile variant of autoencoders. The proposed architecture considers the frequency range separately from the intensity of the spectra. This enables the model to adapt to the frequency range, rather than requiring that all spectra be pre-processed to the same frequency range as it was trained on. It is demonstrated that the proposed architecture accepts Raman spectra of EVs and lipoproteins from 13 biological sources and from two laboratories. High reconstruction accuracy is maintained despite large variances in frequency range and noise level. It is also shown that the architecture is able to cluster the biological nanoparticles by their Raman spectra and differentiate them by their origin without pre-processing of the spectra or supervision during learning. The model performs label-free differentiation, including separating EVs from activated vs. non-activated blood platelets and EVs/lipoproteins from prostate cancer patients vs. non-cancer controls. The differentiation is evaluated by creating a neural network classifier that observes the features extracted by the model to classify the samples according to their origin. The classification reveals a test sensitivity of $92.2\%$ and selectivity of $92.3\%$ over 769 measurements from two labs that have different measurement configurations.

\end{abstract}

\begin{document}

\flushbottom
\maketitle

\thispagestyle{empty}

\renewcommand{\thefigure}{S\arabic{figure}}
\renewcommand{\thetable}{S\arabic{table}}

\section*{Sample preparation}

\subsection*{For 'Paris' dataset, sample prepared at UiT The Arctic University of Norway and analysed at Sorbonne University}

Collection of clinical samples has been approved by the regional ethical committee for Medical and Health Research Ethics (REK200825). All participants were above the age of 18, did not suffer from illness, or use medication; all gave a written informed consent. Blood was drawn by venipuncture of the antecubital vein using a 21-gauge needle and minimal stasis. Blood was collected into Vacuette 6 ml Z tubes with no additives (Greiner Bio-One, Kremsmünster, Austria); the first tube was discarded. Acidic citrate dextrose buffer (ACD, 39 mM citric acid, 75 mM sodium citrate, 135 mM [D]-glucose, pH 4.5) and 2,8 mM Prostaglandin E1 (PGE1, MedChemExpress, Monmouth Junction, NJ, USA) were added rapidly to the blood to prevent blood coagulation and platelet activation, respectively. In addition, 3 ml of blood were drawn into K2EDTA Vacuette tubes (Greiner Bio-One, Kremsmünster, Austria) for cell count and analysis using an ABX MicrosES60 (ABX Diagnostics, Montpellier, France). Following addition of ACD and PGE1, blood was centrifuged at 140 xg for 15 min with no breaks (room temperature) using a Megafuge 1.0 (Heraeus Sepatech) centrifuge equipped with a swing bucket rotor BS4402/A to generate platelet rich plasma (PRP). 

Platelet pellets were recovered from PRP following centrifugation at 900 xg for 15 min at room temperature, washed twice with HEPES-NaCl buffer (10 mM HEPES, 0.85\% NaCl, pH 7.4) and 2.8 mM PGE1, and resuspended in Tyrode-HEPES buffer (10 mM HEPES, 0.85\% NaCl, 1 mM MgCl2, 2 mM CaCl2, 3 mM KCl, pH 7.4). Platelets (250x106 in 1 ml Tyrode-HEPES buffer) were stimulated with 100 µM thrombin receptor activator peptide 6 (TRAP-6, MedChemExpress, Monmouth Junction, NJ, USA) or 2 µM calcium ionophore A23187 (Sigma-Aldrich, USA) and incubated for 15 min at 37°C. Saline was added for time-matched unstimulated control platelets. Following 15 min, EDTA was added to platelet suspensions (activated and time-matched control) at a final concentration of 10 mM to stop platelet activation and platelets were sedimented at 2,500 xg for 10 min at room temperature. Supernatant was transferred to a new tube before proceeding with isolation of platelet-Evs, and the platelet pellets were resuspended in 1\% paraformaldehyde (PFA) in PBS for assessment of platelet activation by flow cytometry. Platelet derived (micro)particles, hereafter referred to as platelet-Evs, were isolated from supernatant by centrifugation at 20,000 xg for 30 min at 4°C, using a 5810R Eppendorf centrifuge with a fixed angle rotor FA-45-30-11. EV pellets were resuspended in 1/10 of their initial volume (i.e., 10x concentrated) in a buffer suitable for the respective downstream analysis. 

\subsection*{For 'Twente' dataset, sample prepared and analysed at University of Twente}
\textbf{Plasma from healthy donors and cancer patients}

Blood was obtained from non-fasting healthy donors and mCRPC patients (both N=5) after written informed consent in accordance with the Helsinki Declaration and approved by the medical-ethical assessment committee of the Academic Medical Center, University of Amsterdam (NL 64623.018.18). Refer to Table S1 for donors clinical data. Whole blood was collected from each donor using a 21G needle, and the first vacutainer was discarded. Next, three citrate vacutainers of 2.7 mL (BD Biosciences, San Jose, CA) were collected and mixed gently by inversion. The vacutainers were centrifuged at 2500 g for 15 minutes at 20 °C without brake (Rotina 380R, Hettich, Tuttlingen, Germany). Plasma was collected up to 0.5 cm above the pellet, pooled and centrifuged in a conical base tube (10 mL; Sarstedt, Nimbrecht, Germany) at 2500 g for 15 minutes at 20 °C. The supernatant was deposited in aliquots of 75 µL (Sarstedt), which were snap frozen in liquid N2 and stored at 80 °C until use. Samples were thawed in a water bath at 37 °C immediately before use.

\textbf{Lipoprotein particles (LPs)}
Human high density lipoprotein (HDL), low density lipoprotein (LDL), very low density lipoprotein (VLDL) and chylomicrons (CM) were acquired from Sigma-Aldrich Chemie N. V. (The Netherlands). HDL (Cat. No.: L8039), LDL (Cat. No.: 437644), VLDL (Cat. No.: 437647) and CM (Cat. No.: SRP6304) had a purity of $\geq 95\%$ by electrophoresis, as specified by the provider.

\textbf{LNCaP-derived EVs}
Cells from the prostate cancer cell line LNCaP (ATCC, CRL-1740, USA) were cultured at 37°C and 5\% CO2 in RPMI-1640 with L-glutamine medium (Lonza, Cat. No.: 12-702F) supplemented with 10\% (v/v) fetal bovine serum (FBS), 10 units/mL penicillin and 10 mg/mL streptomycin. Cells were seeded at a density of 10,000 cells/cm2 as recommended by ATCC and medium was refreshed every second day. At 80-90\% confluence, cells were washed three times with phosphate buffer solution (PBS) and cultured in FBS-free RPMI-1640 with L-glutamine medium (Lonza, Cat. No.: 12-702F) supplemented with 1 unit/mL penicillin and 1µg/mL streptomycin. After 2-3 days of culture, cell supernatant was collected in a 15 mL tube (Cellstar® tubes, Grenier Bio-one BV, Alphen a/d Rijn, The Netherlands) and centrifuged at 500 g at room temperature for 10 minutes (centrifuge 5804, Eppendorf, Hamburg, Germany). Next, the supernatant containing LNCaP-derived EVs was collected and stored in aliquots (Greiner Bio-one) at -80 °C until use. Samples were thawed in a water bath at 37 °C immediately before use. LNCaP-derived EVs are referred to as LNCaP EVs throughout the text.

\textbf{Red blood cell (RBC) - derived EVs}
RBC-derived EVs were obtained from RBC concentrate (150 mL, Sanquin Bloodbank, Amsterdam, The Netherlands) and diluted 1:1 with filtered PBS. Samples were centrifuged three times at 1560 g for 20 minutes at 20 °C (Rotina 46RS centrifuge, Hettich, Tuttlingen, Germany). The supernatant containing EVs was pooled and distributed in aliquots of 50 µL, which were snap frozen in liquid N2 for 15 minutes and stored in aliquots (Sarstedt) at -80 °C until use. Samples were thawed in a water bath at 37 °C before use. RBC-derived EVs are referred to as RBC EVs throughout the text.

\textbf{For other particles used from Twente, see the methods-section of Martinez \textit{et al.}\cite{Martinez:20}}

\begin{table}[ht]
\caption{Clinical data on the cancer patients afflicted with Metastasized castration-resistant cancer (mCRPC) and control donors.}
\begin{tabular}{|l|lllllllllll|}
\hline
Subject               & Date of                  & Date of CRPC             & \multirow{2}{*}{Treatment} & \multirow{2}{*}{Age} & \multirow{2}{*}{PSA*} & \multirow{2}{*}{LDH}   & \multirow{2}{*}{ALP} & \multirow{2}{*}{tChol} & \multirow{2}{*}{HDL}  & \multirow{2}{*}{LDL}  & \multirow{2}{*}{TGL}  \\
                      & diagnosis                & diagnosis                &                            &                      &                      &                        &                      &                        &                       &                       &                       \\ \hline
\multirow{2}{*}{Pt 1} & \multirow{2}{*}{05/2017} & \multirow{2}{*}{10/2018} & Abiterone                  & \multirow{2}{*}{66}  & \multirow{2}{*}{0.6} & \multirow{2}{*}{202.9} & \multirow{2}{*}{1.6} & \multirow{2}{*}{3.89}  & \multirow{2}{*}{1.27} & \multirow{2}{*}{2.13} & \multirow{2}{*}{1.08} \\
                      &                          &                          & Prednisone                 &                      &                      &                        &                      &                        &                       &                       &                       \\
Pt 2                  & 2006                     & 04/2018                  & Enzalutamide               & 86                   & 3.4                  & 165.4                  & 1.4                  & 5.44                   & 1.57                  & 3.24                  & 1.41                  \\
\multirow{2}{*}{Pt 3} & \multirow{2}{*}{2000}    & \multirow{2}{*}{04/2018} & Abiterone                  & \multirow{2}{*}{75}  & \multirow{2}{*}{1.2} & \multirow{2}{*}{175.6} & \multirow{2}{*}{5.0} & \multirow{2}{*}{3.14}  & \multirow{2}{*}{1.37} & \multirow{2}{*}{1.39} & \multirow{2}{*}{0.86} \\
                      &                          &                          & Prednisone                 &                      &                      &                        &                      &                        &                       &                       &                       \\
Pt 4                  & NA                       & NA                       & NA                         & 77                   & 17.6                 & 165.3                  & 3.3                  & 5.45                   & 2.22                  & 2.82                  & 0.92                  \\
Pt 5                  & NA                       & NA                       & NA                         & 82                   & 10.4                 & 240.3                  & 6.4                  & 5.75                   & 1.36                  & 3.59                  & 1.78                  \\ \hline
HD min                & NA                       & NA                       & NA                         & 19                   & NA                   & 125.8                  & 1.2                  & 3.45                   & 0.93                  & 1.81                  & 0.42                  \\
HD max                & NA                       & NA                       & NA                         & 40                   & NA                   & 270.3                  & 3.2                  & 4.38                   & 1.45                  & 2.47                  & 1.93                  \\ \hline
\end{tabular}\\
Pt: patient, HD: healthy donor (N=5), PSA: prostate specific antigen *last determined PSA level before inclusion\\ LDH: Lactate dyhydrogenase (U/L 37C), ALP: Alkaline phospatase (U/L 37C), tChol: total cholesterol (mmol/L)\\ HDL: high density lipoproteins (mmol/L), LDL: low density lipoproteins cholesterol (mmol/L), TGL: Triglyceride (mmol/L).
\end{table}



\newpage
\section*{Dataset}
\begin{table}[ht]
\centering
\caption{Overview of samples in the data set with  number of samples, distribution and ranges. The heterogenity in frequency range is clear, with some having a range of approximately 3300 cm$^{-1}$ and some with a range of approximately 1700 cm$^{-1}$. There is also a large variability in the number of samples for each of the origins, with 898 cancer patient derived particles and only 19 high density lipoproteins.}
\label{tab:SamOrig}
\begin{tabular}{|l|l|l|l|l|}
\hline
Origin/Properties         & Subspecies        & $N_{samples}$ & $\tilde \nu$ min (cm$^{-1}$) & $\tilde \nu$ max (cm$^{-1}$) \\ \hline
Plasma                    &                   & 153           & 301                          & 3672                         \\ \hline
Cancer ctrl.              &                   & 745           & 300                          & 3652                         \\ \hline
Cancer                    &                   & 898           & 300                          & 3652                         \\ \hline
RBC                       &                   & 56            & 300                          & 3668                         \\ \hline
\multirow{4}{*}{Platelet} & Ctrl. (Paris)     & 82            & 307                          & 2036                         \\ \cline{2-5} 
                          & Act. A23 (Paris)  & 77            & 308                          & 2035                         \\ \cline{2-5} 
                          & Act. Trap (Paris) & 81            & 307                          & 2035                         \\ \cline{2-5} 
                          & Mixed (Twente)    & 184           & 300                          & 3671                         \\ \hline
THP                       &                   & 41            & 315                          & 2041                         \\ \hline
LNCaP                     &                   & 74            & 300                          & 3673                         \\ \hline
PC3                       &                   & 94            & 300                          & 3668                         \\ \hline
CM                        &                   & 64            & 300                          & 3648                         \\ \hline
HDL                       &                   & 19            & 300                          & 3652                         \\ \hline
LDL                       &                   & 47            & 302                          & 3652                         \\ \hline
VLDL                      &                   & 69            & 300                          & 3648                         \\ \hline
\end{tabular}
\end{table}
\newpage
\section*{Architecture}
\begin{table}[ht]
\caption{The final architecture of the encoder and decoder with the total number of parameters.}
\centering
\begin{tabular}{|l|l|l|l|l|l|}
\hline
Element                                        & Block                & Layers & Filters & Width & Parameters \\ \hline
\multirow{5}{*}{Encoder}                       & Conv. Block E1       & 6      & 32      & 5     & 30 912     \\
                                               & Conv. Block E2       & 6      & 64      & 3     & 74 112     \\
                                               & Conv. Block E3       & 4      & 128     & 3     & 197 120    \\
                                               & Feed forward EFreq.  & 3      & 64      & 1     & 8 704      \\
                                               & Feed forward E       & 4      & 512     & 1     & 2 475 571  \\ \hline
                                               & Latent space         & 1      & 1       & 110   & 0          \\ \hline
\multicolumn{1}{|c|}{\multirow{5}{*}{Decoder}} & Feed Forward DFreq.1 & 3      & 64      & 1     & 9 024      \\
\multicolumn{1}{|c|}{}                         & Feed forward D       & 4      & 512     & 1     & 872 448    \\
\multicolumn{1}{|c|}{}                         & Feed Forward DFreq.2 & 1      & 5       & 1     & 30         \\
\multicolumn{1}{|c|}{}                         & Conv. Block D1       & 2      & 64      & 3     & 12 992     \\
\multicolumn{1}{|c|}{}                         & Conv. Block D2       & 3      & 32      & 3     & 22 656     \\ \hline
Classifier                                     & Feed forward C       & 5      & 128     & 1     & 78 976     \\ \hline
\end{tabular}
\end{table}

\newpage
\section*{Supplementary results}
\subsubsection*{Reconstruction}
\begin{figure}[ht]  
    \centering
    \begin{subfigure}[b]{0.45\linewidth}
        \centering
        \includegraphics[width=\linewidth]{graphics/pca_rec.png}
        \caption{Reconstruction by principal component analysis.}
        \label{fig:rec_ex}
    \end{subfigure}
    \begin{subfigure}[b]{0.45\linewidth}
        \centering
        \includegraphics[width=\linewidth]{graphics/Rec/Net1.png}
        \caption{Reconstruction by a simple autoencoder model without skip or explicit frequency range consideration.}
        \label{fig:rec_base}
    \end{subfigure}
    \caption{Reconstruction performance of comparative methods. The PCA reconstruction shown in a) is limited to 100 components, same as the autoencoder, and results in the reconstruction being highly accurate, but also preserves a significant amount of noise. For the autoencoder reconstruction shown in b) it is shown that the accuracy is high, and the process eliminates a significant amount of noise but the lack of adaptivity to frequency removes a significant portion of the spectra.}
    \label{fig:rec}
\end{figure}
\newpage
\subsubsection*{Clustering}
\begin{figure}[ht]
    \centering
    \includegraphics[width=0.75\linewidth]{graphics/PCA_full.png}
    \caption{t-SNE projection of PCA components for test data. The particle origins cluster chaotically, forming several smaller clusters, notably the smeared cluster at the center bottom which reflect samples from Paris. The clusters are highly intermixed, similar to the autoencoder results, but the PCA results are more spread out. See especially the particles from PC3,LNCaP, and THP-1 which are differentiated by the PCA despite their intrinsic similarity and unlike the autoencoder, which recognizes them as similar.}
    \label{fig:tsne_pca}
\end{figure}

\newpage 
\begin{figure}[h!]
    \centering
    \begin{subfigure}[b]{0.45\linewidth}
        \centering
        \includegraphics[width=\linewidth]{graphics/tsne_cell_mark.png}
        \caption{}
        \label{fig:tsne_cell}
    \end{subfigure}
    \begin{subfigure}[b]{0.45\linewidth}
        \centering
        \includegraphics[width=\linewidth]{graphics/tsne_lip_mark.png}
        \caption{}
        \label{fig:tsne_lip}
    \end{subfigure}
    \begin{subfigure}[b]{0.45\linewidth}
        \centering
        \includegraphics[width=\linewidth]{graphics/tsne_bld_mark.png}
        \caption{}
        \label{fig:tsne_bld}
    \end{subfigure}
    \caption{t-SNE projection of the latent space for the autoencoder and for various selections of EVs and nanoparticles. The cultivated cells shown in a) exibit good separation of the LNCaP cells (cluster 3) from the remaining, but shows significant overlap between the PC3 and THP cells (clusters 1 and 2). The lipoproteins shown in b) demonstrate good separation of the HDL (cluster 3) and VLDL (cluster 1) lipoproteins, but some of the VLDL particles are mixed with the CM and HDL (cluster 2). The blood elements shown in c) exhibit excellent separation between the plasma and RBC particles, with no overlap.}
    \label{fig:Rec}
\end{figure}

\newpage

\subsubsection*{Classification}
\begin{figure}[h!]  
    \centering
    \begin{subfigure}[b]{0.6\linewidth}
        \includegraphics[width=\linewidth]{graphics/CM_virgin_per.png}
        \caption{Confusion matrix for unaltered test data.}
        \label{fig:con_virgin}
    \end{subfigure}
    \begin{subfigure}[b]{0.6\linewidth}
        \centering
        \includegraphics[width=\linewidth]{graphics/CM_clip_per.png}
        \caption{Confusion matrix for randomly clipped test data}
        \label{fig:con_clip}
    \end{subfigure}
    \label{fig:conmat}
\end{figure}
\newpage
\begin{figure}[ht]\ContinuedFloat
    \centering
    \begin{subfigure}[b]{0.6\linewidth}
        \centering
        \includegraphics[width=\linewidth]{graphics/CM_noise_per.png}
        \caption{Confusion matrix for test set with clipped and noisy test data.}
        \label{fig:con_noise}
    \end{subfigure}
    \caption{Confusion matrices for noise augmented test sets. The percentages are given by the number of true labels, e.g. 66$\%$ RBC indicates that 66$\%$ of the true RBC samples are classified as RBC by the model. The confusion matrix in a) shows the results of classification on the source data of the test set, without any artificial distortion or noise. The confusion matrix in b) shows the results of classification on the test set augmented with random clipping of the spectra, as was done to the training set during learning. The results show a general reduction in accuracy due to increased misclassification, indicated by yellow, but remains generally good, indicated by the green on the diagonal. The confusion matrix in c) shows the result of classification on the test set augmented with random clipping, intensity noise, and frequency distortion in the same manner as the training set during learning. The accuracy is further reduced, indicated by the orange and yellow, due to increased misclassification. The colors indicates the percentage correct predictions, with yellow for 1$\%$ to 25$\%$ correct, orange for 25$\%$ to 50$\%$ correct, and green for more than 75$\%$ correct prediction.}
\end{figure}
 
\newpage
\bibliography{Src}

\end{document}