Page 1 of 1

Download archived data with OmeroCli

PostPosted: Mon Nov 05, 2012 4:42 pm
by dasesan
Hi,

I am trying to download archived data via OmeroCli and according to the documentation I can do that by using the 'download' keyword together with the id of the OriginalFile.

However, I found no way so far to retrieve the id of the OriginalFile via OmeroCli. I have tried with the 'hql' and 'search' commands but neither of them returns the id, they seem to return the general image id instead. Any other id's such as the creation_id, update_id, etc don't seem to be reported by these commands.

Does anybody know if I missed anything here?

Thanks a lot in advance.

Re: Download archived data with OmeroCli

PostPosted: Mon Nov 05, 2012 9:54 pm
by jmoore
What do you know about the image you uploaded? Do you have its ID? Or that of the project it was in? If none of the above, this query might be useful:

Code: Select all
omero@gretzky:~$ OMERO-CURRENT/bin/omero hql --admin "select i.id, i.name, o.id, o.name from Image i join i.pixels p join p.pixelsFileMaps m join m.parent o"
Using session 6d1bbb33-29c5-48c8-91f6-89acb39760a9 (root@localhost:4064). Idle timeout: 10.0 min. Current group: system
#  | Col1 | Col2                    | Col3 | Col4                 
----+------+-------------------------+------+----------------------
0  | 3    | PIF55_s1_1_raw01.pic    | 27   | data.raw             
1  | 3    | PIF55_s1_1_raw01.pic    | 28   | PIF55_s1_1_raw01.pic
2  | 3    | PIF55_s1_1_raw01.pic    | 29   | PIF55_s1_1_raw02.pic
3  | 3    | PIF55_s1_1_raw01.pic    | 30   | lse.xml             
4  | 4    | PIF55_s1_1_raw02.pic    | 31   | lse.xml             
5  | 4    | PIF55_s1_1_raw02.pic    | 32   | PIF55_s1_1_raw01.pic
...


where the IDs in Col3 are what you are looking for.

Cheers,
~Josh

Re: Download archived data with OmeroCli

PostPosted: Tue Nov 06, 2012 11:54 am
by dasesan
Hi Josh,

Thanks a lot for your help!

It does work with your query. Since I also know the image ID I can customize the query so that it returns the OriginalFile ID of that image only.

I am curious as to what the 'PixelsFileMaps' and 'Parent' refer to, since I see no table with those names in the Omero database. I guess they are sort of aliases for other table names ...

Thank you very much again,
Daniel

Re: Download archived data with OmeroCli

PostPosted: Tue Nov 06, 2012 5:36 pm
by jmoore
dasesan wrote:Hi Josh,

Thanks a lot for your help!


Glad to hear it.

I am curious as to what the 'PixelsFileMaps' and 'Parent' refer to, since I see no table with those names in the Omero database. I guess they are sort of aliases for other table names ...


"parent" is a column on the "pixelsoriginalfilemap" table.

Cheers,
~Josh