|
| 1 | +"""Example BarSEQ instrument schema""" |
| 2 | + |
| 3 | +import argparse |
| 4 | +from datetime import date |
| 5 | + |
| 6 | +from aind_data_schema_models.modalities import Modality |
| 7 | +from aind_data_schema_models.organizations import Organization |
| 8 | +from aind_data_schema_models.units import SizeUnit |
| 9 | + |
| 10 | +from aind_data_schema.components.coordinates import CoordinateSystemLibrary |
| 11 | +from aind_data_schema.components.devices import ( |
| 12 | + Camera, |
| 13 | + DAQDevice, |
| 14 | + Device, |
| 15 | + Filter, |
| 16 | + Laser, |
| 17 | + Microscope, |
| 18 | + Objective, |
| 19 | + Cooling, |
| 20 | + DataInterface, |
| 21 | + CameraChroma, |
| 22 | + BinMode |
| 23 | +) |
| 24 | +from aind_data_schema.core.instrument import Instrument |
| 25 | + |
| 26 | + |
| 27 | +objectives = [ |
| 28 | + Objective( |
| 29 | + name="20x Objective", |
| 30 | + numerical_aperture=0.70, |
| 31 | + magnification=20, |
| 32 | + immersion="air", |
| 33 | + manufacturer=Organization.NIKON, |
| 34 | + model="CFI S Plan Fluor LWD 20XC", |
| 35 | + ), |
| 36 | +] |
| 37 | + |
| 38 | +dichroics = [ |
| 39 | + Filter( |
| 40 | + name="D1", |
| 41 | + filter_type="Multiband", |
| 42 | + manufacturer=Organization.SEMROCK, |
| 43 | + model="FF421/491/567/659/776-Di01", |
| 44 | + notes="DAPI/GFP/RFP/Cy5/Cy7 dichroic", |
| 45 | + center_wavelength=[421, 491, 567, 659, 776], |
| 46 | + ), |
| 47 | + Filter( |
| 48 | + name="D2", |
| 49 | + filter_type="Multiband", |
| 50 | + manufacturer=Organization.CHROMA, |
| 51 | + model="ZT405/514/635rpc", |
| 52 | + notes="DAPI/YFP/Rs Cy5 dichroic", |
| 53 | + center_wavelength=[405, 514, 635], |
| 54 | + ), |
| 55 | + Filter( |
| 56 | + name="D3", |
| 57 | + filter_type="Multiband", |
| 58 | + manufacturer=Organization.SEMROCK, |
| 59 | + model="FF421/491/572-Di01-25x36", |
| 60 | + notes="DAPI/GFP/TxRed dichroic", |
| 61 | + center_wavelength=[421, 491, 572], |
| 62 | + ), |
| 63 | +] |
| 64 | + |
| 65 | +emission_filters = [ |
| 66 | + Filter( |
| 67 | + name="E1", |
| 68 | + filter_type="Multiband", |
| 69 | + manufacturer=Organization.SEMROCK, |
| 70 | + model="FF01-441/511/593/684/817", |
| 71 | + notes="DAPI/GFP/Red/Cy5/Cy7 - used with D1 and 405nm laser", |
| 72 | + center_wavelength=[441, 511, 593, 684, 817], |
| 73 | + ), |
| 74 | + Filter( |
| 75 | + name="E2", |
| 76 | + filter_type="Band pass", |
| 77 | + manufacturer=Organization.SEMROCK, |
| 78 | + model="FF01-565/24", |
| 79 | + notes="YFP - used with D2 and 520nm laser; bandwidth 24nm", |
| 80 | + center_wavelength=565, |
| 81 | + ), |
| 82 | + Filter( |
| 83 | + name="E3", |
| 84 | + filter_type="Band pass", |
| 85 | + manufacturer=Organization.SEMROCK, |
| 86 | + model="FF01-585/11", |
| 87 | + notes="RFP - used with D1 and 546nm laser; bandwidth 11nm", |
| 88 | + center_wavelength=585, |
| 89 | + ), |
| 90 | + Filter( |
| 91 | + name="E4", |
| 92 | + filter_type="Band pass", |
| 93 | + manufacturer=Organization.SEMROCK, |
| 94 | + model="FF01-676/29", |
| 95 | + notes="FarRed - used with D1 and 638nm laser; bandwidth 29nm", |
| 96 | + center_wavelength=676, |
| 97 | + ), |
| 98 | + Filter( |
| 99 | + name="E5", |
| 100 | + filter_type="Band pass", |
| 101 | + manufacturer=Organization.SEMROCK, |
| 102 | + model="FF01-775/140", |
| 103 | + notes="RS Cy5 - used with D2 and 638nm laser; bandwidth 140nm", |
| 104 | + center_wavelength=775, |
| 105 | + ), |
| 106 | + Filter( |
| 107 | + name="E6", |
| 108 | + filter_type="Multiband", |
| 109 | + manufacturer=Organization.SEMROCK, |
| 110 | + model="FF01-391/477/549/639/741-25", |
| 111 | + notes="YFP/Rs Cy5", |
| 112 | + center_wavelength=[391, 477, 549, 639, 741], |
| 113 | + ), |
| 114 | + Filter( |
| 115 | + name="E7", |
| 116 | + filter_type="Multiband", |
| 117 | + manufacturer=Organization.CHROMA, |
| 118 | + model="69401m", |
| 119 | + notes="DAPI/GFP/TxRed", |
| 120 | + center_wavelength=[440, 520, 600], |
| 121 | + ), |
| 122 | + Filter( |
| 123 | + name="E8", |
| 124 | + filter_type="Multiband", |
| 125 | + manufacturer=Organization.CHROMA, |
| 126 | + model="ZET532/640m", |
| 127 | + notes="Alexa532/Cy5(wide)", |
| 128 | + center_wavelength=[532, 640], |
| 129 | + ), |
| 130 | +] |
| 131 | + |
| 132 | +light_sources = [ |
| 133 | + Laser( |
| 134 | + name="Lumencor Celesta 365nm", |
| 135 | + manufacturer=Organization.LUMENCOR, |
| 136 | + model="Celesta", |
| 137 | + wavelength=365, |
| 138 | + ), |
| 139 | + Laser( |
| 140 | + name="Lumencor Celesta 440nm", |
| 141 | + manufacturer=Organization.LUMENCOR, |
| 142 | + model="Celesta", |
| 143 | + wavelength=440, |
| 144 | + ), |
| 145 | + Laser( |
| 146 | + name="Lumencor Celesta 488nm", |
| 147 | + manufacturer=Organization.LUMENCOR, |
| 148 | + model="Celesta", |
| 149 | + wavelength=488, |
| 150 | + ), |
| 151 | + Laser( |
| 152 | + name="Lumencor Celesta 514nm", |
| 153 | + manufacturer=Organization.LUMENCOR, |
| 154 | + model="Celesta", |
| 155 | + wavelength=514, |
| 156 | + ), |
| 157 | + Laser( |
| 158 | + name="Lumencor Celesta 561nm", |
| 159 | + manufacturer=Organization.LUMENCOR, |
| 160 | + model="Celesta", |
| 161 | + wavelength=561, |
| 162 | + ), |
| 163 | + Laser( |
| 164 | + name="Lumencor Celesta 640nm", |
| 165 | + manufacturer=Organization.LUMENCOR, |
| 166 | + model="Celesta", |
| 167 | + wavelength=640, |
| 168 | + ), |
| 169 | + Laser( |
| 170 | + name="Lumencor Celesta 730nm", |
| 171 | + manufacturer=Organization.LUMENCOR, |
| 172 | + model="Celesta", |
| 173 | + wavelength=730, |
| 174 | + ), |
| 175 | +] |
| 176 | + |
| 177 | +camera = Camera( |
| 178 | + name="Camera-1", |
| 179 | + manufacturer=Organization.TELEDYNE_VISION_SOLUTIONS, |
| 180 | + model="01-KINETIX-M-C", |
| 181 | + data_interface=DataInterface.USB, |
| 182 | + cooling=Cooling.AIR, |
| 183 | + sensor_width=3200, |
| 184 | + sensor_height=3200, |
| 185 | + size_unit=SizeUnit.PX, |
| 186 | + chroma=CameraChroma.BW, |
| 187 | + immersion="air", |
| 188 | + bin_mode=BinMode.NO_BINNING, |
| 189 | + bit_depth=16, |
| 190 | + sensor_format="20.8 x 20.8", |
| 191 | + sensor_format_unit="mm", |
| 192 | + frame_rate=500, |
| 193 | + frame_rate_unit="hertz", |
| 194 | +) |
| 195 | + |
| 196 | +microscope = Microscope( |
| 197 | + name="Ti2-E__0", |
| 198 | + manufacturer=Organization.NIKON, |
| 199 | + model="Ti2-E", |
| 200 | +) |
| 201 | + |
| 202 | +spinning_disk = Device( |
| 203 | + name="XLIGHT Spinning Disk", |
| 204 | + manufacturer=Organization.CRESTOPTICS, |
| 205 | + model="X-Light V3", |
| 206 | + notes="Nipkow spinning disk confocal module", |
| 207 | +) |
| 208 | + |
| 209 | +daq = DAQDevice( |
| 210 | + name="DigitalIO", |
| 211 | + manufacturer=Organization.NATIONAL_INSTRUMENTS, |
| 212 | + model="NI-DAQ Dev1", |
| 213 | + data_interface="USB", |
| 214 | +) |
| 215 | + |
| 216 | +instrument = Instrument( |
| 217 | + location="243", |
| 218 | + instrument_id="Dogwood", |
| 219 | + modification_date=date(2024, 7, 9), |
| 220 | + coordinate_system=CoordinateSystemLibrary.IMAGE_XYZ, |
| 221 | + modalities=[Modality.BARSEQ], |
| 222 | + notes=( |
| 223 | + "BarSEQ imaging system with Nikon Ti2-E inverted microscope, X-Light V3 spinning disk confocal, " |
| 224 | + "and Lumencor Celesta light engine. Used for multi-channel fluorescence imaging of genetically " |
| 225 | + "modified tissue samples. Channel configurations: geneseq01/bcseq01 cycles use G/T/A/C/DAPI channels, " |
| 226 | + "other geneseq/bcseq cycles use GTAC channels, hyb cycles use GFP/G/TxRed/Cy5/DAPI/DIC channels. " |
| 227 | + "Camera pixel size: 0.33um. Stitch overlap: 23%. Hyb registration radius: 100um. " |
| 228 | + "Configuration date corresponds to chprofile20x_dogwood_20240709.mat and chshift20x_dogwood_20240709.mat" |
| 229 | + ), |
| 230 | + temperature_control=False, |
| 231 | + components=[ |
| 232 | + microscope, |
| 233 | + *objectives, |
| 234 | + *dichroics, |
| 235 | + *emission_filters, |
| 236 | + *light_sources, |
| 237 | + camera, |
| 238 | + spinning_disk, |
| 239 | + daq, |
| 240 | + ], |
| 241 | +) |
| 242 | + |
| 243 | +if __name__ == "__main__": |
| 244 | + parser = argparse.ArgumentParser() |
| 245 | + parser.add_argument("--output-dir", default=None, help="Output directory for generated JSON file") |
| 246 | + args = parser.parse_args() |
| 247 | + |
| 248 | + serialized = instrument.model_dump_json() |
| 249 | + deserialized = Instrument.model_validate_json(serialized) |
| 250 | + deserialized.write_standard_file(prefix="barseq", output_directory=args.output_dir) |
0 commit comments