[ome-devel] OMERO URLs of original images from a plate

Jäälinoja, Harri Tapio harri.jaalinoja at helsinki.fi
Sun Feb 12 06:28:00 GMT 2017


Hi Ola,

thanks a lot for your reply! With merged images I mean the ones you see in the plate viewer, not individual C01 per channel, but a multichannel image.

Anyway, after sleeping over this a couple of nights, I started to wonder if what I was trying to do was a good idea to begin with. Let's say I have CellProfiler on a cluster, and I start to process an image list with "omero::iid=nnn" entries. That would mean several parallel downloads of individual images from the OMERO server, right? I noticed there's a link in the OMERO plate viewer to download the entire plate in a an archive. Can I find the archive URL programmatically? Then I could just download that once, unzip and sort out the paths in a script. And exclude images with an error tag found with your second example.

I'll try this tomorrow. Thanks again!

Best,
Harri





________________________________________
From: ome-devel <ome-devel-bounces at lists.openmicroscopy.org.uk> on behalf of Aleksandra Tarkowska (Staff) <A.Tarkowska at dundee.ac.uk>
Sent: 10 February 2017 17:31:57
To: OME External Developer List
Subject: Re: [ome-devel] OMERO URLs of original images from a plate

Hi

What do you mean by merged images? Did you have a chance to check HCS structures (Screen, Plate and Well) of the OME Model in http://www.openmicroscopy.org/site/support/ome-model/developers/model-overview.html?

If you query DB directly to see how that is structured you could try something like

SQL:
select w.id as well_id, ws.well_index as field, i.id as image_id
from image as i
    join wellsample as ws on (ws.image=i.id)
    join well as w on (ws.well=w.id)
    join plate as p on (w.plate=p.id)
    join screenplatelink as spl on (spl.child=p.id)
where spl.parent = :screen_id


Using omero api you could try HQL query and filter by tag value:


ParametersI param = new ParametersI();
param.map.put("sid", omero.rtypes.rlong(102));

StringBuffer sb = new StringBuffer();
sb.append("select new map( w.id as wellid, index(ws) as field, i.id as imgid) ");
sb.append("from Well w ");
sb.append("join w.wellSamples ws ");
sb.append("join ws.image i ");
sb.append("join i.annotationLinks ial ");
sb.append("join ial.child tag ");
sb.append("join w.plate pl ");
sb.append("join pl.screenLinks sl ");
sb.append("join sl.parent s ");
sb.append("where s.id = :sid “);
sb.append("and tag.class = TagAnnotation and tag.textValue = 'error' “);

for (final List<RType> result : queryService.projection(sb.toString(), param)) {
    System.out.println(omero.rtypes.unwrap(result.get(0)));
}

depends on which version of OMERO.jar you are using annotation discriminator may be /basic/text/tag/ (this was fixed in 5.3-develop to map the class TagAnnotation)


Hope that helps

Kind regards

Ola
Software Engineer
Open Microscopy Environment
University of Dundee

On 9 Feb 2017, at 15:36, Jäälinoja, Harri Tapio <harri.jaalinoja at helsinki.fi<mailto:harri.jaalinoja at helsinki.fi>> wrote:

Hi,

this is continuation of my previous question about browsing a plate with the Java API. I've uploaded a couple of plates, in the database it looks like this:

select id,name from image order by id;

 id  |                              name
------+-----------------------------------------------------------------
   1 | LMU-CELLINSIGHT_170111150001_B03f00d0.C01 [Well B03, Field #00]
...
1920 | LMU-CELLINSIGHT_150428120001_B05f00d0.C01 [Well B05, Field #15]
(1920 rows)

So the database only has the merged images of each field in well. The original files are on the OMERO server, but it seems it's not possible to find them with a URL like "omero::iid=123"?

What I have in mind is to pick a plateID and build a corresponding CSV formatted image list for CellProfiler LoadData module (see https://github.com/CellProfiler/CellProfiler/wiki/OMERO:-Accessing-images-from-CellProfiler). Something like:

URL_DAPI,URL_GFP,URL_CY5
omero::iid=123,omero::iid=124,omero::iid=125

(Ideally the image list would exclude fields tagged by the user as imaging errors.)
Is this possible at the moment? If not, would it a reasonable request?

Best,
Harri

---
Harri Jäälinoja
Light Microscopy Unit
Institute of Biotechnology
University of Helsinki
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel


The University of Dundee is a registered Scottish Charity, No: SC015096


More information about the ome-devel mailing list