PLNT3140 INTRODUCTORY CYTOGENETICS    September 2020

Tutorial: Karyotypes with ImageJ


Goal: To learn how to measure the lengths of chromosome arms using ImageJ


 VIDEO: See this tutorial in action, then try it yourself, before going on to the assignment.

0. Save the example files

Hint: It is a good organizational practice to create a folder to contain all files related to a task eg. you might call it "example".

Go to your karyotype folder, and create a sub-folder called "example".

Save the following files to your example folder:

1. Calibrate the standard


Start ImageJ (this will vary depending on where ImageJ is installed on your computer.)



Choose File --> Open, and navigate to the example folder. Open StageMeter100x.jpg

This file has an image of the stage meter, a microscope slide with major gradations every 50 µM, and minor gradations every 10 µM. In this step, we will calibrate ImageJ so that it can assign distances based on the number of pixels per µM.

To measure a distance, first draw a straight line using the Straight line tool.
Once you click this button, the cursor will change to a crosshair symbol.

To minimize error in the calibration, it is better to calibrate using a longer distance, in this case, the distance between two major tick marks. Draw a line between the two tick marks.

You will note that the line shown begins at the left edge of one tick mark, and ends at the left edge of the adjacent tick mark. Also, the line has to be drawn slightly off of level, since this image is slightly rotated, relative to the horizontal.


Choose Analyze --> Set Scale.

The distance in pixels for the line shown in the example is 868 pixels.

Set Known distance to 50, and Unit of length to uM. (For simplicity, we're using "u" to stand for the Greek letter mu.)

Also, click on the box that says "Global". This will cause ImageJ to use to calculate lengths in microns, based on the length in pixels, for all images analyzed until you quit ImageJ.



2. Measure chromosome lengths

Next, choose File --> Open and import the file Karyotype_3.jpg. It will be easier to discern chromosomal features, and to draw measuring lines, if we zoom in. Click on the zoom tool magnifying glass , and then click on the image, probably twice. Use the scrolling tool (hand)  (hand) to re-center the image

IMPORTANT: ImageJ works in layers

To understand how ImageJ works, you need to understand the concept of layers. Most bitmap graphics programs conceptualize the image as a stack of layers. The first is the raw image itself. If we want to add things, such as labeling, lines or other annotation, we create a separate layer called the Overlay. If you think of the overlay as a transparent sheet that you can lay over a paper photograph, you have the idea.
We can draw on the transparent sheet, but never change the photograph below. If we look at the photo through the transparency, we see an annotated picture.

We will next show how to create lines for measurement, and add them one by one to the overlay. At the end, we'll save the composite image as a new graphics file.

Selection - ImageJ uses the term "selection" to refer to the last object drawn. The selection is temporary, unless you add it to the overlay by clicking ctrl-B, as we'll describe below. It's important to know this term, because it is used extensively in ImageJ documentation.


This image is a good example, because it shows some of the problems we may encounter when annotating chromosomes. For example some are curved, and some overlap. This image also illustrates something you'll notice when you look at enough chromosome spreads. Keep in mind that we may not always see the complete length of a chromosome arm, because chromosomes are 3-dimensional objects, and some parts of the chromosome might be in a different focal plane than the rest of the chromosome.

The advantage of using the barley genome as a subject is that the chromosomes are big. However, the disadvantage is that the chromosomes are all fairly similar in length. For these reasons, we want to try to calculate the ratio of long and short arms, as well as identifying those with satellites, in order to distinguish the chromosomes.

Before we begin, we need to set a few parameters for the Overlay layer. Choose Image --> Overlay --> Labels.

Make sure the "Show labels"  and "Draw backgrounds" boxes are checked.


Also, to set Font size to 14.



Let's start by drawing lines for the long and short arms of one of the chromosomes. This is done using the Segmented Line tool. Right click on the Line tool and check the box for Segmented line. This tool lets you draw lines with 2 or more segments, which will be critical for measuring chromosomes that have curvature.

We'll draw a segmented line for each of the chromosome arms. Since the diploid number for barley is 2N=14, there will be a total of 28 arms.

In the absence of prior knowledge of chromosome identities, the order in which we measure chromosomes doesn't matter. However, there are two similarly-sized chromosomes with a large euchromatic region near the kinetochore, so those are probably homologues.

Let's do the first one, short arm first, then the long arm. Click the crosshairs at one end of the short arm, drag along the length, and double click at the kinetochore. This will leave a yellow line on the short arm.

To record the length of this arm, type ctrl-M ( on Mac  ⌘-M). The measurement will pop up in the Results window. Because we calibrated using the StageMeter, the Length is in units of µM.

Finally, click ctrl-B (-B on Mac) to add this arm to the Overlay.



Note: ctrl-M and ctrl-B are shortcuts for Analyze --> Measure and Image --> Overlay --> Add selection, but since we'll be doing a lot of these, the shortcuts are way faster.
 
Now draw a similar line on the long arm.

Hint: If you don't like the line you've drawn, simply draw another line elsewhere. Until you add a line to the Overlay, it goes away as soon as you draw something else. Similarly, if you mistakenly add a line to the results, you can cut that line in the Results box.

Again, add the line to the Results box using ctrl-M (-M). Add it to the Overlay using ctrl-B (-B).

To summarize, for each of the 28 chromosome arms, the procedure is:
  1. Draw a line.
  2. Add it to Results using ctrl-M (-M).
  3. Add it to the Overlay using ctrl-B (-B).

The final image should look something like this:


One thing to observe is that the chromosome with arms 13 and 14 appears to be overlapped by the chromosome with arm 1 and 2. For the former, it was not entirely clear where the kinetochore was, so these measurements may not be accurate.

Also note that for arm 13 and arm 22, it was necessary to draw a segmented line. That means that you click to begin the line, and click as many times as necessary to trace the shape of the arm. The line is completed by double-clicking.





What if I mess up and create a line I don't want?

This is a common problem, but ImageJ makes it harder to fix than it should be. Most other programs would let you simply select the object and "cut" or "delete". ImageJ makes it more complicated.

As an example, you can see that object 5 is a segmented line that incorrectly covers arms from two different chromosomes. We want to delete this object.



The first step is to get all of the objects into the ROI Manager. (ROI stands for "Region Of Interest"). Make sure nothing is selected, and choose Image --> Overlay --> To ROI Manager. This will send all objects in the overlay into the ROI.

In the ROI Manager, click on 0005-0771, which stands for object 5. Object 5 will be highlighted in blue in the image as shown at right.


Click the Delete button to delete object 5. The line will disapear from the list, and from the image.


Click on "Save as Overlay" to save the changes.



3. Save your final image, and import your results into a spreadsheet

Make sure to save the image: File --> SaveAs --> PNG: Karyotype_3.anno.png. It is important to give this file a new name so that it doesn't overwrite the original file.

Also, make sure to save the results as Results.csv.

The .csv file extension indicates that this is a comma-separated value file. CSV is a generic spreadsheet format that can be read or written by any spreadsheet program. In CSV, every line is a row, and on each line, the data items for each column are separated by commas (,).


Open Results.csv in your spreadsheet program (eg. LibreOffice Calc, Excell). If asked about a seperator, check the Comma box.




Simply copy the 28 lengths from Results.csv into column B of the template. The spreadsheet will automatically calculate long/short arm ratios, and lengths for the entire chromosome.

Save your spreadsheet under a new name eg. karyotype.results.ods.






If your don't understand how to do something, call me or stop by my office, or send me a message at frist@cc.umanitoba.ca. Also, remember that you can read documentation for each program using links from the tutorials.