Wei-Yu Chi1, Gabriel Au2, Jessica Liang2, Chao-Cheng Chen1, Chuan-Hsiang Huang3, Jr-Ming Yang4. 1. Department of Pathology, Johns Hopkins Medical Institutions, Baltimore, MD 21205, USA. 2. Department of Biology, Johns Hopkins University, Baltimore, MD 21218, USA. 3. Department of Pathology, Johns Hopkins Medical Institutions, Baltimore, MD 21205, USA. Electronic address: chuang29@jhmi.edu. 4. Department of Pathology, Johns Hopkins Medical Institutions, Baltimore, MD 21205, USA. Electronic address: jyang38@jhmi.edu.
Abstract
We recently developed a biosensor barcoding approach for highly multiplexed tracking of molecular activities in live cells. In this protocol, we detail the labeling of cells expressing different genetically encoded fluorescent biosensors with a pair of barcoding proteins and parallel imaging. Signals from cells with the same barcodes are then pooled together to obtain the dynamics of the corresponding biosensor activity. We describe the steps involved in cell barcoding, image acquisition, and analysis by deep learning models. For complete details on the use and execution of this protocol, please refer to Yang et al. (2021).
We recently developed a biosensor barcoding approach for highly multiplexed tracking of molecular activities in live cells. In this protocol, we detail the labeling of cells expressing different genetically encoded fluorescent biosensors with a pair of barcoding proteins and parallel imaging. Signals from cells with the same barcodes are then pooled together to obtain the dynamics of the corresponding biosensor activity. We describe the steps involved in cell barcoding, image acquisition, and analysis by deep learning models. For complete details on the use and execution of this protocol, please refer to Yang et al. (2021).
Cellular functions are mediated by large numbers of biochemical activities that are highly coordinated in space and time. Many genetically encoded fluorescent biosensors based on either a single fluorescent protein (FP) (usually GFP) or the FRET between two fluorescent proteins (usually CFP and YFP) have been developed to track various signaling, metabolic, and other cellular activities in live cells (Greenwald et al., 2018). However, due to the broad emission spectra of FPs and limited spectral space, no more than a few biosensors can be imaged in the same experiment despite efforts to increase the multiplexity, e.g., by expanding the color spectrum of biosensors or targeting them to different intracellular sites (Terai and Campbell, 2022).To address this limitation, we recently developed a method for massively multiplexed imaging of biosensors (Yang et al., 2021). In this “biosensor barcoding” method, cells expressing different biosensors are separately labeled with barcodes composed of a pair of barcoding proteins, which are blue or red FPs targeted to different subcellular locations (Figure 1A). With appropriately chosen excitation wavelengths and emission ranges, the spectra of barcoding proteins can be separated from those of the cyan, green, or yellow FPs used in a large number of biosensor designs (Figure 1B). For biosensors not in this emission range, many of them can be reconstructed by replacing single fluorophores with GFP or FRET pairs with CFP and YFP. Therefore our strategy is compatible with most biosensors. Cells are then mixed together before imaging on a fluorescent microscope equipped with a spectral detector. At the start of the experiment, spectral images of the barcodes are acquired, followed by time-lapse imaging of biosensors (Figure 1C). The identity of the biosensor in each cell is inferred from the barcode, which can be identified using machine learning models. The signals from cells expressing the same biosensors can then be pooled together for further analysis (Figure 1D).
Figure 1
Overview of the biosensor barcoding method
(A) Cells are separately co-transfected with plasmids encoding one biosensor and a pair of barcoding proteins. Each barcode is composed of a nuclear or plasma membrane-targeted BFP plus a red FP targeted to one of the four subcellular locations. Barcode digits from left to right represent mCherry, mCardinal, iRFP702, and BFP targeted to nucleus (1), plasma membrane (2), nuclear membrane (3), cytosol (4), or non-expressed (0). For example, B2001 denotes mCherry at location 2 (plasma membrane), BFP at location 1 (nucleus), and no mCardinal or iRFP702.
(B) Excitation and emission spectra of barcoding proteins (BFP, mCherry, mCardinal, and iRFP702) and biosensors (CFP, GFP, YFP). Excitation laser wavelengths are indicated by lines (405 nm and 633 nm for BFP and red FPs used in barcodes, respectively; 458 nm for biosensors) and the corresponding ranges of emission detection are indicated by boxes. Note that the biosensors are imaged in both CFP and YFP channels under 458 nm excitation.
(C) Cells are mixed prior to imaging experiments, during which snapshots of the barcodes are first acquired, followed by time-lapse imaging of biosensors.
(D) Barcode images are analyzed to determine the biosensor expressed in each cell. Biosensor signals from cells with the same barcodes are pooled together for statistical analysis (Created with BioRender.com).
Overview of the biosensor barcoding method(A) Cells are separately co-transfected with plasmids encoding one biosensor and a pair of barcoding proteins. Each barcode is composed of a nuclear or plasma membrane-targeted BFP plus a red FP targeted to one of the four subcellular locations. Barcode digits from left to right represent mCherry, mCardinal, iRFP702, and BFP targeted to nucleus (1), plasma membrane (2), nuclear membrane (3), cytosol (4), or non-expressed (0). For example, B2001 denotes mCherry at location 2 (plasma membrane), BFP at location 1 (nucleus), and no mCardinal or iRFP702.(B) Excitation and emission spectra of barcoding proteins (BFP, mCherry, mCardinal, and iRFP702) and biosensors (CFP, GFP, YFP). Excitation laser wavelengths are indicated by lines (405 nm and 633 nm for BFP and red FPs used in barcodes, respectively; 458 nm for biosensors) and the corresponding ranges of emission detection are indicated by boxes. Note that the biosensors are imaged in both CFP and YFP channels under 458 nm excitation.(C) Cells are mixed prior to imaging experiments, during which snapshots of the barcodes are first acquired, followed by time-lapse imaging of biosensors.(D) Barcode images are analyzed to determine the biosensor expressed in each cell. Biosensor signals from cells with the same barcodes are pooled together for statistical analysis (Created with BioRender.com).In addition to greatly enhancing the throughput of data acquisition, this method has other advantages. First, cells in the same mixture and concurrently imaged show more synchronized responses to perturbations than if they are separately imaged, thus facilitating the kinetic comparison of different biosensors. Second, the ability to label different cell populations in the same mix allows for the delineation of cell-autonomous and non-autonomous effects (Yang et al., 2021).In this protocol, we use HeLa cells expressing 10 biosensors in the receptor tyrosine kinase signaling network as a representative example to illustrate step-by-step protocols for the experimental setup and image analysis in biosensor barcoding. The strategy can be readily scaled up to track a greater number (dozens to over a hundred) of biosensors that detect different biochemical activities.
ImageJ
Download and install ImageJ/Fiji following the instructions from https://imagej.net/software/fiji/.
Python
Install Python and required packages. This Python script is dependent on NumPy, Pandas, and TkInter, which are included in the Anaconda distribution, as well as TensorFlow (for deep-learning model) and OpenCV (for image processing), which are installed manually.Install Anaconda: follow the instructions at https://docs.anaconda.com/anaconda/install/ to install Anaconda and Python 3.Install OpenCV and TensorFlow: open the command line and type the following to install OpenCV and TensorFlow.> pip install opencv-python> conda install tensorflow
Key resources table
Materials and equipment
Culture mediumThe culture medium can be stored at 4°C for up to 1 month.Imaging medium∗Leave FBS out if starvation is required.The phenol-red free imaging medium can be stored at 4°C for up to 1 month.Growth factor stock∗EGF stock is prepared by dissolving lyophilized EGF with 0.2 μm-filtered 10 mM acetic acid and stored at –20°C for up to 6 months. Avoid repeated freezing and thawing.
Microscope
In general, to fully resolve the emission spectra and subcellular localization of different barcoding proteins, the microscope imaging system should be equipped with: 1) a confocal module; 2) suitable excitation laser lines; and 3) a spectral detector. Moreover, an environmental chamber for temperature, CO2, and humidity control is needed for live-cell imaging. We use a Zeiss AxioObserver with a 780-Quasar confocal module, which is equipped with a 34-channel high-sensitivity gallium-arsenide phosphide (GaAsP) spectral detector controlled by the Zen software. Three laser lines are used in this protocol: 405 nm for BFP (with a Main Beam Splitter MBS 405), 458 nm for CFP/GFP/YFP (MBS 458), and 633 nm for the red FPs (MBS 488/561/633). We collect BFP, CFP, YFP, and red FP emission in the 370–430 nm, 458–499 nm, 508–543 nm, and 560–695 nm range, respectively. A motorized stage is required for multi-position image acquisition. A Definite Focus nosepiece allows fast auto-focus to compensate for focus drift during imaging.
Computer
The image analysis in this protocol was tested on the Windows 10 operating system. To train deep-learning models, we recommend using a computer with GPUs and at least 32 GB of memory. Typical training for a model in this protocol takes about 5–10 h on a computer without GPUs and about 5–10 min on a computer with proper GPUs.
Step-by-step method details
Establishing the pipelines part 1: Training deep learning models
Timing: 5–7 daysAlthough the barcodes can be visually identified, we highly recommend using deep learning models for more efficient barcode identification. The main task of these models is to classify the barcode images into different subcellular locations with high accuracy. These models are trained on images from cells expressing known barcodes, and their accuracy can be improved by increasing the number of training images and fine-tuning the hyperparameters. In our experience, an overall accuracy of 95% is required to achieve satisfactory analysis results. Due to differences in cell morphology, models trained on one cell type may not achieve the same accuracy on other cell types (Yang et al., 2021). This section describes the steps in training models on HeLa cells expressing 8 different barcodes that are relevant to the experiments in the protocol. All the scripts and associated files are available at https://github.com/BearHuangLab/Biosensor-barcoding. Throughout the protocol, we will refer to the relative directories of the files on our GitHub. The final models are available in the directory “2. Barcode identification/Barcode reading GUI/”. The same procedure can be applied to other cell types expressing different barcodes.Seed 4 × 105 HeLa cells in a 35 mm glass-bottom tissue culture dish with imaging medium. Incubate cells at 37°C, 5% CO2 overnight.Use any method of choice to transfect cells with the barcode and biosensor plasmids. Here we use the GenJet™ In Vitro DNA Transfection Reagent Ver. II (SignaGen® Laboratories).For each dish, remove the old medium and replace with 1 mL fresh imaging medium 30 min before transfection.Preparation of the DNA-GenJetTM mix.For each dish, dilute 1 μg of DNA with 50 μL of serum-free DMEM. Two barcode plasmids are used for each transfection as shown in Table 1. Start with a 1:1 ratio for the two plasmids. Adjust the ratio if the fluorescence signal is too bright or too dim.
Table 1
Barcode plasmid pairs for each barcode
Barcodea
Barcode plasmid 1
Barcode plasmid 2
B1001
mCherry-NLS
BFP-NLS
B2001
mCherry-CAAX
BFP-NLS
B3001
mCherry-LaminB1
BFP-NLS
B4001
mCherry-NES
BFP-NLS
B0001
-
BFP-NLS
B1002
mCherry-NLS
BFP-CAAX
B2002
mCherry-CAAX
BFP-CAAX
B3002
mCherry-LaminB1
BFP-CAAX
B4002
mCherry-NES
BFP-CAAX
B0002
-
BFP-CAAX
See Figure 1A legend for barcode nomenclature.
Barcode plasmid pairs for each barcodeSee Figure 1A legend for barcode nomenclature.For each dish, dilute 3 μL GenJet™ Transfection Reagent with 50 μL of serum-free DMEM. Vortex for 5 s and spin down briefly. Immediately add the diluted GenJet™ Reagent to the diluted DNA. Pipette up and down 5 times to mix. Leave the mixture at room temperature for 15 min.Add the DNA-GenjetTM complex dropwise onto cells in the 35 mm dishes. Incubate cells at 37°C, 5% CO2 overnight.On a Zeiss LSM780-FCS laser scanning confocal microscope, capture the images of mCherry and BFP under 633 nm and 405 nm excitation, respectively.Turn on the microscope and set the stage incubator to 37°C.Open the Zen software. Switch the objective to the 40× oil lens and locate the cells.Switch to “Acquisition” and click the “Channel Mode” tab under “Light Path”.Select 30 positions with at least 6–10 fluorescent cells in each viewing field. To generate a good training set, a total of 200 or more cells is recommended for each barcode.Select the 633 nm laser as the excitation source and set spectrum collection range from 561 to 695 nm with pinhole set to 30.2.Click the “Snap” button to capture the image.Select the 405 nm laser as the excitation source and set spectrum collection range from 371 to 430 nm with pinhole set to 30.2.Click the “Snap” button to capture the image.Repeat step 3 until images of all barcodes are collected.Save the two files. Name the files with suffix “633Ex” and “405Ex” accordingly. (e.g., [Experiment ID]_633Ex.lsm and [Experiment ID]_405Ex.lsm).Image processing: We use ImageJ and Python to process and save the images. Some examples of processed images can be found at “4. Toy example/Training_image”.Open the image files ([Experiment ID]_633Ex.lsm and [Experiment ID]_405Ex.lsm) and the macro “0. Image Processing/make montage.ijm” with ImageJ by dragging the files onto the ImageJ toolbar or importing the file through File>Open and selecting the file. Example image files can be found at “4. Toy example/Image_processing”.Since the image sequences contain multiple positions, we stitch together all 30 positions by clicking “Run” in the macro window (Figure 2A, a).
Figure 2
Generating training images
(A) Image processing in ImageJ.
(B) Examples of training images after we run the python script (scale bars are not included due to anisotropic deformation of the images).
nPositions =30; // change it to the number of positionsrun("Make Montage...", "columns=nPositions rows=1 scale=1");Right-click the images and rename them to “633Ex” and “405Ex”, respectively.Manually select the cells using the ImageJ selection tool (Figure 2A, b) and save the regions of interest (ROIs) in the ImageJ ROI manager by pressing “T” on the keyboard. Selections should only contain one cell and should not overlap with other cells (Figure 2A, c). Save the ROIs by clicking More>Save all in the ROI manager (Figure 2A, d).Open and run the script (“0. Image Processing/save barcode.ijm”) below to concatenate and save the barcode images with RFP on the left and BFP on the right. Include the barcode labels in the file names in the format of “[Experiment ID]_[Subcellular location]_[Barcode]_[Cell index].tif”, e.g., “20220101_nucleus_B1001_1.tif”. Include “nucleus”, “membrane”, “nuc_mem”, “cytosol”, or “none” in the file name to ensure the correct labels are read and processed by subsequent scripts.//Example of an imageJ macro that concatenates and saves barcode images.directory = "./raw_images/cytosol/" // change this to your directoryfile_name = "20220101_cytosol_B4001" // change this to your experiment IDroi_no = roiManager("count")//Rename roifor (i = 0; i < roiManager("count"); i++) {roiManager("Select", i)roiManager("rename", i+1)}//enables background calculation, 20× fastersetBatchMode("hide")for (i = 0; i < roi_no; i++) {//select windows, duplicate each roiselectWindow("633Ex");roiManager("Select", i);roi_name = Roi.getName;run("Duplicate...", "title=A");selectWindow("405Ex");roiManager("Select", i);run("Duplicate...", "title=B");//combinerun("Combine...", "stack1=A stack2=B");//save & closesaveAs("Tiff", directory + file_name +"_"+ roi_name +".tif");close();}//disables background calculationsetBatchMode("show")//close all windowsclose("633Ex")close("405Ex")Run the python script (“0. Image Processing/preprocess barcode.py”) to preprocess barcodes.The script crops the barcode images, resizes the images to 150 × 150 pixels, caps the outlier (1%) signals, and rescales the images to 8-bit.Before running the script, open the script with a text editor, change the barcode_dir and save_dir to the directories to the barcode images and processed images, respectively, and save the script.To run the script, open a command line, and type “python” followed by the path to your script, i.e.,> python ./path_to_your_script/preprocess barcode.pyimport tifffileimport cv2import osimport numpy as npbarcode_dir = '/raw_images/cytosol/' # directory to the barcode imagessave_dir = '/processed_images' # directory to save the processed imagesimg_path_list = [os.path.join(barcode_dir, i) for i in os.listdir(barcode_dir) if i.endswith('.tif')]# resize the images to 150 × 150nrows = 150ncols = 150def crop_1 × 2(img):#crop imagesy, x = img.shapeA = img[0:, 0:int(x/2)]B = img[0:, int(x/2):int(x)]return A, B# normalize to [0, 255], set limit for outlier (default 99%)def normalize_saturate_outlier(image, percentile=99):upperlimit = np.percentile(image, percentile)lowerlimit = np.percentile(image, 100 - percentile)image = np.minimum(upperlimit, image)image = np.maximum(lowerlimit, image)image = cv2.normalize(image, None, 0, 255, cv2.NORM_MINMAX, dtype=cv2.CV_8U)return image# save the preprocessed barcodesfor img_path in img_path_list:# read grayscale imageimg = cv2.imread(img_path, cv2.IMREAD_ANYDEPTH)# crop images according to barcode ABCDA, B = crop_1 × 2(img)# rescale and clip the extreme (1%) signalsA = normalize_saturate_outlier(A, percentile=99)B = normalize_saturate_outlier(B, percentile=99)# resize the imagesA = cv2.resize(A, (nrows, ncols), interpolation=cv2.INTER_CUBIC)B = cv2.resize(B, (nrows, ncols), interpolation=cv2.INTER_CUBIC)# save imagetifffile.imsave(f'{save_dir}/{os.path.basename(img_path)}', np.concatenate(([A], [B])))Examine the images to ensure the training images are of good quality (Figure 2B). Discard images with cells that are deformed (e.g., apoptotic or blebbing) or with weak or mislocalized signals.Train deep learning neural networks. First, we train Model 1, which classifies BFP images as None (0), Nucleus (1), or Membrane (2) (Figure 3A). Second, we train Model 2 and Model 3, which classify mCherry images as None (0), Nucleus (1), Membrane (2), Nuclear membrane (3), or Cytosol (4) in the presence of nuclear and membrane BFP, respectively (Figure 3A). Finally, we assemble Model 1, 2 and 3 to increase the overall accuracy (Figure 3B).
Figure 3
Training deep learning models
(A) The architecture of the models.
(B) The workflow of barcode prediction using deep learning models. See text for details.
We suggest readers who do not have experience in Jupyter notebook to read the beginner guide here (https://docs.jupyter.org/en/latest/start/index.html).To start a Jupyter session, open the command line, change the directory to the working directory, and type “jupyter lab”. Open the Jupyter notebook “Model 1 training.ipynb”. Change the train_dir to the directory containing your training images. Change the model_filepath to the directory for trained models. Run the whole script to start training.Test the models with data that are not used for training. Determine the models that perform the best and use them for subsequent analysis.Redo the model training for another two models. Use “Model 2 training.ipynb” for Models 2 and 3. In our protocol, we assemble three trained models to increase the accuracy.Generating training images(A) Image processing in ImageJ.(B) Examples of training images after we run the python script (scale bars are not included due to anisotropic deformation of the images).Training deep learning models(A) The architecture of the models.(B) The workflow of barcode prediction using deep learning models. See text for details.
Establishing the pipelines part 2: Acquiring reference spectra
Timing: 3 daysIn order to spectrally unmix the emission of mCherry, mCardinal, and iRFP702 in the barcode images, the reference spectra for these FPs need to be collected.Seed 4 × 105 HeLa cells in a 35 mm glass-bottom tissue culture dish with imaging medium. Incubate cells at 37°C, 5% CO2 overnight.Transfect cells with mCherry-NLS, mCardinal-NLS, or iRFP702-NLS plasmids.Preparation of the DNA-GenJetTM mix.For each dish, dilute 1 μg of mCherry-NLS (nuclear localization signal), mCardinal-NLS, or iRFP702-NLS plasmid with 50 μL of serum-free DMEM.For each dish, dilute 3 μL GenJet™ Transfection Reagent with 50 μL of serum-free DMEM. Vortex for 5 s and spin down briefly. Immediately add the diluted GenJet™ Reagent to the diluted DNA. Pipette up and down 5 times to mix. Leave the mixture at room temperature for 15 min.Add the DNA-GenJetTM complex dropwise onto cells in the 35 mm dishes. Incubate cells at 37°C, 5% CO2 overnight.On a Zeiss LSM780-FCS laser scanning confocal microscope, capture the images of cells expressing mCherry-NLS, mCardinal-NLS, or iRFP702-NLS under the Lambda mode in the Zen software.Turn on the microscope and set the stage incubator at 37°C.Open the Zen software. Switch the objective to the 40× oil lens and locate the cells.Switch to “Acquisition” and click the “Lambda Mode” tab under “Light Path” (Figure 4A, a). Select the 633 nm laser as the excitation source (Figure 4A, b) with pinhole set to 30.2 (Figure 4A, c). Select 561–695 nm for the spectrum range to be collected and set resolution to 8.9 nm (Figure 4A, d). This setting will generate 15 images from 561 to 695 nm with 8.9 nm intervals.
Figure 4
Reference spectra acquisition
(A) Screenshot of reference spectrum acquisition.
(B) Reference spectra of mCherry, mCardinal, and iRFP702. Note that the dips in the reference spectra are due to blocking of emission by the dichroic mirror used to deflect the excitation beam.
Reference spectra acquisition(A) Screenshot of reference spectrum acquisition.(B) Reference spectra of mCherry, mCardinal, and iRFP702. Note that the dips in the reference spectra are due to blocking of emission by the dichroic mirror used to deflect the excitation beam.Click the “Snap” button to capture the image (Figure 4A, e).In the captured image, select the “Unmixing” tab (Figure 4A, f). Use the crosshair tool to point to a region of the image where the cell has a bright but non-saturating signal (Figure 4A, g–I). Check the resulting spectrum, which should look like the examples shown in Figure 4. Click “Save to spectra database” (Figure 4A, j).Repeat step 8 until all spectra of the fluorophores are collected. The reference spectrum of mCherry, mCardinal, and iRFP702 should look like the screenshots in Figure 4B.
Barcoding cells expressing different biosensors
Timing: 3 daysThis protocol demonstrates barcoding HeLa cells expressing 10 different biosensors as shown in Table 2.
Table 2
Co-transfection of barcode plasmids and biosensors
Transfection
Barcode
Plasmid 1
Plasmid 2
Biosensor
1
B2001
mCherry-CAAX
BFP-NLS
EV-S6K
2
B3001
mCherry-LaminB1
BFP-NLS
Lyn-FAK
3
B4001
mCherry-NES
BFP-NLS
Src
4
B0101
mCardinal-NLS
BFP-NLS
PH-AKT
5
B0401
mCardinal-NES
BFP-NLS
PicchuEV
6
B0021
iRFP702-CAAX
BFP-NLS
GCaMP6S
7
B2002
mCherry-CAAX
BFP-CAAX
Syk
8
B0302
mCardinal-LaminB1
BFP-CAAX
EKAR
9
B0012
iRFP702-NLS
BFP-CAAX
EV-ROCK
10
B0042
iRFP702-NES
BFP-CAAX
RhoA2G
Seed 2 × 105 HeLa cells per well with 2 mL culture medium in a 12-well tissue culture plate. Incubate cells at 37°C, 5% CO2 overnight.Transfect cells with the barcode and biosensor plasmids.For each well, remove the old medium and replace it with 0.75 mL fresh culture medium 30 min before transfection.Preparation of the DNA-GenJetTM mix.For each well, dilute 0.75 μg DNA with 38 μL of serum-free DMEM. The DNA used consists of two barcodes and one biosensor for each transfection. Start with a 1:1:1 ratio for the two barcodes and the biosensor. Adjust the ratio if the fluorescence signal is too bright or too dim.For each well, dilute 2.25 μL GenJet™ Transfection Reagent with 38 μL of serum-free DMEM. Vortex for 5 s and spin down briefly. Immediately add the diluted GenJet™ Reagent to the diluted DNA. Pipette up and down 5 times to mix. Leave the mixture at room temperature for 15 min.Add the DNA-GenJetTM complex dropwise onto cells in each well of the 12-well plate. Incubate cells at 37°C, 5% CO2 overnight.Remove medium from each well. Rinse with DPBS and detach cells with Accutase. Collect cells from all 12 wells and mix them together in a 50 mL centrifuge tube. Resuspend cells with imaging medium, and seed 6 × 105 cells per dish in 35 mm glass-bottom dishes. Incubate cells at 37°C, 5% CO2 overnight.Co-transfection of barcode plasmids and biosensors
Imaging mixed populations of barcoded cells
Timing: 3 hOn the day of imaging, remove the old medium and replace it with imaging medium. For EGF stimulation experiments, use serum-free imaging medium instead of a complete medium to starve cells for 1 h prior to imaging.Starved cells respond more strongly to EGF stimulation. If cells are kept in a serum-containing medium, responses are still visible albeit reduced for some biosensors.Capture barcode images under the Lambda mode in the Zen software as in step 8 but with the following modifications:Turn on the microscope and set the stage incubator at 37°C. Place the glass-bottom dish on the stage with the lid removed to allow drug administration during time-lapse imaging.Open the Zen software. Switch the objective to the 40× oil lens and locate cells.Switch to “Acquisition” and click the “Lambda Mode” tab under “Light Path” (Figure 4A, a). Select the 633 nm laser as the excitation source (Figure 4A, b) with pinhole set to 30.2 (Figure 4A, c). Select 561–695 nm for the spectrum range to be collected and set resolution to 8.9 nm (Figure 4A, d). This setting will generate 15 images from 561 to 695 nm with 8.9 nm intervals.Select 30 positions with at least 6–10 fluorescent cells in each viewing field. Click the “Snap” button to capture the image (Figure 4A, e). Save the barcode images from these positions as [Experiment ID]_633Ex.lsm.The number of positions is chosen to maximize the number of cells while allowing enough time for image acquisition and EGF administration. It should be adjusted based on the speed of the motorized stage and the time-lapse interval during the imaging of biosensors.Navigate to the “unmixing” panel (Figure 4A, f and g) and load the previously saved reference spectra (Figure 4A, k). Click “Linear Unmixing” (Figure 4A, l) to generate three separate images (mCherry, mCardinal, and iRFP702) for each position. The unmixed images should look like Figure 5. Save the file as [Experiment ID]_633Ex_Linear unmixing.lsm.
Figure 5
Linear unmixing
Screenshot of the unmixing panels. Scale bar, 50 μm.
Capture the BFP image for each position under “Channel Mode”. Select the 405 nm laser as the excitation source and set spectrum collection range from 371 to 430 nm with pinhole set to 30.2. Save the file as [Experiment ID]_405Ex.lsm.After the barcode images are captured for each position, proceed to imaging of biosensors. In this example, time-lapse images are acquired every 3 min for a total of 10 frames, with EGF added after frame 3.Avoid repeated freezing and thawing by storing small aliquots of the EGF stock solution at −20°C for up to 1 year.Click the “Channel Mode” tab under “Light Path”. Select spectrum range of 458–499 nm (for CFP) and 508–543 nm (for YFP and GFP). Use the 458 nm laser as the excitation source, with pinhole set to 300.6.Select “Time Series” and set the frame rate at 3 min per frame for a total of 10 frames.Select “Definite Focus” as the focusing strategy.Start time-lapse imaging. To add the stimulant (e.g., EGF) to cells, carefully lift the incubator lid and gently add the reagent to the dish immediately after frame 3 images are acquired for all positions.At completion save the file as [Experiment ID]_FRET.lsm.The YFP channel is imaged under the excitation laser for CFP (458 nm). In some publications, it is referred to as the FRET channel. Our use of the YFP/CFP ratio for FRET-based biosensors is equivalent to the FRET/CFP ratio in these publications.Save the four files generated from each imaging experiment to a separate folder without other files. This is needed for the macros to correctly identify the files. The four files are shown in Table 3.
Table 3
Files for an imaging experiment
Filename
Purpose
[Experiment ID]_405Ex.lsm
For generating barcodes: BFP channel (1-channel)
[Experiment ID]_633Ex.lsm
For spectral analysis: 15 bins
[Experiment ID]_633Ex_Linear unmixing.lsm
For generating barcodes: RFP channels (3-channel)
[Experiment ID]_FRET.lsm
For selecting ROIs and measuring CFP/YFP intensity (2-channel, time-lapse)
Linear unmixingScreenshot of the unmixing panels. Scale bar, 50 μm.Files for an imaging experiment
Image analysis: Barcode identification
Timing: 30 minConfirm that there are only four files from the experiment in the folder (Figure 6A).
Figure 6
Workflow of barcode identification
This macro includes ROI segmentation, saving individual barcode images, measurement of CFP and YFP, and generation of spectral profile.
(A) Expected files for a single experiment.
(B) The dialog box after the macro is run.
(C) The ImageJ interface for selecting the ROIs.
(D) A prompt to name the experiment.
(E) The expected output files.
Workflow of barcode identificationThis macro includes ROI segmentation, saving individual barcode images, measurement of CFP and YFP, and generation of spectral profile.(A) Expected files for a single experiment.(B) The dialog box after the macro is run.(C) The ImageJ interface for selecting the ROIs.(D) A prompt to name the experiment.(E) The expected output files.Open the file ending with “FRET.lsm” in ImageJ.Open the ImageJ macro for image analysis (“2. Barcode identification/Image Analysis.ijm”) using the same method as the last step. Click “Run” on the macro window to run the macro.The dialog box in Figure 6B will appear. Enter the number of different positions in the microscope images and the number of time points taken per position. Click “OK” to continue.ImageJ will process the .lsm file and output two image windows: “combined-YFP” and “combined-CFP”. A dialog box (Figure 6C, a) will prompt the user to select ROIs.DO NOT click OK until all ROIs are selected.Following the procedure described in step 4d, select every cell with visible fluorescence in the combine-YFP window using selection tools. When finished with selecting cells, click “OK” on the dialog box to continue (Figure 6C, b–d).To see dimmer cells, select Image>Adjust> Brightness/Contrast>Auto on the ImageJ toolbar. Also, scroll across all time points to make sure that cells remain in the selected region (Figure 6C, c). If it is hard to include the whole cell in the selected area, try to include part of the nucleus and plasma membrane. Avoid including apoptotic cells, debris, or impurities in the selected area.Experiment ID prompt (Figure 6D) will appear. Enter the experiment name in the box. Click “OK” to continue. ImageJ will proceed to measure the CFP/YFP intensities and generate barcodes and spectral data.Upon completion of the macro, the experiment folder should contain the files and folders (Table 4, Figure 6E).
Table 4
Files generated by the macro
Filename
Purpose
[Experiment ID]_ROIData.csv
CFP and YFP intensity of ROIs
[Experiment ID]_spectrum data.txt
Spectrum data of ROIs, a text file with the raw measurements for spectral analysis
combined-CFP.tif and combined-YFP.tif
Saved combined-CFP and combined-YFP windows, for use in single-fluorophore reprocessing
[Experiment ID]_FRET_RoiSet.zip
Contains ROIs from analysis, used in single-fluorophore reprocessing
Barcodes
A folder containing barcode image strips used by deep learning models
Files generated by the macroSingle-fluorophore biosensor reprocessing: For the single-fluorophore biosensors PH-AKT, the ROIs must be shrunk to include only the cell (i.e., no background in the ROIs) for a more accurate determination of biosensor activity. Reprocessing should happen after the deep learning model identifies the biosensor for each cell.From the experiment folder, open “combined-YFP.tif” and “[Experiment ID]_FRET_RoiSet.zip” in ImageJ.For each ROI that includes a single fluorophore biosensor, “shrink” the size of the selection to only include the cell and not the background (Figure 7A).
Figure 7
Single-fluorophore biosensor reprocessing
(A) An example of shrinking the ROI to include only the cellular region. Scale bar, 5 μm.
(B) Copying the YFP values from Results to the spreadsheet.
Select all the ROIs in the ROI Manager. Record the intensity in the ROI Manager through More>Multi-Measure>Ok.Copy the results and use the values to overwrite the YFP values in the [Experiment ID]_ROIData.csv file before performing Excel analysis (Figure 7B).This step can be done using a Python script on GitHub (“2. Barcode identification/PH-AKT Reprocessing.ijm”).Close the windows.Open the Barcode Prediction Python GUI (“2. Barcode identification/Barcode reading GUI”). The software predicts the barcode of each cell using the above models and spectral data (Figure 3B).Open the command line.Change to the directory containing this script and execute the Python script to open the GUI:> cd “Your_path/Barcode reading GUI”> python Barcode.pyYou should see the interface as in Figure 8A.
Figure 8
The GUI and output of the barcode prediction using deep learning models
(A) Barcode prediction GUI.
(B) Output csv file. Index: the cell id corresponding to the number in the ROI manager (Figure 6C). Path: path to the image file. Spectrum: output of the spectral analysis for red FPs showing the bin number with the strongest signal based on analyzing the rolling average of every 2 bins in a 15-bin spectral profile. BFP: the prediction of model 1. RFP: the prediction of model 2 or 3. RFP_certainty: the certainty of model 2 or 3. Final: the predicted barcode based on spectral analysis, BFP, and RFP. Output: the barcode in the column “Final” filtered with the list of barcodes used in the experiment. Thresholded: barcodes that pass the threshold of certainty as defined in step 26b.
Click “Browse” to select the models (Figure 8A, a).The default setting for the thresholds of models 2 and 3 are both 0.9. A higher threshold tends to get more accurate results but will identify fewer cells (Figure 8A, b).Click “Load model” (Figure 8A, c).Open a text editor (e.g., Notepad) to create a list of barcodes and save it as a .txt file, which is used to filter the final output. Each line of the text file is a barcode that is used in the experiment.B2001B3001B4001B0101B0401B0021B2002B0302B0012B0042Click “Browse” to select the path for the barcode list. Click “Confirm list”. (Figure 8A, d and e).Select the folder with barcode images, which are generated in step 23 (Figure 8A, f). The output folder is automatically set to the same folder with the filename modelpred.csv. Change the output folder and file name if you want.Click “Browse” to select the path of the spectrum data generated in step 23 (Figure 8A, g).Click “Predict barcode” to run (Figure 8A, h). This generates the prediction of the barcodes (Figure 8B) and typically takes less than 10 s.Single-fluorophore biosensor reprocessing(A) An example of shrinking the ROI to include only the cellular region. Scale bar, 5 μm.(B) Copying the YFP values from Results to the spreadsheet.The GUI and output of the barcode prediction using deep learning models(A) Barcode prediction GUI.(B) Output csv file. Index: the cell id corresponding to the number in the ROI manager (Figure 6C). Path: path to the image file. Spectrum: output of the spectral analysis for red FPs showing the bin number with the strongest signal based on analyzing the rolling average of every 2 bins in a 15-bin spectral profile. BFP: the prediction of model 1. RFP: the prediction of model 2 or 3. RFP_certainty: the certainty of model 2 or 3. Final: the predicted barcode based on spectral analysis, BFP, and RFP. Output: the barcode in the column “Final” filtered with the list of barcodes used in the experiment. Thresholded: barcodes that pass the threshold of certainty as defined in step 26b.
Image analysis: Biosensor activities
Timing: 5 minOpen the Excel template provided on our GitHub page “3. Analysis/10Mix_Template_STAR_Protocols.xlsx”). There are four sheets in the Excel template: Barcodes, Raw, All_Cells, and Analysis. The functions of the sheets are as follows: (Figure 9)
Figure 9
The Excel template used for data analysis
The Excel template used for data analysis. The template contains four sheets, including (A) barcodes: information of the barcodes used in the experiment; (B) raw: raw measurements of YFP and CFP signals for each cell; (C) all cells: the barcodes and measurements of each cell; and (D) analysis: automatically computed activities and plots of each biosensor.
Barcodes: information of barcode/biosensor combinations (Figure 9A).Raw: raw measurements (Figure 9B).All_cells: output of the model and transposed measurements. (Figure 9C).The activity of each biosensor is calculated differently and normalized to the prestimulus levels (typically the average of the first three frames) so that a higher value always means a higher activity.Analysis: The average, standard deviation, and graphs of biosensor activities (Figure 9D).Open the output file from step 26 (i.e., “modelpred.csv” by default) (Figure 8B). Copy the columns [Index] and [Thresholded], and paste them to the columns [Position] and [Barcode] in the sheet [All_cells] (Figure 9C).The Excel template used for data analysisThe Excel template used for data analysis. The template contains four sheets, including (A) barcodes: information of the barcodes used in the experiment; (B) raw: raw measurements of YFP and CFP signals for each cell; (C) all cells: the barcodes and measurements of each cell; and (D) analysis: automatically computed activities and plots of each biosensor.Copy the raw measurements from [Experiment ID]_ROIData.csv (from step 24) and paste them to the sheet [Raw]. Copy the raw data in [Raw] and paste the transposed data into the columns from [YFP1] to [CFP10] in the sheet [All_cells].The activities will be calculated and updated automatically. The final result will be in the sheet [Analysis].Steps 27–30 can be done using a Python script on our GitHub (“3. Analysis/Graph_generation.py”).
Expected outcomes
During image acquisition, about 5–15 cells expressing the barcodes and biosensors are typically found in a 40× viewing field. With 30 viewing fields, ∼300 cells can be used for analysis. Due to unevenness in their expression level, not all barcodes can be successfully identified by the deep learning models. In our experience, with the threshold set to achieve 99% identification accuracy as described above, the identification rate is 60%–70%. For biosensors with low cell numbers, additional cells can be identified by visual inspection of the barcode images. Alternatively, two or three experiments can be combined to ensure that enough cells are obtained for each biosensor. All biosensors used in this protocol are expected to respond to EGF stimulation in HeLa cells (Figure 9D).
Limitations
The step-by-step protocol for biosensor barcoding in HeLa cells described in this protocol should readily apply to any biosensor with emission wavelengths between 450–550 nm in different cell lines. However, a few issues need to be considered when applying the method to other cell lines. First, transient transfection as described in this protocol may not work equally well in all cell lines. Optimized transfection reagents for specific cell lines may be available. In addition, lentiviral transduction may be required for cells that are hard to transfect (Yang et al., 2021). Second, not all biosensors work in all cell lines. Therefore, new biosensors need to be validated in the cell line of interest by testing their responses to known activators or inhibitors before they are used in biosensor barcoding experiments. In our experience, around half of all biosensors tested worked as expected. Moreover, different biosensor designs for the same protein target often vary in their sensitivity or dynamic range, which may need to be characterized depending on the purpose of the experiments. Third, the deep learning models trained on one cell line may not achieve the same accuracy on another cell type with different morphology (Yang et al., 2021). Therefore, new models may need to be trained using barcoding protein images from cells of interest.
Troubleshooting
Problem 1
Low transfection efficiency. Related to “barcoding cells expressing different biosensors”.
Potential solution
Use healthy cells with low passage numbers.Maintain cells routinely to prevent overcrowding.Ideal cell density at the time of transfection should be 70%–80%.Use high-quality plasmid DNA free of phenol, sodium chloride, and endotoxins.Optimize the ratio between DNA and transfection reagent according to the manufacturer’s manual.Use a different transfection method such as electroporation.
Problem 2
Low expression level. Related to “imaging mixed populations of barcoded cells”.Increase incubation time with transfection mix.Use a vector with a strong promoter such as CMV or EF-1a.
Problem 3
Accidentally moving the dish or field of view when adding drugs. Related to “imaging mixed populations of barcoded cells”.We use clips on the stage of the microscopy to secure the dishes, so they are less prone to move when we add the drug.If the drug has not been added, stop the imaging process. Reset the field of view and restart the experiment.If the drug has been added, continue the imaging process. Check if you still see the same cells in the field of view. If the cells only move a short distance (less than ∼50 μm, which is about the length of a few cells), it is still possible to continue the experiment and realign the images manually during the image processing. If you are unable to see the same cells, discard the experiment.
Problem 4
Fluorescence signals are too high. Related to “imaging mixed populations of barcoded cells”.Decrease incubation time with transfection mix.Reduce laser power or gain during imaging.Establish stable cell lines and select clones with suitable expression levels.
Problem 5
Photobleaching of fluorescence during imaging. Related to “imaging mixed populations of barcoded cells”.When adjusting the focus or searching for cells, reduce the laser power, minimize the exposure time, and use RFP instead of BFP, which bleaches quickly. Also, if significant photobleaching of CFP and YFP is noted during time lapse imaging, a baseline correction may be needed.
Problem 6
Unequal brightness between two barcoding proteins in the same cell. Related to “imaging mixed populations of barcoded cells”.Increase DNA amount for the barcode that has a lower signal during transfection.
Problem 7
Focus changes during imaging. Related to “Imaging mixed populations of barcoded”.Make sure that “Definite Focus” is selected.
Problem 8
Mislocalized barcoding proteins. Related to “imaging mixed populations of barcoded cells”.Remove cells with saturating signals during analysis. Highly expressed barcoding proteins may accumulate in unintended locations. Also, an excessive amount of nuclear membrane-targeted FPs may affect the rigidity and shape of the nuclear membrane.Optimize the amount of plasmid transfected.
Problem 9
Low model accuracy. Related to “image analysis: barcode identification”.Check imaging settings and cell morphology.Check there is only one cell in the processed image.Retrain the model with more images.Make sure the training images are well-annotated and of good quality.Optimize the threshold.Optimize the model assembling method.Check the images from experiments to make sure that they are of similar quality as the training images.Train with a different model architecture.The model architecture used in this protocol works well for four different mammalian cell types we tested, including HeLa, 293T, MCF7, and U2OS. If the architecture does not produce models with the desired accuracy, other architectures may be tested. For example, deep learning neural networks have been successfully used to classify proteins based on their subcellular locations in yeasts (Kraus et al., 2017; Pärnamaa and Parts, 2017) and HeLa cells (Tran et al., 2019). In addition, a dataset of HeLa cell images with different subcellular locations is available at https://murphylab.cbd.cmu.edu/data/ (Boland et al., 1998).
Problem 10
Low spectral analysis accuracy. Related to “image analysis: barcode identification”.Check cell image quality. Make sure the signals are clear and without noise.Check the “Spectrum” column in the barcode prediction output file to see if it contains only the expected numbers (Figure 8B). For example, in our experience, mCherry, mCardinal, and iRFP702 always have the highest signal at bin numbers 6, 11, and 14, respectively. If other numbers show up in the “Spectrum” column, check the raw data of the spectral profile of individual cells to identify the problem.
Resource availability
Lead contact
Further information and requests for resources and reagents should be directed to and will be fulfilled by the lead contact, Jr-Ming Yang (jyang38@jhmi.edu).
Materials availability
Plasmids generated in this study have been deposited to Addgene, and the name and catalog number are listed in the key resources table. Plasmid PH-AKT will be available upon request from the lead contact. Plasmids EV-S6K, EV-ROCK, and PicchuEV will be available upon request from the lead contact with consent from Dr. Michiyuki Matsuda, who provided these plasmids.
REAGENT or RESOURCE
SOURCE
IDENTIFIER
Chemicals, peptides, and recombinant proteins
DMEM, high glucose
Gibco
11965092
DMEM, high glucose, HEPES, no phenol red
Gibco
21063029
Fetal Bovine Serum (FBS)
Corning
35-010-CV
Accutase
Corning
25-058-CI
DPBS
Gibco
14190250
Sodium pyruvate, 100 mM
Gibco
11360070
MEM Non-Essential Amino Acids Solution, 100×
Gibco
11140050
EGF
Sigma-Aldrich
E9644
GenJet™ In Vitro DNA Transfection Reagent (Ver. II)
SignaGen Laboratories
SL100489
Experimental models: Cell lines
Human: HeLa
ATCC
CCL-2
Recombinant DNA
BFP-NLS
(Yang et al., 2021)
Addgene #184458
BFP-CAAX
(Yang et al., 2021)
Addgene #184459
mCherry-NLS
(Yang et al., 2021)
Addgene #186346
mCherry-CAAX
(Yang et al., 2021)
Addgene #186347
mCherry-LaminB1
(Yang et al., 2021)
Addgene #186348
mCherry-NES
(Yang et al., 2021)
Addgene #186349
mCardinal-NLS
(Yang et al., 2021)
Addgene #184450
mCardinal-LaminB1
(Yang et al., 2021)
Addgene #184452
mCardinal-NES
(Yang et al., 2021)
Addgene #184453
iRFP702-NLS
(Yang et al., 2021)
Addgene #184454
iRFP702-CAAX
(Yang et al., 2021)
Addgene #184455
iRFP702-NES
(Yang et al., 2021)
Addgene #184457
Lyn-FAK
(Seong et al., 2011)
Addgene #78299
Src biosensor
(Ouyang et al., 2008)
Addgene #78302
EKAR
(Harvey et al., 2008)
Addgene #18679
RhoA2G
(Fritz et al., 2013)
Addgene #40176
EV-S6K
(Komatsu et al., 2011)
N/A
EV-ROCK
(Li et al., 2017)
N/A
PicchuEV
(Komatsu et al., 2011)
N/A
PH-AKT
(Watton and Downward, 1999)
N/A
GCaMP6S
(Chen et al., 2013)
Addgene #40753
Syk biosensor
(Xiang et al., 2011)
Addgene #125729
Software and algorithms
Zen Microscopy Software
ZEISS
https://www.zeiss.com/
ImageJ/Fiji
(Schindelin et al., 2012; Schneider et al., 2012)
https://imagej.net/software/fiji/
Python
Python Software Foundation
https://www.python.org
Keras
(Chollet, 2018)
https://keras.io/
TensorFlow
(Abadi et al., 2016)
https://www.tensorflow.org/
Other
100 mm cell culture dish
Corning
353003
12 well tissue culture plate
Corning
353043
35 mm glass bottom dish
MatTek
P35GC-0-14-C
Culture medium
Reagent
Final concentration
Amount
DMEM
N/A
440 mL
FBS
10%
50 mL
Sodium pyruvate
1 mM
5 mL
Non-essential amino acids
1×
5 mL
Total
N/A
500 mL
Imaging medium
Reagent
Final concentration
Amount
DMEM without phenol red
N/A
440 mL
FBS∗
10%
50 mL
Sodium pyruvate
1 mM
5 mL
Non-essential amino acids
1×
5 mL
Total
N/A
500 mL
∗Leave FBS out if starvation is required.
Growth factor stock
Reagent
Final stock concentration
Amount
Volume
EGF∗
1 mg/mL
0.2 mg
0.2 mL
∗EGF stock is prepared by dissolving lyophilized EGF with 0.2 μm-filtered 10 mM acetic acid and stored at –20°C for up to 6 months. Avoid repeated freezing and thawing.
Authors: Johannes Schindelin; Ignacio Arganda-Carreras; Erwin Frise; Verena Kaynig; Mark Longair; Tobias Pietzsch; Stephan Preibisch; Curtis Rueden; Stephan Saalfeld; Benjamin Schmid; Jean-Yves Tinevez; Daniel James White; Volker Hartenstein; Kevin Eliceiri; Pavel Tomancak; Albert Cardona Journal: Nat Methods Date: 2012-06-28 Impact factor: 28.547
Authors: Christopher D Harvey; Anka G Ehrhardt; Cristina Cellurale; Haining Zhong; Ryohei Yasuda; Roger J Davis; Karel Svoboda Journal: Proc Natl Acad Sci U S A Date: 2008-11-25 Impact factor: 11.205
Authors: Tsai-Wen Chen; Trevor J Wardill; Yi Sun; Stefan R Pulver; Sabine L Renninger; Amy Baohan; Eric R Schreiter; Rex A Kerr; Michael B Orger; Vivek Jayaraman; Loren L Looger; Karel Svoboda; Douglas S Kim Journal: Nature Date: 2013-07-18 Impact factor: 49.962