Skip to content

Instantly share code, notes, and snippets.

View joshkh's full-sized avatar

Joshua Heimbach joshkh

View GitHub Profile
@joshkh
joshkh / genes.edn
Created April 25, 2018 10:58
fly genome
{:adjective ({:path "Gene.symbol", :value "d", :id 1000005, :pos :adjective}
{:path "Gene.synonyms.value", :value "D", :id 1000005, :pos :adjective}
{:path "Gene.synonyms.value", :value "I", :id 1000178, :pos :adjective}
{:path "Gene.name", :value "uncoordinated", :id 1000318, :pos :adjective}
{:path "Gene.synonyms.value", :value "3", :id 1000318, :pos :adjective}
{:path "Gene.synonyms.value", :value "4", :id 1000318, :pos :adjective}
{:path "Gene.synonyms.value", :value "5", :id 1000318, :pos :adjective}
{:path "Gene.synonyms.value", :value "Uncoordinated", :id 1000318, :pos :adjective}
{:path "Gene.name", :value "cinnabar", :id 1000693, :pos :adjective}
{:path "Gene.synonyms.value", :value "Minute", :id 1000825, :pos :adjective}
dictionary
=>
{:noun [["mahjong" :noun]
["flower" :noun]
["palisade" :noun]
["dare" :noun]
["lilliputian" :noun]
["sphinx" :noun]
["fan" :noun]
["temp" :noun]
sova i think you want to give each webworker two things: base namespace that they all share in common, unique namespace that each webworker has its own code specific to it, and then specify :entries #{"namespace.unique"} and :depends-on #{"namespace.shared"}
@joshkh
joshkh / example.edn
Created October 19, 2017 12:05
InterMine My Data tree structure
{#uuid "72aa2902-40dc-42fa-8465-736570c0c0fe"
{:label "Experiment 1",
:file-type :folder,
:children
{#uuid "d65194d4-3dc3-4697-bb50-0e9ba3a29f3b"
{:label "Batch A",
:file-type :folder,
:children
{182000027 {:file-type :list, :id 182000027},
#uuid "9741219e-ab96-491d-a1bc-e0f8b0be1997"
@joshkh
joshkh / BlueGenes - My Data - 18 October 2017.md
Created October 18, 2017 12:48
BlueGenes - My Data - 18 October 2017

My Data (MyMine) 18 October 2017

Important Note!

Basic authentication has been implemented. When logged in, any 'write' operations (e.g. saving and deleting lists) you perform will persist to your InterMine instance. Feel free to create a test account or use the default anonymous account while we continue to develop and test the BlueGenes version of MyMine.

Updates

My Data still has a long way to go, but your early feedback will help steer development. Don't be shy! Tell us what's missing, and how we can improve upon the old process of how users manage their data.

@joshkh
joshkh / tutorial1.py
Created October 17, 2017 09:52
InterMine Python Tutorial 1
from intermine.webservice import Service
service = Service("www.flymine.org/query/service")
query=service.new_query()
query.select("Gene.symbol","Gene.primaryIdentifier", "Gene.length")
for row in query.rows(start=0,size=10):
print(row)
@joshkh
joshkh / test.coffee
Created July 18, 2017 11:50
scaling
reduced = _.reduce withlength, ((total, next, memo) ->
previousLengths = _.reduce total, ((count, p) -> count + p.get("interactor").get("length")), 0
ban = {
startAngle: scale.val(previousLengths),
endAngle: scale.val(next.get("interactor").get("length") + previousLengths)
}
console.log "ban", ban
;; In core.cljs
(ns foo.core
(:require
[pushy.core :as pushy]
[re-frame.core :as rf]]))
(defn routing! []
(pushy/start! (pushy/pushy #(rf/dispatch [:routes/set-page %]) routes/match)))
(defn ^:export init []
@joshkh
joshkh / im_tool_integration_proposal.md
Last active November 2, 2017 13:04 — forked from vivekkrish/im_tool_integration_proposal.md
InterMine Tool Integration

Thanks to Vivek for his great proposal! https://gist.github.com/vivekkrish/2e5e4128efbbf2014c194aae6b83d245

Assumptions:

  • Dependencies are bundled into the app (requirejs, browserify, webpack)

Our justification is that sharing dependencies between third party tools introduces levels of complexity that are expensive (time consuming) and can be challenging to developers. If we find that third party apps are truly to large then we'll reconsider a more complicated approach.

App structure:

(ns redgenes.routes
(:require [compojure.core :refer [GET POST defroutes context ANY]]
[compojure.route :refer [resources]]
[hiccup.page :refer [include-js include-css html5]]
[redgenes.api.modelcount :refer [modelcount modelcount-children cache cacheall]]
[redgenes.index :as index]
[ring.util.response :refer [response resource-response]]))
(defroutes routes
(GET "/" []