Skip to content

Commit 58dac72

Browse files
committed
Add all annotation types, handle capitalisation properly
1 parent 9910c04 commit 58dac72

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

omero2pandas/upload.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,16 @@
5656
"Screen": omero.model.ScreenI,
5757
"Well": omero.model.WellI,
5858
"Roi": omero.model.RoiI,
59+
"BooleanAnnotation": omero.model.BooleanAnnotationI,
60+
"CommentAnnotation": omero.model.CommentAnnotationI,
61+
"DoubleAnnotation": omero.model.DoubleAnnotationI,
5962
"FileAnnotation": omero.model.FileAnnotationI,
6063
"ListAnnotation": omero.model.ListAnnotationI,
64+
"LongAnnotation": omero.model.LongAnnotationI,
6165
"MapAnnotation": omero.model.MapAnnotationI,
6266
"TagAnnotation": omero.model.TagAnnotationI,
67+
"TermAnnotation": omero.model.TermAnnotationI,
68+
"TimestampAnnotation": omero.model.TimestampAnnotationI,
6369
"XmlAnnotation": omero.model.XmlAnnotationI,
6470
}
6571

@@ -145,8 +151,9 @@ def generate_omero_columns_csv(csv_path, chunk_size=1000):
145151

146152
def create_table(source, table_name, links, conn, chunk_size):
147153
# Create an OMERO.table and upload data
148-
# Make type case-insensitive
149-
links = [(t.lower().capitalize(), i) for t, i in links]
154+
# Make type case-insensitive, handling annotation caps properly
155+
links = [(t.lower().capitalize().replace("annotation", "Annotation"), i)
156+
for t, i in links]
150157
# Validate link list
151158
working_group = None
152159
roi_only = True

0 commit comments

Comments
 (0)