We're Hiring!

Download archived data with OmeroCli

General user discussion about using the OMERO platform to its fullest. Please ask 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

There are workflow guides for various OMERO functions on our help site - http://help.openmicroscopy.org

You should find answers to any basic questions about using the clients there.

Download archived data with OmeroCli

Postby dasesan » Mon Nov 05, 2012 4:42 pm

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.
dasesan
 
Posts: 10
Joined: Tue Dec 20, 2011 4:03 pm

Re: Download archived data with OmeroCli

Postby jmoore » Mon Nov 05, 2012 9:54 pm

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
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Download archived data with OmeroCli

Postby dasesan » Tue Nov 06, 2012 11:54 am

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
dasesan
 
Posts: 10
Joined: Tue Dec 20, 2011 4:03 pm

Re: Download archived data with OmeroCli

Postby jmoore » Tue Nov 06, 2012 5:36 pm

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
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 1 guest