Page Contents

OMERO

Downloads
Feature List
Licensing

Previous topic

Manage sessions

Next topic

Manage tags

This Page

Note

This documentation is for the new OMERO 5.3 version. See the latest OMERO 5.2.x version or the previous versions page to find documentation for the OMERO version you are using if you have not upgraded yet.

Creating containers and annotations

The omero obj command allows users to create and update OMERO objects. A complete Glossary of all OMERO Model Objects is available for reference.

This command can be used to create containers, i.e. projects, datasets, screens and folders. It can also be used to create annotations, and, combined with the omero upload command, file annotations. These annotations can then be attached to containers or imported images and plates. This page gives a few examples of some simple but fairly common workflows.

Creating containers

Create a dataset with a name:

$ bin/omero obj new Dataset name=NewDVSet
Dataset:51

And then update that dataset to add a description:

$ bin/omero obj update Dataset:51 description='A dataset for new DV images'
Dataset:51

Create a screen with a name and description:

$ bin/omero obj new Screen name=Screen001 description='A short description'

To create a project/dataset hierarchy a link must be created between the two containers:

$ bin/omero obj new Project name=NewImages
Project:101
$ bin/omero obj new ProjectDatasetLink parent=Project:101 child=Dataset:51
ProjectDatasetLink:221

If you are comfortable using the command line then you can capture the command outputs to feed in to other commands, for example:

$ dataset=$(bin/omero obj new Dataset name=dataset-1)
$ project=$(bin/omero obj new Project name=project-1)
$ bin/omero obj new ProjectDatasetLink parent=$project child=$dataset
ProjectDatasetLink:222

Creating and attaching annotations

Create a comment annotation and attach it to a dataset:

$ bin/omero obj new CommentAnnotation textValue='Hello World!'
CommentAnnotation:2
$ bin/omero obj new DatasetAnnotationLink parent=Dataset:51 child=CommentAnnotation:2
DatasetAnnotationLink:2

Upload a file and then use it as file annotation on an image:

$ bin/omero upload analysis.csv
OriginalFile:275
$ bin/omero obj new FileAnnotation file=OriginalFile:275
FileAnnotation:5
$ bin/omero obj new ImageAnnotationLink parent=Image:51 child=FileAnnotation:5
ImageAnnotationLink:2