Skip to content

Instantly share code, notes, and snippets.

View atarkowska's full-sized avatar

Ola Tarkowska atarkowska

  • Cambridge, UK
View GitHub Profile
/*
* stitching
*/
process coordinates {
input:
file input_dir
val row from ch_non_clusters.mix(ch_clusters).splitCsv(header: true, sep:'\t' )
output:
brew install gource
git log --pretty=format:user:%aN%n%ct --reverse --raw --encoding=UTF-8 --no-renames > bf.log
gource -s .01 -1920x1080 --auto-skip-seconds .1 --multi-sampling --stop-at-end --key --highlight-users --hide mouse,progress,filenames --file-idle-time 0 --max-files 0 --background-colour 000000 --output-ppm-stream - --output-framerate 30 bf.log --logo bf-logo.png | avconv -y -r 30 -f image2pipe -vcodec ppm -i - -b 65536K movie-bf.mp4
@atarkowska
atarkowska / gist:2b77f8386edc99a8955038f37720ab8c
Last active July 20, 2017 11:46
generate thumbnail using BioFormats
package test;
import java.awt.BorderLayout;
import java.awt.image.BufferedImage;
/*
SEE https://github.com/openmicroscopy/openmicroscopy/blob/develop/components/romio/src/ome/io/bioformats/BfPixelsWrapper.java#L360
* #%L
@atarkowska
atarkowska / gist:a7ecf7435958a20d343cbc8fe9aa60f8
Last active February 6, 2017 13:03
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='/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
(django) MacBookPro:omero.git ola$ createdb -E UTF8 -O omero test -h localhost -U postgres
(django) MacBookPro:omero.git ola$ omego db init --serverdir /Users/ola/OMERO/omero.git/dist --dbname test
2017-02-03 10:35:26,685 [omero.gatewa] ERROR No Pillow installed, line plots and split channel will fail!
2017-02-03 10:35:26,797 [ omego.db] INFO DbAdmin: DbAdmin /Users/ola/OMERO/omero.git/dist ...
2017-02-03 10:35:26,798 [ omego.db] INFO Failed to lookup parameter omero.db.host, using localhost
2017-02-03 10:35:26,798 [omego.extern] INFO Executing [custom environment]: psql -d test -h localhost -U postgres -w -A -t --version
2017-02-03 10:35:26,808 [omego.extern] INFO Completed [0.010 s]
2017-02-03 10:35:26,809 [ omego.db] INFO psql version: psql (PostgreSQL) 9.5.3
2017-02-03 10:35:26,810 [ omego.db] INFO Failed to lookup parameter omero.db.host, using localhost
@atarkowska
atarkowska / gist:2b32e36ff1c03a2d86dc6c20703a9ed2
Created February 1, 2017 16:37
review populate metadata based on event log
select el.*, ev.* from eventlog as el
inner join event as ev on (el.event=ev.id)
inner join wellannotationlink as wal on (wal.id = el.entityid)
inner join well as w on (wal.parent=w.id)
inner join plate as p on (w.plate=p.id)
inner join screenplatelink as spl on (spl.child=p.id)
where ev."time" > '2017-01-31 16:00:00.000'
and spl.parent = 1203
and el.action != 'REINDEX'
and el.entitytype = 'ome.model.annotations.WellAnnotationLink'
SELECT
count (distinct mv.value), mv.name, (substring(mv.value from '(https?://([^/]*){1})')) as url
FROM
annotation_mapvalue as mv
WHERE
(substring(mv.value from '(https?://([^/]*){1})')) is not null
GROUP BY mv.name, url
ORDER BY 2;
+ docker-compose -f test/docker-compose.yml up --build --abort-on-container-exit
WARNING: The SKIP_UPGRADE_CHECK variable is not set. Defaulting to a blank string.
WARNING: The OMEROBUILD variable is not set. Defaulting to a blank string.
Building omeroserver
Step 1 : FROM openmicroscopy/omero-ssh-daemon-c7:0.1.1
---> 02e6d0e5628d
Step 2 : MAINTAINER [email protected]
---> Using cache
---> 4408ec196df0
Step 3 : RUN yum install -y epel-release && yum clean all
@atarkowska
atarkowska / gist:23a59883416ff7cc0d1a79e8e9db2a38
Last active November 17, 2016 11:38
populate thumbnails
import requests
COOKIE_NAME = "sessionid_demo3c"
HOST = "http://idr-clone.openmicroscopy.org"
INDEX_PAGE = "{host}/webclient".format(**{'host': HOST})
THUMBNAIL_URL = "{host}/webgateway/render_thumbnail/{image_id}/"
MAP_IMAGE_URL = "{host}/webclient/api/annotations/?type=map&image={image_id}"
def prepare_url(url, params={}):