top bar

Difference between revisions of "Well Plate Plugin"

m (Example Micro-Manager BSH Script)
(Adding informatiion about X and Y offsets, as well as changing functions for well position to return double instead of ints)
Line 3: Line 3:
 
Designed to handle standard SBS well plates from 24, 96, 384 and 1536 wells.
 
Designed to handle standard SBS well plates from 24, 96, 384 and 1536 wells.
  
The plugin will calculate the correct coordinates for each well position. You can then iterate through each well, starting at the first well. You need to set the zero position of the XY stage on the microscope for the center of well A1 to coordinates to {0,0}.
+
The plugin will calculate the correct coordinates for each well position. You can then iterate through each well, starting at the first well. You may either zero position of the XY stage on the microscope for the center of well A1 to coordinates to {0,0} or you can pass the X and Y offsets.
  
 
The plugin will move the stage down or up each column, until the last row, before moving to the next column and reversing direction. The zig-zag path chosen for moving the stage is the fastest path on an Zeiss AxioObserver Z1.  
 
The plugin will move the stage down or up each column, until the last row, before moving to the next column and reversing direction. The zig-zag path chosen for moving the stage is the fastest path on an Zeiss AxioObserver Z1.  
  
You can change the starting well, or the ending well to only work on a subregion. However, well A1 still must be at coordinates {0,0}.
+
You can change the starting well, or the ending well to only work on a subregion.  
  
 
== Setup ==
 
== Setup ==
Line 23: Line 23:
 
;SBSPlate(int size)
 
;SBSPlate(int size)
 
:Initializes the plugin for use with well plate of a set size. Acceptable sizes are 24, 96, 384, and 1536.
 
:Initializes the plugin for use with well plate of a set size. Acceptable sizes are 24, 96, 384, and 1536.
 +
 +
;SBSPlate(int size, double X, double Y)
 +
:This also sets the X and Y stage coordinates of well A1.
  
 
;void setFirstWell(int x, int y)
 
;void setFirstWell(int x, int y)
Line 30: Line 33:
 
:Changes the ending position from {1,1} to {x,y}. Index is 1 based.
 
:Changes the ending position from {1,1} to {x,y}. Index is 1 based.
  
;int[] getWellPosition (int x, int y)  
+
;double[] getWellPosition (int x, int y)  
 
:Returns the absolute position in microns relative to well A1. Calling X and Y is 1 indexed but returns X and Y 0 indexed position in microns.
 
:Returns the absolute position in microns relative to well A1. Calling X and Y is 1 indexed but returns X and Y 0 indexed position in microns.
  
Line 39: Line 42:
 
:Returns the number of wells in the entire plate, or the number of wells in a subregion.
 
:Returns the number of wells in the entire plate, or the number of wells in a subregion.
  
;int[] getNextPosition()  
+
;double[] getNextPosition()  
 
:Returns the {x,y} coordinates in microns of the next well, relative to well A1. If at the last well, it will return the first well's coordinates.
 
:Returns the {x,y} coordinates in microns of the next well, relative to well A1. If at the last well, it will return the first well's coordinates.
  
Line 51: Line 54:
 
  xystage = mmc.getXYStageDevice();
 
  xystage = mmc.getXYStageDevice();
 
   
 
   
  int[] position = {0,0}; // 0 indexed in microns.
+
  double[] position = {0,0}; // 0 indexed in microns.
 +
//
 +
// Move stage to 0,0 if your stage is 0,0 at well A1
 +
//
 
  mmc.setXYPosition(xystage,position[0],position[1]);
 
  mmc.setXYPosition(xystage,position[0],position[1]);
 
  mmc.waitForDevice(xystage);
 
  mmc.waitForDevice(xystage);
 +
//
 +
// or get your current X,Y position of well A1
 +
//
 +
double startX = mmc.getXPosition(xystage);
 +
double startY = mmc.getYPosition(xystage);
 
   
 
   
  SBSPlate plate = new SBSPlate(96);
+
// Pass the well plate type, and optionally pass the X and Y offset of well A1
 +
  SBSPlate plate = new SBSPlate(96,startX, startY);
 +
 
 
  numberOfWells = plate.getNumberOfWells();
 
  numberOfWells = plate.getNumberOfWells();
 
   
 
   
Line 67: Line 80:
 
   mmc.waitForDevice(xystage);
 
   mmc.waitForDevice(xystage);
 
  }
 
  }
  // return stage to starting position
+
  // return stage to starting position, either to {0,0} or {startX, startY}
  mmc.setXYPosition(xystage,0,0);
+
  mmc.setXYPosition(xystage,startX,startY);
 
  mmc.waitForDevice(xystage);
 
  mmc.waitForDevice(xystage);
  
  
 
--[[User:Kdb|Karl Bellve, Biomedical Imaging Group, University of Massachusetts]] 20:02, 9 February 2011 (UTC)
 
--[[User:Kdb|Karl Bellve, Biomedical Imaging Group, University of Massachusetts]] 20:02, 9 February 2011 (UTC)

Revision as of 09:19, 10 March 2011

Description

Designed to handle standard SBS well plates from 24, 96, 384 and 1536 wells.

The plugin will calculate the correct coordinates for each well position. You can then iterate through each well, starting at the first well. You may either zero position of the XY stage on the microscope for the center of well A1 to coordinates to {0,0} or you can pass the X and Y offsets.

The plugin will move the stage down or up each column, until the last row, before moving to the next column and reversing direction. The zig-zag path chosen for moving the stage is the fastest path on an Zeiss AxioObserver Z1.

You can change the starting well, or the ending well to only work on a subregion.

Setup

big.jar must be installed and imported into the bsh script.

addClassPath("Big.jar");
import edu.umassmed.big.SBSPlate;

Class Functions

Most functions expect well positions in X, Y coordinates, where X is the long axis, and Y is the short axis of the well plate. X might have a range from 1 to 48 and Y might have a range from 1 to 32, depending upon plate size. Functions with Position in the name return coordinates in microns relative to well A1.

SBSPlate()
Initializes the plugin and uses 96 as the size of the well plate.
SBSPlate(int size)
Initializes the plugin for use with well plate of a set size. Acceptable sizes are 24, 96, 384, and 1536.
SBSPlate(int size, double X, double Y)
This also sets the X and Y stage coordinates of well A1.
void setFirstWell(int x, int y)
Changes the starting position from {1,1} to {x,y}. Index is 1 based.
void setLastWell(int x, int y)
Changes the ending position from {1,1} to {x,y}. Index is 1 based.
double[] getWellPosition (int x, int y)
Returns the absolute position in microns relative to well A1. Calling X and Y is 1 indexed but returns X and Y 0 indexed position in microns.
String getWellLabel(int well)
Returns the SBS name of the well as a String formatted as letter and number. For example, A01. If you are only using a subregion, then you only need to pass the well number of that subregion, with well 1 being the start of the subregion. The function will calculate the correct SBS label of that subregion based on where that subregion is on the well plate.
int getNumberOfWells()
Returns the number of wells in the entire plate, or the number of wells in a subregion.
double[] getNextPosition()
Returns the {x,y} coordinates in microns of the next well, relative to well A1. If at the last well, it will return the first well's coordinates.

Example Micro-Manager BSH Script

import edu.umassmed.big.SBSPlate;

gui.closeAllAcquisitions();
gui.clearMessageWindow();

xystage = mmc.getXYStageDevice();

double[] position = {0,0}; // 0 indexed in microns.
//
// Move stage to 0,0 if your stage is 0,0 at well A1
//
mmc.setXYPosition(xystage,position[0],position[1]);
mmc.waitForDevice(xystage);
//
// or get your current X,Y position of well A1
//
double startX = mmc.getXPosition(xystage);
double startY = mmc.getYPosition(xystage);

// Pass the well plate type, and optionally pass the X and Y offset of well A1
SBSPlate plate = new SBSPlate(96,startX, startY);
numberOfWells = plate.getNumberOfWells();

for (m = 1; m <= numberOfWells; m++) {
  // code to take an image could be here


  // move the stage to the next well
  position = plate.getNextPosition(); // 0 indexed in mcrons
  mmc.setXYPosition(xystage,position[0],position[1]);
  mmc.waitForDevice(xystage);
}
// return stage to starting position, either to {0,0} or {startX, startY}
mmc.setXYPosition(xystage,startX,startY);
mmc.waitForDevice(xystage);


--Karl Bellve, Biomedical Imaging Group, University of Massachusetts 20:02, 9 February 2011 (UTC)

© Micro-Manager : Vale Lab, UCSF 2006-2011 | All Rights Reserved | Contact