DRSC

Exporting .flex to .tiff on DRSCAnalysis2

Main Menu
Procedures Page

This document is available in MS Word format here and in OpenOffice Writer format here.

  1. desktop links to start RMCAs and EvoShell

    If they aren't already running, start the RMCAs and then start EvoShell (Opera) from the DRSCAnalysis2 Desktop.

    The RMCAs are a group of programs that run in the background and fetch the images for EvoShell from their remote location. If they aren't running, EvoShell won't be able to find your data. Once it is running, you can minimize the Remote Cell Analyzer window and forget about it.

    EvoShell/Opera is the program you'll be working with. It takes a while to start (around 1-2 minutes). You'll know it's fully ready when there are four green computer icons on the right side of the lower edge of the application window.

  2. In the Navigate Tab on the left-hand side of the application, find the plate data you want and select it (double-click the blue circle icon)
  3. Select Your Plate
  4. Switch to the Editor window (Window → Acapella Editor). In the editor, select the script you want to use for exports. How you do this will depend on the script you wish to run:

    1. Autoscaling makes images easier for humans to look at but removes information that might be needed for automated analysis. To export with autoscaling, select Scripts (from the Navigate Area) and drop the "export.msr" script into the editor (or double-click it).
    2. Select Script
    3. desktop links to start RMCAs and EvoShell
      Exporting without autoscaling gives you images that look almost uniformly black but preserve the full image information for automated analysis. To export without autoscaling, select the export_noscale.msr script from the scripts area and drag it into the editor (or double-click it).
    4. Advanced options: Some users need to export images in a different way (e.g. if your images have a Z-stack and you want to collapse the Z-stack while exporting, or if you want the exported file names to follow different rules than the default). The scripts folder on the Windows desktop has several alternative scripts developed over time. You can drag one of these files into the editor window just as you could drag scripts from the OperaDB (Navigate Tab).
  5. IMPORTANT: The destination specified by the writeimage() statement in the export script is likely to be invalid and will certainly not be the destination you want. This is the one line in any export script that you will always have to change. Change the destination to a location on a disk with plenty of space where you want to create the .tiff files. You should create a new subfolder for each plate you are exporting (Windows slows down if you put too many files in the same folder). Give the folder the same name as the barcode of the plate.
    NOTE: There is an older version of the writeimage() statement, which has been commented out, above the current line. Anything after "//" in the script is a comment (and colored green in the editor). Make sure that you make changes to the active version of the writeimage() line and not the comment.
    ALSO NOTE: Use forward slashes in the path name, not backslashes. Remember the slash at the end of the path!
    For example: If you have a portable drive that is plugged into DRSCAnalysis2 as drive E: and you wish to export your images to subfolders of a directory called MyExports, your writeimage() statement should look like this:
    writeimage("E:/MyExports/" & sourcedata.barcode[0] & "/" & sourcedata.barcode[0] & "_" & substr("ABCDEFGHIJKLMNOPzzz", sourcedata.row[0], 1) & columnnum & "_S" & sitenum & "_W" & sourcedata.channel[i-1] & "_Z" & sourcedata.plane[i-1] & "_noscale.tif", "truecolor", imageformat="tiff", image=in_name)

    That's very confusing, so let's break it down:

    1. "E:/MyExports/" is the location on your disk where you will create the plate folders (more on that below). Under normal circumstances, this should be the only part of the line that you need to change.
    2. sourcedata.barcode[0] is the barcode of your plate. We use it twice, once for the subdirectory name and once for the start of the file name.
    3. sourcedata.row[0] is a numerical version of the row. So a well on row C would have a value of 3.
    4. substr("ABCDEFGHIJKLMNOPzzz", sourcedata.row[0], 1) takes the row number and converts it into a row letter, so that 1 becomes A, 4 becomes D, etc.
    5. The writeimage() Statement
    6. columnnum is a two-character column number ("01", "07", "13", "24" etc.).
    7. sitenum is the number for the site within the well (also two characters).
    8. sourcedata.channel[i-1] is a number for the the laser channel (which is prefixed with a 'W' for "wavelength").
    9. sourcedata.plane[i-1] is the Z-plane of the image.

    The remaining portion of the line controls the file extension and sets parameters for how the image is exported, which we can ignore. (Select the export parameters you want by choosing between export.msr and export_noscale.msr.)

  6. Near the top of the script are two lines that start with "singlewell" and "foreach" (ex. "singlewell(channels=616)", "foreach (1..616)"). Make sure that the larger number (616 in the examples) is the same on both lines and is equal to or greater than the total number of images in each well. This number is the maximum number of images that will be exported per well. If your experiment generated more images (ex. 30 sites, 3 wavelengths, 10 Z-planes = 30x3x10 = 900 images) than the number specified, the script will silently leave out the extra images.
  7. Right-click to copy the barcode
    You must create the folder(s) to hold your images manually. This is something you have to do outside of the EvoShell/Opera application. If a folder of the correct name doesn't exist, the export will fail for all wells without explanation. (A missing or mis-spelled directory is the most common cause for an image export to fail.) We recommend that you copy the barcode directly from the barcode field in the Opera software (select the full barcode name, then right-click to access the copy function) and paste it in as the directory name in Windows Explorer.
  8. Back in EvoShell, go back to the Opera window (Window→Opera)
  9. Select the wells you wish to convert (usually the whole plate). You have to select from top left to bottom right. Wait for an image to appear.
  10. Select wells from top-right to bottom-left.
  11. Click the "Analyze selected wells" button - this should take you to the Player window (if it doesn't put you in the Player tab of that window, select the Player tab) where "384 wells selected" (or however many you selected if not full plate) is displayed at the bottom of the Data Selection section. If not try the last 3 steps again.
  12. Make sure that the Data Selection pull-down menu in the Player window is set to "Batch Mode".
  13. Confirm Batch Mode and click Run Script.
  14. Click the Run Script button - the export will begin running silently. Open an explorer window and watch your designated directory fill up with files to confirm that things are working.
  15. The images are saved as 12-bit tiffs in a 16-bit buffer, so they will show up as 12-bit in some tools and 16-bit in others.

Additional Notes: