chanzuckerberg / cryoet-data-portal

CryoET Data Portal
MIT License
18 stars 10 forks source link

Not all annotation shape types are displayed in the annotation table on "Single Run" page #638

Closed uermel closed 6 months ago

uermel commented 6 months ago

The expected behavior is: If an annotation has multiple files for the same shape_type there is only one row in the Annotations table, but if there are multiple values for shape_type for one annotation, there is a row for each shape_type.

This is occurring on all Runs

Example: Run 277, Annotation 2395

This Annotation has 3 associated files (2 for shape_type=="SegmentationMask", 1 for shape_type=="InstanceSegmentation").

The table should display: Annotation ID Deposition Date Object Name Object Shape Type Precision Recall
2395 2024-02-20 Membrane InstanceSegmentation N/A N/A
2395 2024-02-20 Membrane SegmentationMask N/A N/A
Currently it only displays: Annotation ID Deposition Date Object Name Object Shape Type Precision Recall
2395 2024-02-20 Membrane InstanceSegmentation N/A N/A

The API client shows that all files are stored correctly in the database:

from cryoet_data_portal import Client, AnnotationFile

client = Client()
anno_files = AnnotationFile.find(client, [AnnotationFile.annotation.tomogram_voxel_spacing.run.id == 277])

[f"{af.annotation.id} - {af.annotation.object_name}: {af.shape_type} {af.format}" for af in anno_files]

['2395 - membrane: InstanceSegmentation ndjson', '2395 - membrane: SegmentationMask zarr', '2395 - membrane: SegmentationMask mrc', '1292 - Ribosome, 80 S: Point ndjson', '15288 - cytosolic ribosome: Point ndjson']

junxini commented 6 months ago

@codemonkey800 would you be able to point this?

codemonkey800 commented 6 months ago

@uermel this should be fixed now, could you double check on your end when you get a chance please? I'll close this but feel free to reopen if it's still happening for you 🙏

uermel commented 6 months ago

Yes, seems to be all good!