We're Hiring!

custom file import & omero DB

General and open developer discussion about using OMERO APIs from C++, Java, Python, Matlab and more! Please new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

If you are having trouble with custom code, please provide a link to a public repository, ideally GitHub.

custom file import & omero DB

Postby bhcho » Thu May 06, 2010 6:34 pm

Hi all,

1. I manually updated the ome-xml meta data for some images using the EditTiffComment code from
http://ome-xml.org/wiki/OmeTiffCode
And those files passed the validation from http://validator.openmicroscopy.org.uk/
And I tried to upload them into my OMERO server, but it failed. the error message was
java.lang.IllegalArgumentException: Invalid series: 0

Does anyone have this problem and solution?

2. If I include custom information in an XML format using SA:StructuredAnnotation and upload into the OMERO.server, I'm wondering if the OMERO.server just ignore that part or save the information into some tables.
Does anyone have any idea on this?
I suspect "externalinfo" table in the omero DB may do something about the custom information.

BK
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: custom file import & omero DB

Postby jmoore » Tue May 11, 2010 6:51 am

bhcho wrote:1. I manually updated the ome-xml meta data for some images using the EditTiffComment code from http://ome-xml.org/wiki/OmeTiffCode
And those files passed the validation from http://validator.openmicroscopy.org.uk/
And I tried to upload them into my OMERO server, but it failed. the error message was
java.lang.IllegalArgumentException: Invalid series: 0

Does anyone have this problem and solution?


When the error occurs, could you go to the "Import Errors" tab and click on "Send feedback"? If that doesn't work, could you possible send us the importer log files? Go to the help menu and click on "Show log file location". In the "log" directory, you'll find the file "importer.log".

bhcho wrote:2. If I include custom information in an XML format using SA:StructuredAnnotation and upload into the OMERO.server, I'm wondering if the OMERO.server just ignore that part or save the information into some tables.
Does anyone have any idea on this?


The SAs should be parsed into the annotation table, but there are some discrepancies between some versions of the model and the database. What XML schema and server version are you using? Also, could you show us an example of the SAs in question?

I suspect "externalinfo" table in the omero DB may do something about the custom information.


The externalinfo table is only related to external LSIDs, and not specifically to structured annotations. What format do your LSIDs have? At the moment, they are almost certainly being ignored.

Cheers,
~Josh.
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: custom file import & omero DB

Postby bhcho » Tue May 11, 2010 3:51 pm

Thanks,

I sent the feedback from the OMERO.importer.

What XML schema and server version are you using? Also, could you show us an example of the SAs in question?

I'm using the 2009-09 version of the XML Schema and 4.1.1 for OMERO.server.
and the the OME-XML meta information part of my image is

Code: Select all
<?xml version="1.0" encoding="UTF-8"?><!-- Warning: this comment is an OME-XML metadata block, which contains crucial dimensional parameters and other important metadata. Please edit cautiously (if at all), and back up the original data before doing so. For more information, see the OME-TIFF web site: http://ome-xml.org/wiki/OmeTiff. --><OME xmlns:AML="http://www.openmicroscopy.org/Schemas/AnalysisModule/2009-09" xmlns:Bin="http://www.openmicroscopy.org/Schemas/BinaryFile/2009-09" xmlns:MLI="http://www.openmicroscopy.org/Schemas/MLI/2009-09" xmlns:SA="http://www.openmicroscopy.org/Schemas/SA/2009-09" xmlns:OME="http://www.openmicroscopy.org/Schemas/OME/2009-09" xmlns:SPW="http://www.openmicroscopy.org/Schemas/SPW/2009-09" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:CA="http://www.openmicroscopy.org/Schemas/CA/2009-09" xmlns:STD="http://www.openmicroscopy.org/Schemas/STD/2009-09" xmlns:CLI="http://www.openmicroscopy.org/Schemas/CLI/2009-09" xmlns="http://www.openmicroscopy.org/Schemas/OME/2009-09" xsi:schemaLocation="http://www.openmicroscopy.org/Schemas/OME/2009-09 http://www.openmicroscopy.org/Schemas/OME/2009-09/ome.xsd http://www.openmicroscopy.org/Schemas/BinaryFile/2009-09 http://www.openmicroscopy.org/Schemas/BinaryFile/2009-09/BinaryFile.xsd http://www.openmicroscopy.org/Schemas/CA/2009-09 http://www.openmicroscopy.org/Schemas/CA/2009-09/CA.xsd http://www.openmicroscopy.org/Schemas/SPW/2009-09 http://www.openmicroscopy.org/Schemas/SPW/2009-09/SPW.xsd http://www.openmicroscopy.org/Schemas/STD/2009-09 http://www.openmicroscopy.org/Schemas/STD/2009-09/STD.xsd" UUID="urn:uuid:1464879f-992c-41d2-8460-488a8ebf0c7d"><Image ID="Image:0" Name="Name92"><Pixels DimensionOrder="XYCZT" ID="Pixels:0" Type="uint16" SizeC="1" SizeT="1" SizeX="512" SizeY="382" SizeZ="1"><TiffData><UUID FileName="img_1_d.ome.ome.tif">urn:uuid:1464879f-992c-41d2-8460-488a8ebf0c7d</UUID></TiffData></Pixels></Image><SA:StructuredAnnotations  xmlns="http://www.openmicroscopy.org/Schemas/SA/2009-09"><XMLAnnotation ID="Annotation:001" Namespace="http://omepslid.compbio.cs.cmu.edu/Schemas/PSLID/2010-09"><Value><Dataset>HeLa2D</Dataset><Sample><CellType>HeLa</CellType><Target>LAMP2</Target></Sample><PSLID><SLIC><Results>ER</Results><Features FeatureSetName="SLF10"><Feature Name="Haralick_01">0.5</Feature><Feature Name="Haralick_02">1.5</Feature><Feature Name="Haralick_03">4.5</Feature><Feature Name="Haralick_04">2.5</Feature><Feature Name="Haralick_05">0.0</Feature></Features><Classifier>LIBSVM</Classifier></SLIC></PSLID></Value></XMLAnnotation></SA:StructuredAnnotations></OME>



so the SA part is


Code: Select all
<SA:StructuredAnnotations  xmlns="http://www.openmicroscopy.org/Schemas/SA/2009-09"><XMLAnnotation ID="Annotation:001" Namespace="http://omepslid.compbio.cs.cmu.edu/Schemas/PSLID/2010-09"><Value><Dataset>HeLa2D</Dataset><Sample><CellType>HeLa</CellType><Target>LAMP2</Target></Sample><PSLID><SLIC><Results>ER</Results><Features FeatureSetName="SLF10"><Feature Name="Haralick_01">0.5</Feature><Feature Name="Haralick_02">1.5</Feature><Feature Name="Haralick_03">4.5</Feature><Feature Name="Haralick_04">2.5</Feature><Feature Name="Haralick_05">0.0</Feature></Features><Classifier>LIBSVM</Classifier></SLIC></PSLID></Value></XMLAnnotation></SA:StructuredAnnotations>


Could you tell me how the OMERO.server parse this information?
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: custom file import & omero DB

Postby mlinkert » Thu May 13, 2010 4:03 pm

I sent the feedback from the OMERO.importer.

What XML schema and server version are you using? Also, could you show us an example of the SAs in question?



I'm using the 2009-09 version of the XML Schema and 4.1.1 for OMERO.server.


As mentioned on the relevant feedback items, 4.1.1 does not support OME-XML schema versions later than 2008-09. The upcoming 4.2 release will support up to 2010-04, so your OME-TIFF files will import if you upgrade to 4.2.

Regards,
-Melissa
User avatar
mlinkert
Team Member
 
Posts: 353
Joined: Fri May 29, 2009 2:12 pm
Location: Southwest Wisconsin

Re: custom file import & omero DB

Postby bhcho » Thu May 13, 2010 4:03 pm

OK. now I figured out the current OMERO.server 4.1.1. does not support OME-XML Schema version 2009-09.
So I changed the OME-XML info of my files using the 2008-09 version and now successfully imported those images on my OMERO.server.

Thanks.

Then, could you tell me how the server parsed the SA annotation part (another XML format)?
That is, Which tables should I look into in order to access the SA annotation part?

when I look into the "annotation" table from the omero DB after I imported some files,
it looks like below.
Can anyone tell me what does this mean? I don't see any information that I inserted into the SA annotation.

Code: Select all
omero=> select * from annotation;
    discriminator    | id  | description | permissions |                      ns                       | version | textvalue | doublevalue | timevalue | boolvalue | longvalue | creation_id | external_id | group_id | owner_id | update_id | file | thumbnail
---------------------+-----+-------------+-------------+-----------------------------------------------+---------+-----------+-------------+-----------+-----------+-----------+-------------+-------------+----------+----------+-----------+------+-----------
/type/OriginalFile/ |   1 |             |        -103 | openmicroscopy.org/omero/import/companionFile |         |           |             |           |           |           |         368 |             |        4 |        2 |       368 |   51 |         
/type/OriginalFile/ |  51 |             |        -103 | openmicroscopy.org/omero/import/companionFile |         |           |             |           |           |           |       25646 |             |        4 |        2 |     25646 |  101 |         
/type/OriginalFile/ | 101 |             |        -103 | openmicroscopy.org/omero/import/companionFile |         |           |             |           |           |           |      180736 |             |        4 |        2 |    180736 |  151 |         
/type/OriginalFile/ | 102 |             |        -103 | openmicroscopy.org/omero/import/companionFile |         |           |             |           |           |           |      180741 |             |        4 |        2 |    180741 |  152 |         
(4 rows)




those external info is something like
Code: Select all
<SA:StructuredAnnotations  xmlns="http://www.openmicroscopy.org/Schemas/SA/2008-09">
<XmlAnnotation ID="Annotation:001" Namespace="http://omepslid.compbio.cs.cmu.edu/Schemas/PSLID/2010-09">
<Link>LSID:0002</Link>
<Value>
<Dataset>HeLa2D</Dataset>
<Sample><CellType>HeLa</CellType><Target>LAMP2</Target></Sample>
<PSLID><SLIC><Results>NUCLEUS</Results><Features FeatureSetName="SLF10"><Feature Name="Haralick_01">0.5</Feature><Feature Name="Haralick_02">1.5</Feature><Feature Name="Haralick_03">4.5</Feature><Feature Name="Haralick_04">2.5</Feature><Feature Name="Haralick_05">0.0</Feature></Features><Classifier>LIBSVM</Classifier></SLIC></PSLID>
</Value></XmlAnnotation></SA:StructuredAnnotations>
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: custom file import & omero DB

Postby cxallan » Thu May 20, 2010 2:02 pm

Your XML is valid. You'll need either a build from Trunk or wait until Beta 4.2 is released to have the correct mapping for the structured annotations through OMERO.importer.
cxallan
Site Admin
 
Posts: 509
Joined: Fri May 01, 2009 8:07 am

Re: custom file import & omero DB

Postby bhcho » Fri May 21, 2010 4:41 pm

Thanks, cxallan.

Given that the current OMERO does not parse the structured annotations (SA), I was trying to directly access to those imported images from the omero DB, in order to parse the SA manually.
But I can not figure out which table has the link information to those files. Could you tell me how to get access to hose files?

More importantly, afte I uploaded those images with the SA on OMERO.server, I downloaded those imges again to my laptop. When I look into the meta informtion, that SA part was gone!!
This is very important problem to me.
Does the current OMERO server just throw away the SA information?
I mean, Does the current OMERO version (4.1.1) parse the meta information, save it corresponding tables, and save only Tiffdata somewhere in the DB, without keeping the original ome-tiff image file?
Does this mean there is no way to retrieve the SA once I upload the mages to the current OMERO version?

Best,
BK
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm

Re: custom file import & omero DB

Postby cxallan » Mon May 24, 2010 1:48 pm

It does not throw any information away the SA's are just not present in the export. This is a known problem with 4.1.x. The main reasons for this were the staggered release of the schema in relationship to the 4.1.x series of releases and the time required to implement a "full" export.

We will address these problems in 4.2.0 both organizationally (the schema releases will be synchronized with OMERO and Bio-Formats releases) and programmatically (SAs will be present in all exports from OMERO).

The original OME-TIFF file is not saved into OMERO unless requested via the "Archive" option in OMERO.importer. All data present in that OME-TIFF is "imported" into the database and binary data store.

If you'd like to patch SA export into your 4.1.x server for specific annotations that you'd like to see exported that would not be hard.
cxallan
Site Admin
 
Posts: 509
Joined: Fri May 01, 2009 8:07 am

Re: custom file import & omero DB

Postby bhcho » Mon May 24, 2010 2:15 pm

Thanks.

I hope the new release of the OMERO is coming soon. ;)
bhcho
 
Posts: 236
Joined: Mon Apr 05, 2010 2:15 pm


Return to Developer Discussion

Who is online

Users browsing this forum: Google [Bot] and 0 guests