Identify the dimensions of a PA14 plate containing the L4 stage worms by running the Python script extract_frame.py. Then open the JPEG file in ImageJ. From the menu, choose Analyze, then Set Measurements.
Ensure that the display label box is checked and close the window. Using the straight line tool, measure the diameter of a plate by drawing a line across it. Then choose Analyze, then Measure from the menu.
If the video is in 1080 pixels, each plate will be about 480 pixels wide. Enter this information in the notepad to be used later and close the results window. Using the multi-point tool, mark points on the upper left side of each plate which will become the upper left corner of the cropped videos.
Mark it in order of when the plates were started. After creating a point for all the plates, choose Analyze, then Measure from the menu. Measurements including the X and Y coordinates of the points will appear in the results window.
To process multiple videos, repeat the process in ImageJ with other JPEG files. All X and Y coordinates will be listed in the same results window. Save the results window into a CSV file.
The file should be saved to the same directory as the movie files. To find the starting time for each plate, play the movie either on the computer or phone and take note of the starting times of each set of plates placed under the camera. Open the results.
csv file with the coordinates and add a start column. For each row corresponding to individual plates, enter appropriate start time in seconds under the start column. Save the file.
To crop and trim the videos, run the crop_n_trim. py script. Choose the results.
csv file. Enter the plate dimensions and the pixel value noted earlier. The script will now read each row of the results.
csv file to find the correct movie file after the script finishes running. A folder will appear with the same name as the movie, followed by the start time in which videos corresponding to the assay will be saved. For manual counting, open each AVI file in ImageJ.
Count the worms that are visible outside the lawn and then calculate the occupancy rate for each time point. The wild type N2 worms progressively left the bacterial lawn and stayed outside as noted in the occupancy rate over time. The counts made directly from the plates were compared against counts from imaged worms.
The counts made from imaged worms turned out to be highly accurate. When three trials for each strain were averaged together, the N2 and NPR1 strains yielded 99.5%and 96.2%accuracy respectively.