[ome-users] Import plate data from the FEI MORE as screen in OMERO

Kai Schleicher kai.schleicher at unibas.ch
Thu Nov 15 15:36:25 GMT 2018


Hi Mark,

thank you for your kind reply! I am happy that we are closing in on what 
to do :)

I indeed wish to have all images associated to one plate imported in OMERO

 From what I understand there is now way around (i) writing my own 
companion file and (ii) fixing the ome metadata of my images with uuids. 
I believe the approach you outlined would be the way to go:

> can help you there. You /might/ be able to get away with getting the
> companion file right and being a lot more minimal about the TIFFs' XML
> but I am not sure what you can do without there: my example tried to
> adhere to our current suggestions for how things should be but maybe
> includes more than is needed to get something working.

now that I know what to do, I am afraid I am stuck finding out the best 
way of how to actually do it.

Did you by chance use a program to write your example companion file?

I assume a logic approach would be to assemble my companion file by 
programmatically going through all my xml files.

For example, I thought of starting out by

  * get and merge all blocks of "<SPW:Plate"...."</SPW:Plate>"
  * get and add underneath all blocks of "<OME:Image"..."</OME:Image>"

from my xmls, but I am uncertain how to do this. I can get these blocks 
of strings with regex, but comparing and merging them into a new file 
(like in git) eludes me.

Do you know by chance of any code snippets that I could use, or do you 
have maybe a conceptual hint?

Thank you very much for your help!

Cheers,
Kai


On 11/9/18 12:01 PM, Mark Carroll (Staff) wrote:
> Dear Kai,
>
>   > sorry to open this old discussion again, but it is only now that I
> finally came around to look into it again.
>
> I understand completely. (-: Within OME there is still so much we want
> to do to improve OMERO but there are enough pieces that often we have to
> put tasks aside for a while so as to make progress on others.
>
>   > All references mentioned below are to
> "testplate-splitC_noZ_noT_C5_1_C1.xml/.tif" of my new dataset
>
> There doesn't seem to be a *.companion.ome file providing the metadata
> for the multiple TIFF files. Though that's fine if you're okay to import
> the different files as being many plates with one field on each.
>
>   >> * In the XML files there are multiple channels with the same ID. Channel
>   >> IDs are defined by the ome.xsd file as unique keys. (In practice, OMERO
>   >> will unify identical ones on import.)
>   > in the new xml files, channel IDs are now unique (line 132)
>
> Indeed they are. (-:
>
>   >> * The second XML file has no WellSample tags tying the field images to
>   >> plate wells.
>   > All xml files now have a unique WellSample tag (eg line 36)
>
> Great. However, they don't contain an ImageRef element tying them to the
> image.
>
>   >> The provided XML files do not have a UUID,
>   > I found a SA:XMLAnnotation with UUID in line 151, is that it?
>
> I was expecting a UUID attribute on the top-level OME element. However,
> that's less important if you're not using a companion file to tie all
> the fields into the one plate.
>
>   >> they do not name the image files
>   > I found an entry OME:Image with UUID in line132. In this case, does
> the UUID serve as the name as well? Otherwise, the filename entry is
> really missing.
>
> I'm referring to the FileName attribute that I use with the UUID inside
> the TiffData element for my companion file example. However, again,
> that's probably not needed if you're not using a companion file to tie
> all the fields into the one plate.
>
>   >> nor do the image files reference their XML file by filename or UUID.
>   > I am not sure if Ichecked at the right place. I opened the *.tif
> image with bio-formats with ome xml metadata checked and then compared
> the content of the such opened xml with the xml that was saved beside
> the image.
>
> If you look at the XML in the description of my example TIFFs it's the
> attributes of the BinaryOnly element I'm referring to here. In those
> attributes all my TIFFs provide the name and UUID of the companion file.
> Again, only needed if you're using a companion file to tie all the
> images together into a plate.
>
> (snip)
>   >> * For a multi-file OME-TIFF, as in the example I provided, UUIDs and
> filenames tie the XML file and the field image files together.
>   >
>   > I am not sure exactly how to tie these things together, and I
> realised that several fields are missing in my image metadadata.
>
> With luck, comparing with my example should get you much of the way there.
>
>   > Do you think there is a way to make it work with my files the way
> they are right now?
>
> Depending what "it" is, all I can think of is that if you want them all
> in the one plate then perhaps there is some trick where you import the
> many one-field plates then write a script to use OMERO's query and
> update services to relink the well samples all into the one plate and
> delete the others. As even your separate channels are (I think) in
> different TIFFs that's probably not for the faint-hearted though.
>
>   > To reproduce the example that you have, I would need to edit the
> metadata stored inside each .tif. Is it necessary to do that, and if yes
> - how can it be done?
>
> https://docs.openmicroscopy.org/latest/bio-formats5.9/users/comlinetools/edit.html
> can help you there. You /might/ be able to get away with getting the
> companion file right and being a lot more minimal about the TIFFs' XML
> but I am not sure what you can do without there: my example tried to
> adhere to our current suggestions for how things should be but maybe
> includes more than is needed to get something working.
>
>   > Thank you very much for your help! I apologise for the vague
> questions, but I unfortunately do not really have a clear understanding
> of how things are supposed to be in this case.
>
> With luck we can get you there in the end. (-:
>
> -- Mark
>
> The University of Dundee is a registered Scottish Charity, No: SC015096
> _______________________________________________
> ome-users mailing list
> ome-users at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-users/attachments/20181115/34365698/attachment.html>


More information about the ome-users mailing list