SPW and patterns

Dear all

Can I confirm how to use patterns to design the structure of the plate? https://docs.openmicroscopy.org/bio-formats/6.0.1/formats/pattern-file.html doesnt mentione anything about SPW

I found the old thread https://www.openmicroscopy.org/community/viewtopic.php?p=20693 but it suggest to use util script. Does it mean is not supported and I need to write my own script like https://github.com/IDR/idr-metadata/blob/71b0f550866a030ba68dd865dac59d863af3ef9b/idr0035-caie-drugresponse/generate_screens/make_screen.py?

Ola

I also found https://github.com/pharmbio/omero/pull/2#issuecomment-475579557 but it seems to not work for me, could you please suggest how to list wells in patterns please?

A1_F1P0T0.ome.tiff (well B2)
A2_F1P0T0.ome.tiff (well B3)
A3_F1P0T0.ome.tiff (well B4)
A4_F1P0T0.ome.tiff (well B5)

pattern:
A<1-4>_F1P0T0.ome.tiff

Do I need to rename them to match Well position?

Hi @olatarkowska,

.pattern files don’t support the SPW structure which is why we initially developed .screen files for the IDR. However, that reader is not intended for the mainline. The preferred solution at the moment would be to generate a .companion.ome OME-XML file which ties the TIFFs together as a SPW dataset.

~Josh

1 Like

Could you please provide me with an example? Is there any manual how to use https://github.com/ome/ome-model/pull/91 ?

Hi Ola,

we do not have any proper manual for this experimental API. However we have been been using it in the context of IDR for creating metadata files for loading original raw data. So far the examples have been primarily targetted at non-HCS studies but you can see real example with the following study-specific scripts for idr0047, idr0052 or idr0065.

For generated HCS companion files with the library, a starting example using your file convention might be the following:

#!/usr/bin/env python
from ome_model.experimental import Plate, Image, create_companion

rows = 1
columns = 4
plate = Plate("test", rows, columns)
for row in range(rows):
    for column in range(columns):
        well = plate.add_well(row, column)
        basename = "%s%s" % (chr(row + 65), column)
        image = Image(basename, 512, 512, 1, 1, 1)
        image.add_tiff('%s_F1P0T0.ome.tiff' % basename, c=0, z=0, t=0)
        image.add_channel("channel", -1)
        well.add_wellsample(0, image)
create_companion(plates=[plate], out='plate.companion.ome')