Healthy donors and MG patient samples
The study was approved by the Ethics Commission Zurich, Switzerland. MG patients (n = 21 healthy controls and n = 38 MG patients) were recruited and upon written informed consent blood and thymus samples were obtained at the Neuromuscular Center and the Department of Thoracic Surgery of the University Hospital Zurich, Switzerland. PBMC and serum samples were isolated at the University of Zurich within 12 h of blood collection. Fresh thymus tissue was obtained from patients undergoing elective thymectomy, in which thymus is routinely discarded (n = 6 non-MG controls versus n = 5 MG patients). Furthermore, we retrospectively examined formalin-fixed thymectomy samples provided by the tissue biobank of the Department of Pathology (University Hospital Zurich) by multiplexed immunofluorescence (Supplementary Data 3; n = 6 non-MG controls and n = 13 MG patients). Standard histopathological analysis of thymus tissue was performed by a clinical pathologist independent of the study. Samples from both sexes were included in the study. Ages ranged from 23 to 91 years. Diagnosis of MG was based on typical clinical symptoms, a positive anti-AChR antibody test in the serum, a positive electrophysiological measurement, and response to treatment with acetylcholinesterase inhibitors. The diagnosis was confirmed by a neurologist with experience in the care of these patients. No seronegative or anti-MuSK-positive MG patients were included in the study. Healthy controls were age- and sex-matched, had no evidence of acute or chronic infection and were not receiving immunomodulatory therapy. In addition, patients with an (incidental) thymic mass or thymoma and without MG were included in the study (Supplementary Data 2). For the blood comparison of MG patients to healthy controls, only patients that were not treated with immunomodulatory drugs or thymectomy were considered (n = 21 healthy controls and n = 22 MG patients). For correlations with the patients’ clinical disease, severity exclusively untreated MG patients (excluding symptomatically treated patients; n = 12) were considered and the continuous relative quantitative Besinger score was used as a measure of disease severity . The Besinger score is a quantitative MG scoring system that has been adapted and slightly expanded by the MG Foundation of America (MGFA) Task Force for therapy studies (QMG score)  and contains similar sub scores (except hand-held dynamometer measurements). When using disease severity as a categorical value, patients demonstrating a relative Besinger score ≥ 0.5 were considered as having high disease severity. For the comparison of thymectomy and/or azathioprine-treated/untreated MG patients, only patients that did not receive further immunomodulatory treatment were considered for the analysis (n = 20 non-thymectomized versus n = 4 thymectomized; n = 27 azathioprine-untreated versus n = 12 azathioprine-treated).
Serum anti-AChR autoantibody level measurement
Serum patient anti-AChR autoantibodies were measured at the Department of Clinical Immunology (University Hospital, Zurich) using an 125I radioimmunoassay based on reactivity against fetal and adult nicotinic AChR (DLD Diagnostika), as part of the routine diagnostic procedure.
Leukocyte isolation from blood and thymic tissue
Blood samples were diluted in PBS and PBMC fraction was isolated using SepMate 50 tubes (Stemcell Technologies) and human Lympholyte Separation Medium (Cedarlane). To ensure comparability with PBMC samples, a similar protocol for thymic leukocyte isolation was chosen. In brief, thymic tissue was placed on ice immediately after surgery and processed. A single-cell suspension was achieved by cutting the tissue using a scalpel and syringes. The cell suspension was washed and the leukocyte fraction isolated by density gradient centrifugation using human Lympholyte Separation Medium (Cedarlane). The resulting lymphocyte fraction was washed, cryopreserved in 10% DMSO in fetal calf serum (FCS; Biochrom) and stored in the vapor phase of a liquid nitrogen tank until further analysis.
Ex vivo reactivation of PBMCs
Short-term reactivation of cryopreserved PBMCs or thymic leukocytes and subsequent cytometry analysis were performed as described previously . In short, leukocytes were stored in liquid nitrogen and thawed in a 37 °C water bath before use. Cells were resuspended in cell culture medium [RPMI-1640, 10% FCS (Biochrom), and 1 × l-glutamine and 1 × penicillin/streptomycin (both Life Technologies)] supplemented with 1:10,000 benzonase (Sigma–Aldrich), centrifuged (300×g, 7 min; 24 °C) and washed twice with cell culture medium. Samples then underwent antibody labeling, or in the case of intracellular cytokine detection, were rested overnight at 37 °C and restimulated with 50 ng ml−1 phorbol 12-myristate 13-acetate (Sigma–Aldrich) and 500 ng ml−1 ionomycin (Sigma–Aldrich) in the presence of 1 × Brefeldin A and 1 × Monensin (both BD Biosciences) for 4 h at 37 °C before surface marker antibody labeling, fixation, permeabilization and intracellular cytokine antibody labeling.
For mass cytometry, monoclonal anti-human antibodies (Supplementary Table 1) were purchased either conjugated to heavy-metal isotopes (Fluidigm) or were conjugated in house using the MaxPar X8 chelating polymer kit (Fluidigm). Flow cytometry antibodies were purchased already conjugated to the specified fluorochromes (Supplementary Table 2).
Live cell barcoding for mass cytometry
To reduce inter-sample staining variability, minimize sample-handling time, and reduce instrument performance-based signal variation, we made use of a combinatorial live-cell barcoding approach using differentially conjugated anti-CD45 mAbs (Biolegend). MaxPar X8 polymers (Fluidigm) were loaded with six different palladium isotopes (102Pd, 104Pd, 105Pd, 106Pd, 108Pd, and 110Pd) and one indium isotope (115In; all from Trace Sciences International) and conjugated to anti-human CD45 mAbs (BioLegend). To exclude doublets and prevent misidentification of barcodes during debarcoding, a restricted 7-choose-3 approach was applied, resulting in 35 barcodes per mass cytometry run. Independent mass cytometry runs contained equal ratios of MG patients and healthy controls and were subject to randomization with regards to treatment, sex, and age. PBMCs were labeled with heavy metal-tagged CD45 antibodies after ex vivo reactivation at 37 °C for 25 min in cell-staining medium (CSM; RPMI-1640, 4% FCS) on an orbital shaker (500 rpm). Samples were washed twice in CSM and combined into a single reaction vessel for surface marker and cytokine detection.
Surface and intracellular cytokine detection by mass cytometry
The barcoded sample convolute was labeled in 400 μl CSM containing the antibody mix directed against surface markers for 40 min at 37 °C on an orbital shaker (500 rpm). For dead cell discrimination, 2.5 μM cisplatin (Sigma-Aldrich) was added for 2 min on ice.
For transcription factor detection, the sample convolute was fixed and permeabilized for 40 min at 4 °C in 1X FOXP3 Fixation/Permeabilization Buffer (BioLegend). Sample was washed in permeabilization buffer [(PBS, 0.5% saponin, 2% bovine serum albumin (BSA), 0.01% sodium azide (all Sigma-Aldrich)] and nuclear staining was performed in 400 μl permeabilization buffer for 1 h at 4 °C.
For intracellular cytokine detection the sample convolute was fixed in 1.6% paraformaldehyde (Electron Microscopy Sciences) for 1 h at 4 °C. The convolute was washed with permeabilization buffer and labeled with antibodies recognizing intracellular cytokines in 400 μl permeabilization buffer for 1 h at 4 °C.
In both the cases, the labeled and stained sample mix was washed and resuspended in 1X iridium intercalator solution (Fluidigm) followed by a 4 °C incubation overnight. Finally, the sample was washed twice with PBS and twice with MaxPar water (Fluidigm) before data acquisition.
Flow cytometry sample labeling and data acquisition
Flow cytometry labeling was performed similarly as for mass cytometry. In brief, samples were labeled with 100 μl of a fluorochrome-conjugated antibody mix in PBS for 20 min at 4 °C and washed twice in PBS. For intracellular cytokine detection, samples were fixed for 20 min at 4 °C using 100 μl Cytofix/Cytoperm (BD Biosciences). Cytokine staining was performed in 100 µl antibody mix in permeabilization buffer at 4 °C overnight. Samples were washed twice and acquired at a Cytek Aurora Spectral Analyzer (Cytek Bioscience). Quality control on a daily basis ensured reliability and reproducibility of the machine’s performance.
Compensation matrix was corrected in FlowJo (TreeStar) and samples were gated into live CD45+ singlets and exported to the R analysis framework.
Mass cytometry acquisition and data preprocessing
Barcoded and labeled sample data were acquired on a CyTOF 2.1 mass cytometer (Fluidigm). Instrument quality control and tuning was performed on a daily basis. Acquisitions from two independent runs were normalized using five-element beads (Fluidigm) . To further control for batch effects, each independent run contained one normalization control sample that was present in both runs. Live single cells in the sample convolute were identified based on event length, center, width, DNA (191Ir and 193Ir) and live/dead (195Pt) channels in FlowJo (TreeStar). Debarcoding was achieved by Boolean gating in FlowJo of cells exclusively bearing three barcodes. Both flow and mass cytometry data were transformed in the R environment using an inverse hyperbolic sine (arcsin) function. In case individual markers were not aligned in the normalization controls of both mass cytometry runs due to residual batch effects, cofactors of the sample convolute were adapted to achieve the same mean in staining intensity for both normalization controls. A channel-based percentile normalization using the 99.9th percentile was further applied on the transformed dataset for flow and mass cytometry data. Cytokine positivity was determined in an automated fashion by calculating the 99th percentile of the residual cytokine labeling of an unstimulated control.
Thymus tissue samples were cryosectioned for immunohistochemistry using a Hyrax C60 cryostat (Zeiss). Thymus sections (10 μm) were fixed with 2% (wt/vol) paraformaldehyde (PFA) in 0.1 M phosphate buffer, pH 7.4, and acetone, washed in PBS, and blocked with PBS supplemented with 0.1% Triton X-100 and 4% normal goat serum. Subsequently, sections were incubated with the following primary antibodies (diluted in blocking solution) overnight at 4 °C: rat anti-GM-CSF antibody (BD Pharmingen, clone BVD2-21C11, 1:50), mouse anti-CD4 antibody (Biolegend, clone RPA-T4, 1:50) and rabbit anti-CD3 (NOVUS, clone SP7, 1:100). Sections were then washed in PBS and incubated with AF647-labeled goat anti-rat, AF488-labeled goat anti-mouse and AF555-labeled goat anti-rabbit secondary antibodies (Life Technologies, 1:500) overnight at 4 °C. Sections were mounted with SlowFade Gold antifade reagent with DAPI (Invitrogen). Fluorescence photomicrographs were captured with a SP5 Leica confocal laser scanning microscope (SP5; Leica) equipped with argon and helium lasers using the 40 × objective lens (oil immersion, NA1.25). Images were processed and merged by Imaris imaging software (Bitplane).
Multispectral immunofluorescence was performed applying the following antibody panel to Formalin-fixed paraffin-embedded tissue sections of thymus and normal tonsil tissues: CD3 (Leica Microsystems Ltd, clone LN10, 1:50), CD4 (Leica Microsystems Ltd, clone 4B12, 1:50), CD20 (Leica Microsystems Ltd, clone L26, 1:200), CD23 (Leica Microsystems Ltd, clone 1B12, RTU), CD103 (Abcam, clone EPR4166(2), 1:500), Cytokeratin (Agilent Technologies, clone AE1/AE3, 1:100), and counterstaining with DAPI. The optimized multiplexed immunofluorescence protocols were validated against chromogenic singleplex protocols on consecutive sections of a normal human reactive tonsil tissue and thymus samples. Prior to staining, all tissue slides were deparaffinised on the Leica BOND RX automated immunostainer (Leica Microsystems) by soaking in BOND Dewax solution at 72 °C and then rehydrating in ethanol. Tyramide signal amplification-based Opal method was used in this study for immunofluorescence (IF) staining (Opal 7-Color Automation IHC Kit, Akoya Biosciences). The primary antibody conditions and order of staining determined using DAB detection were directly applied to the fluorescent assays. Unlike conventional immunohistochemistry, a chromogenic peroxidase substrate is used for antigen detection, each antibody is paired with an individual Opal fluorophore for visualization. Importantly, if biomarkers were expected to co-localize in the same cellular compartment then they were paired with spectrally separated Opals. In addition, low expressing markers were coupled to more intense Opals to facilitate spectral acquisition, and vice versa. The Opal fluorophores were used at a 1/100 to 1/200 dilutions. As such, a fluorescent singleplex was performed for each biomarker and compared to the appropriate chromogenic singleplex to assess staining performance.
All fluorescently labeled slides were scanned on the Vectra 3 at 20 × magnification using appropriate exposure times. Initially, whole slide images were scanned with all five standard epi-fluorescence filters (DAPI, FITC, Cy3, Texas Red and Cy5). Then, when MOTiF Opals were solely used, images were acquired using tile scanning with the mIF whole slide unmixing filters (DAPI + Opal 570/690, Opal 480/620/780, and Opal 520). Library slides were generated from representative tissue sections to allow for accurate unmixing of the multiplexed samples, including a slide stained for each single fluorophore, a DAPI only slide, and an autofluorescence slide wherein no antibody, Opal reagent or DAPI was applied. For quantification of tissue sections, cells were segmented based on the DAPI signal using the inForm 2.3 software (PerkinElmer) and imported into the statistical programming environment R. Downstream analysis including transformation, dimensionality reduction and cell clustering was carried out analogous to the cytometry analysis described below.
In addition, for individual representative CD103 stainings of thymi, immunohistochemistry was performed using the two-step IHC staining kit EnVision + System HRP DAKO (Glostrup, Denmark) according to the manufacturer’s instructions. Sections underwent heat-mediated antigen retrieval with Dako Target Retrieval Solution. DAB was used as the chromogen, and the sections counterstained with haematoxylin and analyzed with the light microscope Olympus BX41.
Algorithm-guided high-dimensional analysis
The high-dimensional analysis was accomplished in the R environment. For FlowSOM clustering, 100 clusters were generated from the combined dataset and metaclustered based on the elbow point. The elbow point was determined by plotting the percentage of variance explained in relation to the number of metaclusters using the package ConsensusClusterPlus. UMAPs were generated using the R package umap with default settings . Force-directed layouts were generated using the ForceAtlas2 algorithm  integrated in the VorteX graphical clustering environment creating unweighted edges between the nodes based on the 10 nearest neighbors . Resulting graphs were further modified using the Gephi Toolkit 0.9.2. Scaffold networks were created using the improved version of the initial Scaffold package consisting of grappolo, vite and panorama . Mass cytometry FlowSOM nodes of the peripheral blood were used to create the landmark nodes. All plots and visualizations were drawn using the ggplot2 package.
Immune cell frequencies were compared using the unpaired nonparametric Mann–Whitney–Wilcoxon test using the stats package. To correct for multiple testing, the Benjamini–Hochberg correction was applied . Linear regression analysis was carried out using the R base function lm.