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** #. 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` #. Either in Insight or Web, create a Screen and note the Screen ID #. Import `ome/data_repo/curated/mias/frans/siRNA_PRIM1_03102008/001-365700055641` into the Screen created in step 2. #. Rename the just imported Plate in Insight or Web to ``365700055641``. #. Import `ome/data_repo/curated/mias/frans/siRNA_PRIM1_03102008/001-365700055641` **again**, this time not into a Screen and note the Plate ID #. Open a terminal and go to `OMERO.server-*/lib/python/` (for example `OMERO.server-4.4.4-819-777c235-dirty-ice33-b115/lib/python/`) #. 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 -u Screen: 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` #. 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 -u Plate: 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` - |C| that you can see following console output as a result of steps 6 and 7 [:ref:`BulkAnnot001Nout`]. #. Open or go to the previously opened Insight UI #. |C| that there is a "bulk_annotations" File Annotation attached to the Screen you created and imported into #. |C| that there is a "bulk_annotations" File Annotation attached to the Plate you imported without a Screen #. 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: - |C| that the metadata is visible in the bottom left hand corner of the Insight tree view to the right of the Plate grid [:ref:`BulkAnnot001`] - |C| "Well" metadata is different for each selected Well - |C| "Well Name" is correct for the selected Well - |C| that the metadata match with the `test_plate.csv` (open the `.csv` in Excel) #. 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: - |C| that the metadata is visible in the bottom left hand corner of the Insight tree view to the right of the Plate grid [:ref:`BulkAnnot001`] - |C| the metadata is different for each selected Well - |C| "Well Name" is correct for the selected Well - |C| "Plate" is the same for each selected Well and matches the Plate's ID - |C| "Plate Name" is the same for each selected Well and matches the Plate's name - |C| that the metadata match with the `test_screen.csv` (open the `.csv` in Excel) #. Using Web client, open the Plate without Screen, open an image in Full Viewer and click onto the "Image Information" link [:ref:`BulkAnnot004NWeb`] - |C| that you can see the metadata annotations [:ref:`BulkAnnot002NWeb`, :ref:`BulkAnnot005NWeb`] - |C| that the annotations in Web match the ones displayed in Insight and in the test_plate.csv. **Section 2: populate_roi.py** #. 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**). #. 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. #. 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 [:ref:`BulkAnnot006`]. Close the image and click ``Yes`` in the upcoming dialog to save changes. #. Open a terminal and go to `OMERO.server-*/lib/python/` (for example `OMERO.server-4.4.4-819-777c235-dirty-ice33-b115/lib/python/`) #. 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 -u ` - For example `PYTHONPATH=$PYTHONPATH:. python omero/util/populate_roi.py -s localhost -u user-4 61` - |C| that you can see following console output as a result of steps 6 and 7 [:download:`populate_roi_output.txt `]. #. Open or go to the previously opened Insight UI #. Refresh the tree (left-hand pane) and - |C| that you can see file attached to the Plate you have executed the script against. #. Open the well `A1` as you did in Step 3 and - |C| that you can see new regions in the top-left corner which were added as a result of you running the script [:ref:`BulkAnnot007`]. #. Open OMERO.web and - |C| that you can see the newly added regions in OMERO.web as well. | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. _BulkAnnot001: .. figure:: images/testing_scenarios/BulkAnnotations/001.png :align: center BulkAnnot001: | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. _BulkAnnot001Nout: .. figure:: images/testing_scenarios/BulkAnnotations/001Nout.png :align: center Console output: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. _BulkAnnot004NWeb: .. figure:: images/testing_scenarios/BulkAnnotations/004NWeb.png :align: center BulkAnnot001NWeb: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. _BulkAnnot002NWeb: .. figure:: images/testing_scenarios/BulkAnnotations/002NWeb.png :align: center BulkAnnot002NWeb: | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. _BulkAnnot005NWeb: .. figure:: images/testing_scenarios/BulkAnnotations/005NWeb.png :align: center BulkAnnot005NWeb: | | | | | | | | | | | | | | | | | | | | | | .. _BulkAnnot006: .. figure:: images/testing_scenarios/BulkAnnotations/006.png :align: center BulkAnnot006: | | | | | | | | | | | | | | | | | | | | .. _BulkAnnot007: .. figure:: images/testing_scenarios/BulkAnnotations/007.png :align: center BulkAnnot007: | | | | | | | | | | | | | | | | | |