{"action":"created","comment":{"url":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/comments/52978895","id":52978895,"diff_hunk":"@@ -1,6 +1,37 @@\n var _ = require('lodash');\n var d3 = require('d3');\n+\n var config = require('../config/plots').neighbourPlot;\n+\n+// browserify can't load modules dynamically due to the way it statically\n+// analyses paths when creating the output bundle. in other words, no variables\n+// or concatenated strings can be used in required paths.\n+// this switch is inelegant and should be replaced with something nicer\n+// maybe this could be configured server-side maybe when matplotlib 1.5 is\n+// released and these colour scales become available??","path":"app/static/js/NeighbourPlotCanvas.js","position":11,"original_position":11,"commit_id":"6ecdc28c68fff4e46b725a6718364ebd0f787208","original_commit_id":"6ecdc28c68fff4e46b725a6718364ebd0f787208","user":{"login":"jni","id":492549,"avatar_url":"https://avatars.githubusercontent.com/u/492549?v=3","gravatar_id":"","url":"https://api.github.com/users/jni","html_url":"https://github.com/jni","followers_url":"https://api.github.com/users/jni/followers","following_url":"https://api.github.com/users/jni/following{/other_user}","gists_url":"https://api.github.com/users/jni/gists{/gist_id}","starred_url":"https://api.github.com/users/jni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jni/subscriptions","organizations_url":"https://api.github.com/users/jni/orgs","repos_url":"https://api.github.com/users/jni/repos","events_url":"https://api.github.com/users/jni/events{/privacy}","received_events_url":"https://api.github.com/users/jni/received_events","type":"User","site_admin":false},"body":"I think you are. Does D3 do linear interpolation between these automatically?","created_at":"2016-02-16T08:17:07Z","updated_at":"2016-02-16T08:17:07Z","html_url":"https://github.com/microscopium/microscopium-ui/pull/78#discussion_r52978895","pull_request_url":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/comments/52978895"},"html":{"href":"https://github.com/microscopium/microscopium-ui/pull/78#discussion_r52978895"},"pull_request":{"href":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/78","id":59433395,"html_url":"https://github.com/microscopium/microscopium-ui/pull/78","diff_url":"https://github.com/microscopium/microscopium-ui/pull/78.diff","patch_url":"https://github.com/microscopium/microscopium-ui/pull/78.patch","issue_url":"https://api.github.com/repos/microscopium/microscopium-ui/issues/78","number":78,"state":"open","locked":false,"title":"Add point colour overlays for displaying z-scores (or other info)","user":{"login":"starcalibre","id":7637964,"avatar_url":"https://avatars.githubusercontent.com/u/7637964?v=3","gravatar_id":"","url":"https://api.github.com/users/starcalibre","html_url":"https://github.com/starcalibre","followers_url":"https://api.github.com/users/starcalibre/followers","following_url":"https://api.github.com/users/starcalibre/following{/other_user}","gists_url":"https://api.github.com/users/starcalibre/gists{/gist_id}","starred_url":"https://api.github.com/users/starcalibre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starcalibre/subscriptions","organizations_url":"https://api.github.com/users/starcalibre/orgs","repos_url":"https://api.github.com/users/starcalibre/repos","events_url":"https://api.github.com/users/starcalibre/events{/privacy}","received_events_url":"https://api.github.com/users/starcalibre/received_events","type":"User","site_admin":false},"body":"This PR adds the functionality to the UI to display z-scores (or other numeric information such as cell viability).\r\n\r\n* On the database side of things, I've used the approach I described in #39 . An ``available_overlays`` array is populated in the ``Screen`` document that describes which overlays are available for the screen. If there's overlays available, the Flask template renders the dropdown menu. No menu is rendered if no screen overlay info is available so the UI just behaves as it did before. :)\r\n* I was going to add support for Date/Time information, but all the images for Keefe's screen were either all done on the same date or the same date just got added to each plate. I think it'll be worthwhile to have this once we have a screen where date information is available though.\r\n* I added two functions for calculating percentiles but didn't end up using them in the end. They're elegant af and could end up being useful. Don't mind removing them if you're not keen on unused code though!\r\n* The upper and lower limits for the score colour scale is defined as config variable that forces the range [-4, 4]. Any values above or below that will be clamped to the min/max respectively. I wasn't quite sure how to handle this. I was going to use the 5th and 95th percentiles to calculate the upper and lower limits but it made the diverging scales look like ass because 0 wouldn't map to the \"middle\" neutral colour. Do you have any suggestions?\r\n* Colour scales supported are magma, inferno, viridis and plasma from the new matplotlib scales.","created_at":"2016-02-16T01:48:56Z","updated_at":"2016-02-16T08:17:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"32af49573dea685f45b30d20be12aa825eb976dc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/78/commits","review_comments_url":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/78/comments","review_comment_url":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/microscopium/microscopium-ui/issues/78/comments","statuses_url":"https://api.github.com/repos/microscopium/microscopium-ui/statuses/6ecdc28c68fff4e46b725a6718364ebd0f787208","head":{"label":"starcalibre:overlays","ref":"overlays","sha":"6ecdc28c68fff4e46b725a6718364ebd0f787208","user":{"login":"starcalibre","id":7637964,"avatar_url":"https://avatars.githubusercontent.com/u/7637964?v=3","gravatar_id":"","url":"https://api.github.com/users/starcalibre","html_url":"https://github.com/starcalibre","followers_url":"https://api.github.com/users/starcalibre/followers","following_url":"https://api.github.com/users/starcalibre/following{/other_user}","gists_url":"https://api.github.com/users/starcalibre/gists{/gist_id}","starred_url":"https://api.github.com/users/starcalibre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starcalibre/subscriptions","organizations_url":"https://api.github.com/users/starcalibre/orgs","repos_url":"https://api.github.com/users/starcalibre/repos","events_url":"https://api.github.com/users/starcalibre/events{/privacy}","received_events_url":"https://api.github.com/users/starcalibre/received_events","type":"User","site_admin":false},"repo":{"id":29283595,"name":"microscopium-ui","full_name":"starcalibre/microscopium-ui","owner":{"login":"starcalibre","id":7637964,"avatar_url":"https://avatars.githubusercontent.com/u/7637964?v=3","gravatar_id":"","url":"https://api.github.com/users/starcalibre","html_url":"https://github.com/starcalibre","followers_url":"https://api.github.com/users/starcalibre/followers","following_url":"https://api.github.com/users/starcalibre/following{/other_user}","gists_url":"https://api.github.com/users/starcalibre/gists{/gist_id}","starred_url":"https://api.github.com/users/starcalibre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/starcalibre/subscriptions","organizations_url":"https://api.github.com/users/starcalibre/orgs","repos_url":"https://api.github.com/users/starcalibre/repos","events_url":"https://api.github.com/users/starcalibre/events{/privacy}","received_events_url":"https://api.github.com/users/starcalibre/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/starcalibre/microscopium-ui","description":"Microscopium web interface.","fork":true,"url":"https://api.github.com/repos/starcalibre/microscopium-ui","forks_url":"https://api.github.com/repos/starcalibre/microscopium-ui/forks","keys_url":"https://api.github.com/repos/starcalibre/microscopium-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/starcalibre/microscopium-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/starcalibre/microscopium-ui/teams","hooks_url":"https://api.github.com/repos/starcalibre/microscopium-ui/hooks","issue_events_url":"https://api.github.com/repos/starcalibre/microscopium-ui/issues/events{/number}","events_url":"https://api.github.com/repos/starcalibre/microscopium-ui/events","assignees_url":"https://api.github.com/repos/starcalibre/microscopium-ui/assignees{/user}","branches_url":"https://api.github.com/repos/starcalibre/microscopium-ui/branches{/branch}","tags_url":"https://api.github.com/repos/starcalibre/microscopium-ui/tags","blobs_url":"https://api.github.com/repos/starcalibre/microscopium-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/starcalibre/microscopium-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/starcalibre/microscopium-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/starcalibre/microscopium-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/starcalibre/microscopium-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/starcalibre/microscopium-ui/languages","stargazers_url":"https://api.github.com/repos/starcalibre/microscopium-ui/stargazers","contributors_url":"https://api.github.com/repos/starcalibre/microscopium-ui/contributors","subscribers_url":"https://api.github.com/repos/starcalibre/microscopium-ui/subscribers","subscription_url":"https://api.github.com/repos/starcalibre/microscopium-ui/subscription","commits_url":"https://api.github.com/repos/starcalibre/microscopium-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/starcalibre/microscopium-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/starcalibre/microscopium-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/starcalibre/microscopium-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/starcalibre/microscopium-ui/contents/{+path}","compare_url":"https://api.github.com/repos/starcalibre/microscopium-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/starcalibre/microscopium-ui/merges","archive_url":"https://api.github.com/repos/starcalibre/microscopium-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/starcalibre/microscopium-ui/downloads","issues_url":"https://api.github.com/repos/starcalibre/microscopium-ui/issues{/number}","pulls_url":"https://api.github.com/repos/starcalibre/microscopium-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/starcalibre/microscopium-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/starcalibre/microscopium-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/starcalibre/microscopium-ui/labels{/name}","releases_url":"https://api.github.com/repos/starcalibre/microscopium-ui/releases{/id}","deployments_url":"https://api.github.com/repos/starcalibre/microscopium-ui/deployments","created_at":"2015-01-15T06:12:36Z","updated_at":"2016-01-15T02:51:39Z","pushed_at":"2016-02-16T01:33:27Z","git_url":"git://github.com/starcalibre/microscopium-ui.git","ssh_url":"git@github.com:starcalibre/microscopium-ui.git","clone_url":"https://github.com/starcalibre/microscopium-ui.git","svn_url":"https://github.com/starcalibre/microscopium-ui","homepage":null,"size":6171,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"microscopium:master","ref":"master","sha":"18450ddc5b7f3f3b8fca3c714bd36e2847c5c408","user":{"login":"microscopium","id":10542326,"avatar_url":"https://avatars.githubusercontent.com/u/10542326?v=3","gravatar_id":"","url":"https://api.github.com/users/microscopium","html_url":"https://github.com/microscopium","followers_url":"https://api.github.com/users/microscopium/followers","following_url":"https://api.github.com/users/microscopium/following{/other_user}","gists_url":"https://api.github.com/users/microscopium/gists{/gist_id}","starred_url":"https://api.github.com/users/microscopium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/microscopium/subscriptions","organizations_url":"https://api.github.com/users/microscopium/orgs","repos_url":"https://api.github.com/users/microscopium/repos","events_url":"https://api.github.com/users/microscopium/events{/privacy}","received_events_url":"https://api.github.com/users/microscopium/received_events","type":"Organization","site_admin":false},"repo":{"id":28170352,"name":"microscopium-ui","full_name":"microscopium/microscopium-ui","owner":{"login":"microscopium","id":10542326,"avatar_url":"https://avatars.githubusercontent.com/u/10542326?v=3","gravatar_id":"","url":"https://api.github.com/users/microscopium","html_url":"https://github.com/microscopium","followers_url":"https://api.github.com/users/microscopium/followers","following_url":"https://api.github.com/users/microscopium/following{/other_user}","gists_url":"https://api.github.com/users/microscopium/gists{/gist_id}","starred_url":"https://api.github.com/users/microscopium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/microscopium/subscriptions","organizations_url":"https://api.github.com/users/microscopium/orgs","repos_url":"https://api.github.com/users/microscopium/repos","events_url":"https://api.github.com/users/microscopium/events{/privacy}","received_events_url":"https://api.github.com/users/microscopium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/microscopium/microscopium-ui","description":"Microscopium web interface.","fork":false,"url":"https://api.github.com/repos/microscopium/microscopium-ui","forks_url":"https://api.github.com/repos/microscopium/microscopium-ui/forks","keys_url":"https://api.github.com/repos/microscopium/microscopium-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/microscopium/microscopium-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/microscopium/microscopium-ui/teams","hooks_url":"https://api.github.com/repos/microscopium/microscopium-ui/hooks","issue_events_url":"https://api.github.com/repos/microscopium/microscopium-ui/issues/events{/number}","events_url":"https://api.github.com/repos/microscopium/microscopium-ui/events","assignees_url":"https://api.github.com/repos/microscopium/microscopium-ui/assignees{/user}","branches_url":"https://api.github.com/repos/microscopium/microscopium-ui/branches{/branch}","tags_url":"https://api.github.com/repos/microscopium/microscopium-ui/tags","blobs_url":"https://api.github.com/repos/microscopium/microscopium-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/microscopium/microscopium-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/microscopium/microscopium-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/microscopium/microscopium-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/microscopium/microscopium-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/microscopium/microscopium-ui/languages","stargazers_url":"https://api.github.com/repos/microscopium/microscopium-ui/stargazers","contributors_url":"https://api.github.com/repos/microscopium/microscopium-ui/contributors","subscribers_url":"https://api.github.com/repos/microscopium/microscopium-ui/subscribers","subscription_url":"https://api.github.com/repos/microscopium/microscopium-ui/subscription","commits_url":"https://api.github.com/repos/microscopium/microscopium-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/microscopium/microscopium-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/microscopium/microscopium-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/microscopium/microscopium-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/microscopium/microscopium-ui/contents/{+path}","compare_url":"https://api.github.com/repos/microscopium/microscopium-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/microscopium/microscopium-ui/merges","archive_url":"https://api.github.com/repos/microscopium/microscopium-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/microscopium/microscopium-ui/downloads","issues_url":"https://api.github.com/repos/microscopium/microscopium-ui/issues{/number}","pulls_url":"https://api.github.com/repos/microscopium/microscopium-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/microscopium/microscopium-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/microscopium/microscopium-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/microscopium/microscopium-ui/labels{/name}","releases_url":"https://api.github.com/repos/microscopium/microscopium-ui/releases{/id}","deployments_url":"https://api.github.com/repos/microscopium/microscopium-ui/deployments","created_at":"2014-12-18T05:52:59Z","updated_at":"2016-01-15T02:43:27Z","pushed_at":"2016-02-16T01:48:56Z","git_url":"git://github.com/microscopium/microscopium-ui.git","ssh_url":"git@github.com:microscopium/microscopium-ui.git","clone_url":"https://github.com/microscopium/microscopium-ui.git","svn_url":"https://github.com/microscopium/microscopium-ui","homepage":null,"size":6166,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":31,"forks":2,"open_issues":31,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/78"},"html":{"href":"https://github.com/microscopium/microscopium-ui/pull/78"},"issue":{"href":"https://api.github.com/repos/microscopium/microscopium-ui/issues/78"},"comments":{"href":"https://api.github.com/repos/microscopium/microscopium-ui/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/microscopium/microscopium-ui/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/microscopium/microscopium-ui/statuses/6ecdc28c68fff4e46b725a6718364ebd0f787208"}}}}