Skip to content

Conversation

@will-moore
Copy link
Member

Having taken quite a long time to run check_annotations.py I get a not-very-helpful message:

"Missing annotation in csv file"

But no other info is provided.
I'm not sure why we would ever want that behaviour?

I had to look at the script code to find out how to get more info, since the SubmissionWorkflow doesn't tell me.

I try to rerun the script with -v flag to see info logging (another long time to run), but I get so much output that disappears off my terminal, and I can't scroll back to see it!!!

This PR means that we always log the actual errors so we know that after first run of the script.

cc @dominikl

@dominikl
Copy link
Member

dominikl commented Sep 1, 2023

👍 Makes sense, thanks. Good to merge from my point of view.

@will-moore
Copy link
Member Author

I applied this change to the script on idr0125-pilot which allowed me to get the info I needed:

$ python /uod/idr/metadata/idr-utils/scripts/annotate/check_annotations.py Screen:3055 /uod/idr/metadata/idr0125-way-cellpainting/screenA/idr0125-screenA-annotation.csv
WARNING: There are additional entries in the csv file which don't match any images:
ERROR: Problem(s) detected:
ERROR: Missing annotation in csv file
ERROR: SQ00015207__2016-04-24T05_39_26-Measurement1,P1

This suggests that it would also to output the extra info for There are additional entries in the csv file which don't match any images, which is logged at warning level.

So after adding another commit, I now see this:

$ python /uod/idr/metadata/idr-utils/scripts/annotate/check_annotations.py Screen:3055 /uod/idr/metadata/idr0125-way-cellpainting/screenA/idr0125-screenA-annotation.csv
WARNING: There are additional entries in the csv file which don't match any images:
WARNING: # the name of the plate (should be the same as the name of the directory containing the image files),# the well location e.g. A1, A2, A3, etc,No image
ERROR: Problem(s) detected:
ERROR: Missing annotation in csv file
ERROR: SQ00015207__2016-04-24T05_39_26-Measurement1,P1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants