the encapsulin was expressed and purified according to literature procedures.1 , 2 all experiments were performed at ph  7.4 in a phosphate buffered saline ( 0.01  m pbs , sigma aldrich unless stated otherwise . a 1000fold excess of nitrospiropyran bearing a succinimide was added to an encapsulin solution ( in 0.01  m pbs ph  7.4 containing 10  % dmso ) at room temperature and incubated overnight . the nonreacted spiropyran was removed by sizeexclusion chromatography ( preparative column superose 6 10/100 gl , ge healthcare fplc kta purifier 900 with a 24  ml bed volume ) . prior to injecting the samples into the column , all samples were dialyzed against pbs to remove the dmso using 1214  kda dialysis membranes ( spectra / por ) . spiropyran hybrid was irradiated with uv light ( =365  nm , bluepoint led honle technology , 40  mw  cm ) for 2  min and subsequently with visible light ( 420  nm , edmund mi150 highintensity illuminator ) for 7  min to complete a cycle of irradiation . after each irradiation , the absorption spectrum was recorded with a perkinelmer lambda 850 uv / vis spectrometer and the emission spectrum at =555670  nm ( excitation at 535  nm ) was recorded using a perkinelmer fluorescence spectrometer . the hydrodynamic size of the encapsulins before and after irradiation in 0.01  mm pbs ( ph  7.4 ) was determined by dynamic light scattering ( nanotrac wave , microtrac ) . the encapsulin was expressed and purified according to literature procedures.1 , 2 all experiments were performed at ph  7.4 in a phosphate buffered saline ( 0.01  m pbs , sigma a 1000fold excess of nitrospiropyran bearing a succinimide was added to an encapsulin solution ( in 0.01  m pbs ph  7.4 containing 10  % dmso ) at room temperature and incubated overnight . the nonreacted spiropyran was removed by sizeexclusion chromatography ( preparative column superose 6 10/100 gl , ge healthcare fplc kta purifier 900 with a 24  ml bed volume ) . prior to injecting the samples into the column , all samples were dialyzed against pbs to remove the dmso using 1214  kda dialysis membranes ( spectra / por ) . 500  l of a solution containing the encapsulin  spiropyran hybrid was irradiated with uv light ( =365  nm , bluepoint led honle technology , 40  mw  cm ) for 2  min and subsequently with visible light ( 420  nm , edmund mi150 highintensity illuminator ) for 7  min to complete a cycle of irradiation . after each irradiation , the absorption spectrum was recorded with a perkinelmer lambda 850 uv / vis spectrometer and the emission spectrum at =555670  nm ( excitation at 535  nm ) was recorded using a perkinelmer fluorescence spectrometer . the hydrodynamic size of the encapsulins before and after irradiation in 0.01  mm pbs ( ph  7.4 ) was determined by dynamic light scattering ( nanotrac wave , microtrac ) . as a service to our authors and readers , this journal provides supporting information supplied by the authors . such materials are peer reviewed and may be reorganized for online delivery , but are not copyedited or typeset . technical support issues arising from supporting information ( other than missing files ) should be addressed to the authors .
abstractthe robustness and biocompatibility of bacterial nanocages holds promise for bionanotechnologies 
 . the propensity of these nanocarriers to penetrate cells has been demonstrated , which calls for the development of tracking strategies , both in vitro and in vivo . here , we label bacterial nanocages with photoswitchable fluorophores , to facilitate their imaging by superresolution microscopy . 
 we demonstrate the functionalization of the encapsulin from brevibacterium linens with a spiropyran , which is not fluorescent , by covalent attachment to the amine residues at the outer encapsulin shell . upon alternating irradiation with ultraviolet and visible light , 
 the spiropyran switches forth and back to its fluorescent merocyanine photoisomer and thus the fluorescence can be switched on and off , reversibly . 
 we also show that the bacterial compartments preserve their structural integrity upon covalent modification and over at least five irradiation cycles .