Skip to content

Instantly share code, notes, and snippets.

@atarkowska
Last active February 6, 2017 13:03
Show Gist options
  • Save atarkowska/a7ecf7435958a20d343cbc8fe9aa60f8 to your computer and use it in GitHub Desktop.
Save atarkowska/a7ecf7435958a20d343cbc8fe9aa60f8 to your computer and use it in GitHub Desktop.
idr-0008 reannotate demo33
OMERO_DIST='/home/omero/workspace/OMERO-server/OMERO.server'
IDR_METADATA='/tmp/idr-metadata'
# idr0008-rohn-actinome/screenA
# http://10.0.51.135/web/webclient/?show=screen-154
# delete gene annotations
$OMERO_DIST/bin/omero metadata populate --batch 10 --wait 600 --context deletemap --localcfg '{"ns":"openmicroscopy.org/mapr/gene"}' Screen:154 --report
# generate new table
$OMERO_DIST/bin/omero delete Annotation:6777027
$OMERO_DIST/bin/omero metadata populate --file $IDR_METADATA/idr0008-rohn-actinome/screenA/idr0008-screenA-annotation.csv Screen:154
# populate new gene annotations
$OMERO_DIST/bin/omero metadata populate --context bulkmap --cfg $IDR_METADATA/idr0008-rohn-actinome/screenA/idr0008-screenA-bulkmap-config.yml Screen:154 --localcfg '{"ns":"openmicroscopy.org/mapr/gene"}' --report
# DELETE orphaned
# check how many orphaned
select distinct a.*, mv.* from annotation as a
inner join annotation_mapvalue as mv on (mv.annotation_id = a.id)
left outer join imageannotationlink as ial on (ial.child = a.id)
left outer join wellannotationlink as wal on (wal.child = a.id)
where ial.child is null and wal.child is null
and a.ns like 'openmicroscopy.org%'
and a.ns not in ('openmicroscopy.org/omero/client/mapAnnotation', 'openmicroscopy.org/omero/bulk_annotations.map')
$OMERO_DIST/bin/omero delete Annotation:6777389
$OMERO_DIST/bin/omero delete Annotation:6784588
$OMERO_DIST/bin/omero delete Annotation:6787011
$OMERO_DIST/bin/omero delete Annotation:6796010
$OMERO_DIST/bin/omero delete Annotation:6805811
# review if the following urls shows only one map in metadata pane
http://idr-demo.openmicroscopy.org/mapr/gene/?value=FBgn0026361
http://idr-demo.openmicroscopy.org/mapr/gene/?value=FBgn0014029
http://idr-demo.openmicroscopy.org/mapr/gene/?value=FBgn0259923
http://idr-demo.openmicroscopy.org/mapr/gene/?value=FBgn0000427
http://idr-demo.openmicroscopy.org/mapr/gene/?value=FBgn0011710
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment