Skip to content

Populate metadata example#4455

Merged
joshmoore merged 3 commits intoome:developfrom
will-moore:populate_metadata_example
Feb 10, 2016
Merged

Populate metadata example#4455
joshmoore merged 3 commits intoome:developfrom
will-moore:populate_metadata_example

Conversation

@will-moore
Copy link
Copy Markdown
Member

Now that the webclient will display bulk metadata for Plates #4446 (and Insight has done for some time), this gives users an example of how to use populate_metadata from within a python script to upload Table data to a plate from a csv.

To test:

@joshmoore
Copy link
Copy Markdown
Member

Question: Do we want to try and provide more vanilla Python code for doing this (without using populate_metadata.py)? This will be quite a bit more complex. However, we may still want this for Matlab or Java, (E.g. users asking how to do this from IJ)?

Options I can think of:

  • Turn this into a service (i.e. provide a cmd command)
  • Have a script which allows doing this
  • Allow use of the CLI from the client-side

@will-moore
Copy link
Copy Markdown
Member Author

Test fails https://ci.openmicroscopy.org/view/Failing/job/OMERO-DEV-merge-training/227/console
because the plate only has one Well, but test code expects 3 columns: A1, A2, A3.

File "/opt/hudson/workspace/OMERO-DEV-merge-training/OMERO.py/lib/python/omero/util/populate_metadata.py", line 423, in post_process
    well = well[well_column.values[i]]
KeyError: -1L

@will-moore
Copy link
Copy Markdown
Member Author

@sbesson Where can I fix the DEV-merge-training job to create a Plate with 3 columns instead of one?

@joshmoore Best solution might be to create a "Populate_Metadata.py" script, very similar to
https://github.com/ome/scripts/blob/develop/omero/import_scripts/Populate_ROI.py, which replicates the code in this PR, using a csv file that has been attached to the Plate/Screen. This would even allow regular users to run the script from Insight / Web / CLI.

@sbesson
Copy link
Copy Markdown
Member

sbesson commented Feb 3, 2016

@will-moore the training data is all generated using the script under https://github.com/sbesson/openmicroscopy/blob/develop/examples/Training/training_setup.sh. You should be adjust the SPW fake filename to match your new requirements /cc @ximenesuk

@emilroz
Copy link
Copy Markdown
Member

emilroz commented Feb 3, 2016

@will-moore this may be worth looking at: https://github.com/glencoesoftware/omero-user-scripts/blob/master/util_scripts/Populate_Metadata.py
It's not directly from a csv but from a File Annotation that holds a csv.

@will-moore
Copy link
Copy Markdown
Member Author

Thanks @emilroz that's perfect! @joshmoore do we want to add that script into the the main OMERO release, or leave it under glencoe scripts and point users there?

@will-moore will-moore closed this Feb 3, 2016
@will-moore will-moore reopened this Feb 3, 2016
@manics
Copy link
Copy Markdown
Member

manics commented Feb 3, 2016

In case it's relevant there's a whole new omero metadata command on the way (e.g. #4037)

@joshmoore
Copy link
Copy Markdown
Member

@joshmoore do we want to add that script into the the main OMERO release, or leave it under glencoe scripts and point users there?

Better to copy it over, @will-moore.

@jburel
Copy link
Copy Markdown
Member

jburel commented Feb 4, 2016

@will-moore: will you take care of the Java/matlab examples too?

@simleo
Copy link
Copy Markdown
Member

simleo commented Feb 9, 2016

Looks good. Here is what I get on the right panel for the three wells (I've merged screenshots vertically to a single image):

tabular_data

@joshmoore
Copy link
Copy Markdown
Member

👍

joshmoore added a commit that referenced this pull request Feb 10, 2016
@joshmoore joshmoore merged commit a325736 into ome:develop Feb 10, 2016
@jburel jburel added this to the 5.2.2 milestone Feb 29, 2016
@will-moore will-moore deleted the populate_metadata_example branch February 18, 2019 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants