Package: pyseq2500
PySeq2500Control an Illumina HiSeq 2500 System InteractivelyRead the DocsInstallationRequirementsPySeq2500 has only been tested on PCs that were previously used to control the HiSeq2500s with the Illumina Control Software.PC SpecsWindows 7 64 bitDual Intel Xeon CPU 2.00 GHx64 GB RAMActive Silicon Phoenix Camera Link Frame Grabbers (D48CL PE4)Newer operating systems have not been tried yet because thedriversfor the cameras/frame grabber are not compatible.Software RequirementsWindows 7Python 3.7compiler such as Build Tools for Visual Studio 2019 (version 16.11)PySeq2500 Installationpip install pyseq2500

pip remove qtpy

pip install qtpy==1.11.2

pip install pyqt5==5.15.4Verify Installationpyseq -h

usage: pyseq [-h] [-config PATH] [-name NAME] [-output PATH] [-list]
             [-method METHOD] [-virtual] [-settings] [-ports] [-diagnostics]

optional arguments:
  -h, --help      show this help message and exit
  -config PATH    path to config file
  -name NAME      experiment name
  -output PATH    directory to save data
  -list           list installed methods
  -method METHOD  print method details
  -virtual        use virtual HiSeq
  -settings       print optional HiSeq settings
  -ports          view com ports
  -diagnostics    perform a diagnostics runIssuesPySeq2500 relies on napari for manual focusing and displaying images with the
image analysis module. However the dependencies for napari do not get installed
correctly so there are some additional pip install commands.HiSeq ModificationsSeeWiki on HiSeq ModificationInitializing HiSeqimportpyseqhs=pyseq.HiSeq()hs.initializeCams()hs.initializeInstruments()# Initialize x,y,z & objective stages. Initialize lasers and optics (filters)Note that thepyseq.HiSeq()constructor accepts serial ports assignments in case your setup is different, i.e:hs=pyseq.HiSeq(xCOM='COM67',yCOM='COM68',fpgaCOM=['COM10','COM11'],laser1COM='COM12',laser2COM='COM13')Basic setup of HiSeqhs.lasers['green'].set_power(100)#Set green laser power to 100 mWhs.lasers['red'].set_power(100)#Set red laser power to 100 mWhs.y.move(-180000)#Move stage to top right corner of Flow Cell Ahs.x.move(17571)hs.z.move([21250,21250,21250])#Raise z stagehs.obj.move(30000)#Move objective to middle-ishhs.move_ex('green','open')#Move excitation filter 1 to open positionhs.move_ex('red','open')#Move excitation filter 2 to open positionhs.lasers['green'].get_power()#Get green laser power (mW i think)hs.lasers['red'].get_power()#Get red laser power   (mW i think)Image acquisitionThe following code takes a picture from each of the cameras, splits each image into 2, saves all 4 images as tiffs, and writes a metadata textfile.
Images and metafile are saved in the directory set inhs.image_path.# Image destination pathhs.image_path='C:\\Users\\Public\\Documents\\PySeq2500\\Images\\'# Take an imagehs.take_picture(32,128)# take_picture(# frames, bundle height, image_name)Names of the images arehs.cam1.left_emission + image_name. The name of the metafile is justimage_name. Theimage_nameargument is optional, if not used it defaults to a time stamp.Currently all of the image prefixes (camN.L/R_emission) are set to the emission wavelength inhs.InitializeCams()The images are# framesxbundle heightrows of pixels (length of scan) and 2048 columns of pixels.
Changing the# framesis the best way to change the length of the scan.
Only certain values are acceptable for the bundle height, the default, which Illumina uses, is 128.The metadata textfile contains info like time, stage position, laser power, filter settings.Moving the stage# Positioning the stage# Currently all of the stages move to absolute positions that are defined in stepshs.y.move(Y)# Y should be between -7000000 and 7500000hs.x.move(X)# X should be between 1000 and 50000hs.z.move([Z,Z,Z])# Z should be between 0 and 25000hs.obj.move(31000)# Objective should be between 0 and 65000To move the stage out to load slides onto it ishs.move_stage_out().Generally, when moving the stage, position the stage in the y direction first, into the hiseq, and then position it in the x direction because there are some knobs at the front of the hiseq that the stage can run into.Duringhs.intializeInstruments(), the staged is homed toY=0, X=30000, Z=0, and O=30000(although there is no homing for the objective).Setting up opticsBefore taking a picture, the laser power should be set, the excitation filters should be set, and the emission filter should be in the light path.Lasershs.lasers['green'].set_power(100)# sets laser 1 (green) to 100 mWhs.lasers['red'].set_power(100)# sets laser 2 (red) to 100 mWhs.lasers['green'].get_power()# returns the power of laser 1 and stores it in hs.lasers['green'].powerhs.lasers['red'].get_power()# returns the power of laser 2 and stores it in hs.lasers['red'].powerDuringhs.initializeInstruments(), both lasers are set to 10 mWFiltersDuringhs.initializeInstruments(), the excitation filters are homed to the block position and the emission filter is moved into the light path.hs.optics.move_ex(color,filter)#  moves the excitation filter wheel in the color ('green' or 'red') light path to the filter.hs.optics.ex_dict# stores the positions and names of the filters in a dictionaryhs.optics.move_em_in(True/False)# "True" moves the emission filter into the light path, False moves it out.Automate a method/recipe on a HiSeq2500The following files are necessary to automate a method on a HiSeq 2500 System.experiment configmethod recipemethod config (optional)Experiment ConfigThe experiment config has 4 sections.[experiment]
[sections]
[reagents]
[cycles]
[filters]
[method] #optional[experiment]experiment details (required, unless noted)method: name of installed method, path to method config file, or section name in config filecycle: number of cycles to run (integer)first flowcell: which flowcell to start first if running 2, optional (A or B)[experiment]
method = 4i            
cycles = 2              
first flowcell = A[sections]position of sections on flowcell as measured with slide ruler (required for imaging).section name = F: LLx, LLy, URx, URysection name: unique name/id of section to image (string)F: flowcell section is on (A or B)LLx: lower left x coordinate of section, use slide ruler (float)LLy: lower left y coordinate of section, use slide ruler (float)URx: upper right x coordinate of section, use slide ruler (float)URy: upper right y coordinate of section, use slide ruler (float)[sections]
section1 = A: 15.5, 45, 10.5, 35[reagents]Specify ports (optional).
It is possible to also to specify ports in a seperate method config file.N = nameN: port number (integer)Name: name of reagent (string)[reagents]
6 = GFAP
7 = IBA1
8 = AF547 + Cy5[cycles]Specify cycle specific reagents (optional).variablereagent N = namevariablereagent: cycle dependent reagent in recipe, specified in method config (string)N: cycle (integer)name: reagent used for variablereagent at cycle N (string)[cycles]
1stab 1 = GFAP
1stab 2 = IBA1
2ndab 1 = AF547 + Cy5
2ndab 2 = AF547 + Cy5[filters]Specify cycle specific optical filters (optional).
If a filter is not specified for a cycle,default focus filter 1is used for the green laser anddefault focus filter 2is used for the red laser.lasercolor N = nameThe HiSeq uses neutral density filters of various optical densities to reduce the intensity of light.
Theopenfilter allows the laser to pass without reduction.
The'homefilter completely blocks the laser.lasercolor: color of laser lineN: cycle (integer)name: optical density of filter to use (float/string), see table below.laser colorfilters (Optical Density)green (g/G)open, 0.2, 0.6, 1.4, 1.6, 2.0, 4.0, homered (r,R)open, 0.2, 0.9, 1.0, 2.0, 3.0, 4.5, home[filters]
green 1 = 1.6
g 2 = 1.4
G 3 = 0.6
red 1 = 1.0
r 1 = 0.9
R 1 = 2.0[method name]Method specific HiSeq settings (optional)Must match themethoditem in the[experiment]section.
Instead of a method specific section in the experiment config file, a seperate method config file may be used.SeeMethod Configbelow for details.Method ConfigThe method config file has 2 possible sections.
Instead of a seperate method config file, a method specific section in the experiment config file may be used (in which case only use 1[reagent]section).['method name'] #required
[reagents] #optional,[method name]HiSeq settings specific to the method.
The name of this section should match the name of the method.
The only required key in this section isrecipethat has the path to the method recipe as its value.[4i]
recipe = 4i_recipe.txtThe other keys are optional.flush speed: flowrate to flush lines with in uL/min (integer), default is 700flush volume:  volume to flush line with in uL (integer), default is 2000reagent speed: flowrate to pump reagents during recipe in uL/min (integer), default is 40variable reagents: name of variable ports in recipes that are cycle dependent (string)first port: port to start recipe at on first cycle (string)barrels per lane: number of syringe barrels that are used per lane on flowcell (integer), default is 8laser power: set power of laser in mW (integer), default is 10z position: step of tilt motors when imaging (integer), default is 21500focus filter 1: filter for green laser for autofocus routine, default is 2.0focus filter 2: filter for red laser for autofocus routine, default is 2.0default em filter: emission filter used for imaging, True for in path, False for out of path (bool), default is Truedefault filter 1: filter for green laser if not specified in[filter]section of experiment config file (float/string), default ishomedefault filter 2: filter for red laser if not specified in[filter]section of experiment config file (float/string), default ishomerinse: reagent to rinse the flowcell with between completion of the experiment and flushing of the lines during shutdown (string), default isNoneautofocus: routine used for autofocusing (string), seeAutofocusfor more info, default ispartial oncebundle height:sensor bundle height of cameras (integer), only certain values are valid, default is 128[4i]
recipe = 4i_recipe.txt
flush speed = 500
flush volume = 1000
reagent speed = 200
variable reagents = 1stab, 2ndab
first port = blocking
barrels per lane = 8
laser power = 400[reagents]Specify method required ports (optional).N = nameUseful if running the same method repeatedly and only some of the ports change from each experiment.N: port number (integer)Name: name of reagent (string)[valve24]
1 = PBS
2 = water
3 = elution
4 = blocking
5 = imagingMethod RecipeThere are 6 basic actions to build a recipe.PORT:port name(string)Valve switches to specified port.PORT: waterPUMP:pump volume in uL(integer)Syringe pump draws specified volume through flowcell lane.PUMP: 2000HOLD:hold time in min.(integer)Recipe pauses for specified time.HOLD: 10WAIT:IMAGor port name* (string)Recipe waits to continue until the other flowcell is imaging (IMAG) or switches toport name. If there is only one flowcell,WAITis ignored.WAIT: waterIMAG:z focal planes(integer)The flowcell is imaged at the specified number of z focal planes at the sections listed in the experiment config.IMAG: 15TEMP:temperature in degrees Celsius(integer/float)The temperature of the stage is change to the specified temperature.TEMP: 55Run an automated experimentStart a method on a HiSeq2500 System from the command line.
All arguments are optional.usage: pyseq [-h] [-config PATH] [-name NAME] [-output PATH] [-list]
             [-method METHOD] [-virtual]h:See usage of pyseqconfig: path to the configuration file, default is config.cfg in the current working directoryname: name of the experiment, default is a YYYYMMDD_HHMMSS time stamp.output: path to the output directory to save images and logs, default is the current working directorylist:See installed methodsmethod:See an installed method config and method recipevirtual:Run a virtual experimentsettings:See available configuration optionsports:List COM port identifier of instrumentsdiagnostics:Perform a simple diagnostics runRun an experimentAssumes an experiment file, config.cfg, is in the current working directory.pyseq -n MyFirstHiSeqExperimentRun a virtual experimentAssumes an experiment file, config.cfg, is in the current working directory.
Useful for building and testing new methods.pyseq -n TestCustomExperiment -vSee usage of pyseqpyseq -h, --helpSee installed methodspyseq -lSee an installed method config and method recipeThe example here is to see the config and recipe for a method called 4i.pyseq -m 4i