Hi
The organisation of screening data is as follow
Screen-Plate-Plate Acquisition-Well-WellSample
i.e. a Plate can have several plate acquisition and wells obviously several fields (well samples in our model)
The image is linked to the well sample object.
1 & 2
To load all the screens/plates for a given user you can do the following
- Code: Select all
ParametersI param = new ParametersI();
param.exp(omero.rtypes.rlong(userID));
param.orphan(); //to load the plate not in a screen
proxy.loadContainerHierarchy(Screen.class.getName(), null, param);
The call above will return a collection of Screen or Plate (if orphan is set and plate not contained in a screen). The returned screen objects have the plates loaded, so you do not need another call to load the plates
To load a given plate or well, you specify the id of the screen/plate
e.g. for a plate (you code sample was not correct)
- Code: Select all
proxy.loadContainerHierarchy(Plate.class.getName(), Arrays.asList(plate.getId()), param);
Note that the param.leaves() option is not taken into account for screening data.
so the example above will return a Plate/Plate acquisition but no images.
3 To retrieve the Wells/Wells Samples/Images
Unfortunately, we have not added the method to the service so you will have to do the following
- Code: Select all
ParametersI param = new ParametersI();
param.addLong("plateID", plateID);
sb = new StringBuilder();
sb.append("select well from Well as well ");
sb.append("left outer join fetch well.plate as pt ");
sb.append("left outer join fetch well.wellSamples as ws ");
sb.append("left outer join fetch ws.plateAcquisition as pa ");
sb.append("left outer join fetch ws.image as img ");
sb.append("left outer join fetch img.pixels as pix ");
sb.append("left outer join fetch pix.pixelsType as pt ");
sb.append("where well.plate.id = :plateID");
if (acquisitionID > 0) { //good if you have several plate acquisition linked to a plate
sb.append(" and pa.id = :acquisitionID");
param.addLong("acquisitionID", acquisitionID);
}
IQueryPrx service;
List<IObject> wells = service.findAllByQuery(sb.toString(), param);
You can then access the well sample object from the well.
Hope it helps
Jmarie