7. Bulk Annotations

To test in: Command line interface / Insight and Web (for Web - last step only)

Purpose of the test is to check the creation of bulk annotations using python scripts started from CLI

Please indicate your Python and Ice version number in the ticket or error report in case you are having problems with the scripts

Prerequisites

For both sections below, you must have:

  • A working Python and Ice on the test machine (Python 2.7.2 and Ice 3.3 worked fine at the time this scenario was written)

  • Downloaded (and extracted) OMERO.server*.zip from Jenkins build (for example OMERO.server-5.0.1-775-f0653ea-ice33-b225.zip)

Section 1: populate_metadata.py

  1. Copy the “.csv” files from squig (test_plate.csv, test_screen.csv) i.e.

    • ome/team/screenshots/Testing Setup/Bulk annotations/test_plate.csv

    • ome/team/screenshots/Testing Setup/Bulk annotations/test_screen.csv

  2. Either in Insight or Web, create a Screen and note the Screen ID

  3. Import ome/data_repo/curated/mias/frans/siRNA_PRIM1_03102008/001-365700055641 into the Screen created in step 2.

  4. Rename the just imported Plate in Insight or Web to 365700055641.

  5. Import ome/data_repo/curated/mias/frans/siRNA_PRIM1_03102008/001-365700055641 again, this time not into a Screen and note the Plate ID

  6. Open a terminal and go to OMERO.server-*/lib/python/ (for example OMERO.server-4.4.4-819-777c235-dirty-ice33-b115/lib/python/)

  7. Run the bulk annotation populate_metadata.py script for the MIAS dataset you imported into the Screen:

    PYTHONPATH=$PYTHONPATH:. python omero/util/populate_metadata.py -s <hostname> -u <username> Screen:<screen_id> path/to/test_screen.csv

    • For example (assuming that test_screen.csv is located on your Desktop):

      PYTHONPATH=$PYTHONPATH:. python omero/util/populate_metadata.py -s howe.openmicroscopy.org.uk -u user-1 Screen:51 ~/Desktop/test_screen.csv

  8. Run the bulk annotation populate_metadata.py script for the MIAS dataset you imported without a Screen:

    PYTHONPATH=$PYTHONPATH:. python omero/util/populate_metadata.py -s <hostname> -u <username> Plate:<plate_id> path/to/test_plate.csv

    • For example (assuming that test_plate.csv is located on your Desktop)

      PYTHONPATH=$PYTHONPATH:. python omero/util/populate_metadata.py -s howe.openmicroscopy.org.uk -u user-1 Plate:101 ~/Desktop/test_plate.csv

    • Check that you can see following console output as a result of steps 6 and 7 [Console output:].

  9. Open or go to the previously opened Insight UI

  10. Check that there is a “bulk_annotations” File Annotation attached to the Screen you created and imported into

  11. Check that there is a “bulk_annotations” File Annotation attached to the Plate you imported without a Screen

  12. Select the Plate without a Screen and select each of the 16 Wells with an image in the middle panel individually, one at a time:

    • Check that the metadata is visible in the bottom left hand corner of the Insight tree view to the right of the Plate grid [BulkAnnot001:]

    • Check “Well” metadata is different for each selected Well

    • Check “Well Name” is correct for the selected Well

    • Check that the metadata match with the test_plate.csv (open the .csv in Excel)

  13. Select the Plate you imported into a Screen and select each of the 16 Wells with an image in the middle panel individually, one at a time:

    • Check that the metadata is visible in the bottom left hand corner of the Insight tree view to the right of the Plate grid [BulkAnnot001:]

    • Check the metadata is different for each selected Well

    • Check “Well Name” is correct for the selected Well

    • Check “Plate” is the same for each selected Well and matches the Plate’s ID

    • Check “Plate Name” is the same for each selected Well and matches the Plate’s name

    • Check that the metadata match with the test_screen.csv (open the .csv in Excel)

  14. Using Web client, open the Plate without Screen, open an image in Full Viewer and click onto the “Image Information” link [BulkAnnot001NWeb:]

    • Check that you can see the metadata annotations [BulkAnnot002NWeb:, BulkAnnot005NWeb:]

    • Check that the annotations in Web match the ones displayed in Insight and in the test_plate.csv.

Section 2: populate_roi.py

  1. In case you are due to test just this section (= Section 2) note the prerequisites in the header of this scenario (above the Section 1).

  2. Use the same plate as for populate_matadata.py testing, (i.e. ome/data_repo/curated/mias/frans/siRNA_PRIM1_03102008/001-365700055641). Both of the plates used for populate_metadata.py should work (i.e. the Plate in the Screen and the orphaned Plate). Note or make sure you still have the ID of the PLate.

  3. In Insight, open the first well (A1) of the Plate and open ROI manager - you will see ROIs with yellow description fields to them. Delete couple of ROIs, for example in top-left corner (note that because of the amount of ROIs present, Delete All ROIs command might not work). After this, you should have a defined space cleaned from ROIs, see screenshot for example [BulkAnnot006:]. Close the image and click Yes in the upcoming dialog to save changes.

  4. Open a terminal and go to OMERO.server-*/lib/python/ (for example OMERO.server-4.4.4-819-777c235-dirty-ice33-b115/lib/python/)

  5. Run the bulk annotation populate_roi.py script for the MIAS Plate you noted the ID of in Step 2 of Section 2:

    PYTHONPATH=$PYTHONPATH:. python omero/util/populate_roi.py -s <hostname> -u <username> <plate_id>

    • For example

      PYTHONPATH=$PYTHONPATH:. python omero/util/populate_roi.py -s localhost -u user-4 61

    • Check that you can see following console output as a result of steps 6 and 7 [populate_roi_output.txt].

  6. Open or go to the previously opened Insight UI

  7. Refresh the tree (left-hand pane) and

    • Check that you can see file attached to the Plate you have executed the script against.

  8. Open the well A1 as you did in Step 3 and

    • Check that you can see new regions in the top-left corner which were added as a result of you running the script [BulkAnnot007:].

  9. Open OMERO.web and

    • Check that you can see the newly added regions in OMERO.web as well.





























../_images/0012.png

BulkAnnot001:





























../_images/001Nout.png

Console output:































../_images/004NWeb.png

BulkAnnot001NWeb:
































../_images/002NWeb.png

BulkAnnot002NWeb:





























../_images/005NWeb.png

BulkAnnot005NWeb:























../_images/006.png

BulkAnnot006:





















../_images/007.png

BulkAnnot007: