Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@joshmoore
joshmoore / query.py
Created June 29, 2017 10:33
Compound query
import omero
compounds = unwrap(q.projection(("select distinct mv1.value, mv2.value from Image i "
"join i.annotationLinks l1 join l1.child as a1 join a1.mapValue as mv1 "
"join i.annotationLinks l2 join l2.child as a2 join a2.mapValue as mv2 "
"join i.wellSamples ws join ws.well w join w.plate p "
"where p.id = 4403 and mv1.name = 'Product Use Annotation' and mv2.name = 'Compound Name'"), None))
@joshmoore
joshmoore / Dockerfile.java
Created June 29, 2017 09:09
IDR Java Example
FROM java:8-jdk
ENV OMERO_URL https://downloads.openmicroscopy.org/omero/5.3.2/artifacts/OMERO.java-5.3.2-ice36-b62.zip
RUN curl -A Docker "$OMERO_URL" > /tmp/omero.zip \
&& unzip -qd /opt /tmp/omero.zip \
&& ln -s /opt/OMERO.java* /opt/omero \
&& test -e /opt/omero \
&& rm /tmp/omero.zip
@joshmoore
joshmoore / example.m
Last active June 29, 2017 09:52
IDR Matlab Example
% init (Move this file into the OMERO.matlab toolbox)
clear all;close all;
% import classes
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@joshmoore
joshmoore / Dockerfile
Created February 23, 2017 15:23
jupyter Dockerfile (draft for R)
FROM jupyter/datascience-notebook:latest
MAINTAINER ome-devel@lists.openmicroscopy.org.uk
################################################################################
# Custom
################################################################################
USER root
@joshmoore
joshmoore / keybase.md
Created January 12, 2017 11:52
keybase.md

Keybase proof

I hereby claim:

  • I am joshmoore on github.
  • I am joshmoore (https://keybase.io/joshmoore) on keybase.
  • I have a public key whose fingerprint is 94F3 B57B 2F45 CA90 3700 6EA8 7025 B59F F45A 6403

To claim this, I am signing this object:

@joshmoore
joshmoore / Options.java
Created December 6, 2016 11:42
Various Options API possibilities
public class Options {
public static void main(String[] args) {
new Consumer1();
new Consumer2();
new Consumer3();
new Consumer4();
new Consumer5();
new Consumer6();
new Consumer7();
new Consumer8();
@joshmoore
joshmoore / 12768.txt
Created August 24, 2016 13:53
Description for trac 12768
5.0.8 Release Insight\r\nServer: Octopus, latest.\r\nJava(TM) SE Runtime Environment (build 1.7.0_51-b13)\r\nJava HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)\r\n\r\nI can replicate this, Simon can't. Not sure if it's something specific to my machine / Java install.\r\n\r\nWorkflow:\r\n\r\nLog in as admin\r\nOpen an image in the full viewer (used a 'big' Ray jpeg in dataset 'downloads')\r\nClick the ROI tool button\r\nDraw a rectangular ROI (don't save!)\r\nClose the full viewer\r\n presented with a dialogue box to save the changes to the ROIs.\r\n Press Yes, Boom.\r\n\r\n\r\nOSX Dialogue: `Main quit unexpectedly`\r\n\r\n{{{\r\n\r\nProcess: OMERO.insight [13048]\r\nPath: /Applications/OMERO.insight-5.0.8-ice35-b60-mac_Java7+/OMERO.insight.app/Contents/MacOS/OMERO.insight\r\nIdentifier: org.openmicroscopy.insight\r\nVersion: 5.0.8-ice35-b60 (5.0.8-ice35-b60)\r\nCode Type: X86-64 (Native)\r\nParent Process: launchd [655]\r\nResponsible: OMERO.insight [1
@joshmoore
joshmoore / pix.py
Created July 27, 2016 09:17
Script to refresh the B-F cache
#!/usr/bin/env python
from argparse import ArgumentParser
from fileinput import input
from sys import argv
from sys import exit
from sys import stdout
from sys import stderr
from time import time
@joshmoore
joshmoore / to_path.py
Created May 20, 2016 16:37
OMERO to_paths.py
#!/usr/bin/env python
from os.path import exists
import os
import sys
import fileinput
DIST = "/opt/omero/omero/OMERO-CURRENT/lib/python"
DIST = os.environ.get("OMERO_DIST", DIST)
@joshmoore
joshmoore / track.yml
Created March 11, 2016 11:00
track.yml
plate1_3_003:
00088:
T00015__O0005:
Frame: [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36]
Timestamp: [7682.0, 8193.0, 8704.0, 9217.0, 9724.0, 10234.0, 10745.0, 11255.0,
11764.0, 12273.0, 12781.0, 13289.0, 13801.0, 14310.0, 14821.0, 15332.0, 15842.0,
16353.0, 16865.0, 17375.0, 17884.0, 18397.0]
isEvent: [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
isSplit: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]