We're Hiring!

MAPR plugin installation

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.

MAPR plugin installation

Postby sameh » Thu May 24, 2018 9:33 am

Hello everyone ,

we are doing tests with the MAPR plugin on our OMERO database.

We followed the instructions: https://github.com/ome/omero-mapr/

Now, we do not know how to integrate this code into our database?

key_value_data = [["Gene Identifier", "ENSG00000117399"],
                  ["Gene Identifier URL", "http://www.ensembl.org/id/ENSG00000117399"],
                  ["Gene Symbol", "CDC20"]]
map_ann = omero.gateway.MapAnnotationWrapper (conn)
map_ann.setValue (key_value_data)
map_ann.setNs ( "openmicroscopy.org/mapr/gene")
map_ann.save ()
i = conn.getObject ('Image', 2917)
i.linkAnnotation (map_ann)

Is there a Python script that allows us to insert annotations ? Or a simpler way?

Thanks for your help
sameh
 
Posts: 29
Joined: Tue Apr 17, 2018 8:38 am

Re: MAPR plugin installation

Postby wmoore » Fri May 25, 2018 8:51 pm

Hi,

That Python code snippet is using the OMERO Python API to connect to OMERO and create a new Map Annotation.

See https://docs.openmicroscopy.org/omero/5 ... ython.html
You need the OMERO Python libs (shipped with the OMERO.server, or in the OMERO.py download) on your PYTHONPATH and you need Ice installed.

You could also use the OMERO interactive python shell for trying out small bits of code
Code: Select all
$ bin/omero shell --login

# enter login credentials then...

In [1]: from omero.gateway import BlitzGateway
In [2]: conn = BlitzGateway(client_obj=client)
# Then use 'conn' as in the example



An alternative is to use the Java API https://docs.openmicroscopy.org/omero/5 ... /Java.html
I think the Map annotation example is missing from that page (needs updating) but if you want to go that way we can easily provide an example.

Hope that helps.

Will.
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm


Return to User Discussion

Who is online

Users browsing this forum: Google [Bot] and 0 guests

cron