Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix getAnnotationCounts Acquisition #299 #518

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

Tom-TBT
Copy link
Contributor

@Tom-TBT Tom-TBT commented Dec 5, 2023

Fix of #299

Replace acquisition by plateacquisition expected by manager.getBatchAnnotationCounts

Also reuse the existing objs loaded at the beginning of omeroweb.webclient.views.batch_annotate, as it should stay the same.
Avoid loading the objects twice.

Tom-TBT and others added 2 commits December 5, 2023 23:28
Replace acquisition by plateacquisition expected by manager.getBatchAnnotationCounts
@Tom-TBT
Copy link
Contributor Author

Tom-TBT commented Dec 7, 2023

Just to comment on my change, I ended up adding the fix to omeroweb.webclient.views.batch_annotate.
The switch between acquisition / plateacquisition seemed to me that it is only part of omero-web, not of omero-py.
Hence I fixed the code calling the function with wrong parameters, rather than fixing the possible plate-acquisition alias in omero-py.

For test on merge-ci, is it possible to upload that plate from the IDR?
https://idr.openmicroscopy.org/webclient/?show=plate-2551

I want to look more into the plate-acquisition object to make use of it. I could have some more changes coming in the future, so the test plate could be useful for me later 😇

@pwalczysko
Copy link
Member

pwalczysko commented Dec 7, 2023

For test on merge-ci, is it possible to upload that plate from the IDR?
https://idr.openmicroscopy.org/webclient/?show=plate-2551

Yes, but it does not end as expected. Instead, I have something more simple for you.
If you ever need samples, you can search through https://downloads.openmicroscopy.org/images/OME-XML/2016-06/ - you can create your own ome-xml according to the samples there and using our Schema.

I spared the effort though by finding a similar ome-xml plate as in https://downloads.openmicroscopy.org/images/OME-XML/2016-06/ and importing it to merge-ci. See https://merge-ci.openmicroscopy.org/web/webclient/?show=plate-12161 - user-3. Let me know if it fits.

For reference and to give you the possibility to adjust @Tom-TBT or produce your own samples, the PlateAcquisitions are defined in the abovementioned ome-xml as

       <PlateAcquisition EndTime="2006-05-04T18:13:51.0Z" ID="PlateAcquisition:0" Name="PlateAcquisition Name 0" StartTime="2006-05-04T18:13:51.0Z">
            <Description>PlateAcquisition Description 0</Description>
            <WellSampleRef ID="WellSample:0_0_0_0_0"/>
            <WellSampleRef ID="WellSample:0_0_0_1_0"/>
            <WellSampleRef ID="WellSample:0_0_0_2_0"/>
        </PlateAcquisition>
        <PlateAcquisition EndTime="2006-05-04T18:13:51.0Z" ID="PlateAcquisition:1" Name="PlateAcquisition Name 1" StartTime="2006-05-04T18:13:51.0Z">
            <Description>PlateAcquisition Description 1</Description>
            <WellSampleRef ID="WellSample:0_0_0_0_1"/>
            <WellSampleRef ID="WellSample:0_0_0_1_1"/>
            <WellSampleRef ID="WellSample:0_0_0_2_1"/>
        </PlateAcquisition>
        <PlateAcquisition EndTime="2006-05-04T18:13:51.0Z" ID="PlateAcquisition:2" Name="PlateAcquisition Name 2" StartTime="2006-05-04T18:13:51.0Z">
            <Description>PlateAcquisition Description 2</Description>
            <WellSampleRef ID="WellSample:0_0_0_0_2"/>
            <WellSampleRef ID="WellSample:0_0_0_1_2"/>
            <WellSampleRef ID="WellSample:0_0_0_2_2"/>
        </PlateAcquisition>

@will-moore
Copy link
Member

Thanks @pwalczysko for that.
I was also looking for a solution and found that you can use fake files (https://bio-formats.readthedocs.io/en/stable/developers/generating-test-images.html)

$ touch "testPlate&plateAcqs=3&plateRows=3&plateCols=4&fields=2.fake"
$ omero import "testPlate&plateAcqs=3&plateRows=3&plateCols=4&fields=2.fake"
Screenshot 2023-12-07 at 21 08 21

@will-moore
Copy link
Member

I imported a 96-well, 3-PlateAcquisitions plate into merge-ci https://merge-ci.openmicroscopy.org/web/webclient/?show=plate-12205

@knabar knabar added this to the 5.24.0 milestone Dec 15, 2023
@will-moore
Copy link
Member

Looks good and is working fine:

Screenshot 2023-12-15 at 16 20 46

@pwalczysko
Copy link
Member

Was able to repeat both the bug (withoiut this PR, on merge-ci) and the fix (with this PR, on merge-ci).
Works as expected.

@knabar knabar merged commit e061604 into ome:master Dec 19, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants