{"action":"created","comment":{"url":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/comments/195544094","pull_request_review_id":128936221,"id":195544094,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NTU0NDA5NA==","diff_hunk":"@@ -0,0 +1,139 @@\n+const _ = require('lodash');\n+const pc = require('../../pathway-commons');\n+const logger = require('./../../logger');\n+\n+function edgeType(type) {\n+  switch(type){\n+    case 'in-complex-with':\n+    case 'interacts-with':\n+      return 'Binding';\n+    case 'controls-phosphorylation-of':\n+      return 'Phosphorylation';\n+    case 'controls-expression-of':\n+      return 'Expression';\n+    default:\n+      return '';\n+  }\n+}\n+\n+function getInteractionInfoFromPC(sources) {\n+  const idArray = _.uniq(_.concat([], sources)); //convert sources to array\n+\n+  const geneIds = idArray.map(source =>\n+    source.includes('pathwaycommons') ? getGeneIdFromPC(source) : source.replace(/\\//g,' ')\n+  );\n+   const metaData = {\n+     networkMetadata: {\n+       name : geneIds.join(','),","path":"src/server/graph-generation/interaction/index.js","position":27,"original_position":27,"commit_id":"3c1f12dc0098c4ca00f55de5044a2bf99be2281d","original_commit_id":"3c1f12dc0098c4ca00f55de5044a2bf99be2281d","user":{"login":"jvwong","id":4706307,"node_id":"MDQ6VXNlcjQ3MDYzMDc=","avatar_url":"https://avatars2.githubusercontent.com/u/4706307?v=4","gravatar_id":"","url":"https://api.github.com/users/jvwong","html_url":"https://github.com/jvwong","followers_url":"https://api.github.com/users/jvwong/followers","following_url":"https://api.github.com/users/jvwong/following{/other_user}","gists_url":"https://api.github.com/users/jvwong/gists{/gist_id}","starred_url":"https://api.github.com/users/jvwong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvwong/subscriptions","organizations_url":"https://api.github.com/users/jvwong/orgs","repos_url":"https://api.github.com/users/jvwong/repos","events_url":"https://api.github.com/users/jvwong/events{/privacy}","received_events_url":"https://api.github.com/users/jvwong/received_events","type":"User","site_admin":false},"body":"`geneIds` could be replaced with `source` yes? ","created_at":"2018-06-14T19:29:16Z","updated_at":"2018-06-14T19:29:16Z","html_url":"https://github.com/PathwayCommons/app-ui/pull/825#discussion_r195544094","pull_request_url":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/825","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/comments/195544094"},"html":{"href":"https://github.com/PathwayCommons/app-ui/pull/825#discussion_r195544094"},"pull_request":{"href":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/825"}},"in_reply_to_id":195542247},"pull_request":{"url":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/825","id":194025680,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0MDI1Njgw","html_url":"https://github.com/PathwayCommons/app-ui/pull/825","diff_url":"https://github.com/PathwayCommons/app-ui/pull/825.diff","patch_url":"https://github.com/PathwayCommons/app-ui/pull/825.patch","issue_url":"https://api.github.com/repos/PathwayCommons/app-ui/issues/825","number":825,"state":"open","locked":false,"title":"Refactor Interaction Page","user":{"login":"q4wen","id":16858225,"node_id":"MDQ6VXNlcjE2ODU4MjI1","avatar_url":"https://avatars0.githubusercontent.com/u/16858225?v=4","gravatar_id":"","url":"https://api.github.com/users/q4wen","html_url":"https://github.com/q4wen","followers_url":"https://api.github.com/users/q4wen/followers","following_url":"https://api.github.com/users/q4wen/following{/other_user}","gists_url":"https://api.github.com/users/q4wen/gists{/gist_id}","starred_url":"https://api.github.com/users/q4wen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/q4wen/subscriptions","organizations_url":"https://api.github.com/users/q4wen/orgs","repos_url":"https://api.github.com/users/q4wen/repos","events_url":"https://api.github.com/users/q4wen/events{/privacy}","received_events_url":"https://api.github.com/users/q4wen/received_events","type":"User","site_admin":false},"body":"Motivation:\r\n\r\nTo make the page faster and the code more readable.\r\n\r\nThe pull request:\r\n\r\n- Moves graph data parsing from front end `client/features/interactions/index.js` to back end `server/graph-generation/interaction/index.js`;\r\n\r\n- Cleans some nested functions and adds comments;\r\n\r\n- Leaves a TODO function for caching implementation in the future.","created_at":"2018-06-11T15:51:44Z","updated_at":"2018-06-14T19:29:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94277dd66cbb1d4479c77902fb3c76a1b647e247","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/825/commits","review_comments_url":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/825/comments","review_comment_url":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PathwayCommons/app-ui/issues/825/comments","statuses_url":"https://api.github.com/repos/PathwayCommons/app-ui/statuses/3c1f12dc0098c4ca00f55de5044a2bf99be2281d","head":{"label":"q4wen:interaction-refactor","ref":"interaction-refactor","sha":"3c1f12dc0098c4ca00f55de5044a2bf99be2281d","user":{"login":"q4wen","id":16858225,"node_id":"MDQ6VXNlcjE2ODU4MjI1","avatar_url":"https://avatars0.githubusercontent.com/u/16858225?v=4","gravatar_id":"","url":"https://api.github.com/users/q4wen","html_url":"https://github.com/q4wen","followers_url":"https://api.github.com/users/q4wen/followers","following_url":"https://api.github.com/users/q4wen/following{/other_user}","gists_url":"https://api.github.com/users/q4wen/gists{/gist_id}","starred_url":"https://api.github.com/users/q4wen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/q4wen/subscriptions","organizations_url":"https://api.github.com/users/q4wen/orgs","repos_url":"https://api.github.com/users/q4wen/repos","events_url":"https://api.github.com/users/q4wen/events{/privacy}","received_events_url":"https://api.github.com/users/q4wen/received_events","type":"User","site_admin":false},"repo":{"id":132645627,"node_id":"MDEwOlJlcG9zaXRvcnkxMzI2NDU2Mjc=","name":"app-ui","full_name":"q4wen/app-ui","owner":{"login":"q4wen","id":16858225,"node_id":"MDQ6VXNlcjE2ODU4MjI1","avatar_url":"https://avatars0.githubusercontent.com/u/16858225?v=4","gravatar_id":"","url":"https://api.github.com/users/q4wen","html_url":"https://github.com/q4wen","followers_url":"https://api.github.com/users/q4wen/followers","following_url":"https://api.github.com/users/q4wen/following{/other_user}","gists_url":"https://api.github.com/users/q4wen/gists{/gist_id}","starred_url":"https://api.github.com/users/q4wen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/q4wen/subscriptions","organizations_url":"https://api.github.com/users/q4wen/orgs","repos_url":"https://api.github.com/users/q4wen/repos","events_url":"https://api.github.com/users/q4wen/events{/privacy}","received_events_url":"https://api.github.com/users/q4wen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/q4wen/app-ui","description":null,"fork":true,"url":"https://api.github.com/repos/q4wen/app-ui","forks_url":"https://api.github.com/repos/q4wen/app-ui/forks","keys_url":"https://api.github.com/repos/q4wen/app-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/q4wen/app-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/q4wen/app-ui/teams","hooks_url":"https://api.github.com/repos/q4wen/app-ui/hooks","issue_events_url":"https://api.github.com/repos/q4wen/app-ui/issues/events{/number}","events_url":"https://api.github.com/repos/q4wen/app-ui/events","assignees_url":"https://api.github.com/repos/q4wen/app-ui/assignees{/user}","branches_url":"https://api.github.com/repos/q4wen/app-ui/branches{/branch}","tags_url":"https://api.github.com/repos/q4wen/app-ui/tags","blobs_url":"https://api.github.com/repos/q4wen/app-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/q4wen/app-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/q4wen/app-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/q4wen/app-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/q4wen/app-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/q4wen/app-ui/languages","stargazers_url":"https://api.github.com/repos/q4wen/app-ui/stargazers","contributors_url":"https://api.github.com/repos/q4wen/app-ui/contributors","subscribers_url":"https://api.github.com/repos/q4wen/app-ui/subscribers","subscription_url":"https://api.github.com/repos/q4wen/app-ui/subscription","commits_url":"https://api.github.com/repos/q4wen/app-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/q4wen/app-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/q4wen/app-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/q4wen/app-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/q4wen/app-ui/contents/{+path}","compare_url":"https://api.github.com/repos/q4wen/app-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/q4wen/app-ui/merges","archive_url":"https://api.github.com/repos/q4wen/app-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/q4wen/app-ui/downloads","issues_url":"https://api.github.com/repos/q4wen/app-ui/issues{/number}","pulls_url":"https://api.github.com/repos/q4wen/app-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/q4wen/app-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/q4wen/app-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/q4wen/app-ui/labels{/name}","releases_url":"https://api.github.com/repos/q4wen/app-ui/releases{/id}","deployments_url":"https://api.github.com/repos/q4wen/app-ui/deployments","created_at":"2018-05-08T17:56:50Z","updated_at":"2018-05-10T19:19:10Z","pushed_at":"2018-06-14T17:49:17Z","git_url":"git://github.com/q4wen/app-ui.git","ssh_url":"git@github.com:q4wen/app-ui.git","clone_url":"https://github.com/q4wen/app-ui.git","svn_url":"https://github.com/q4wen/app-ui","homepage":null,"size":20731,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"PathwayCommons:development","ref":"development","sha":"0539224507bb14dece4b4cf2b6977786af542583","user":{"login":"PathwayCommons","id":1605506,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDU1MDY=","avatar_url":"https://avatars3.githubusercontent.com/u/1605506?v=4","gravatar_id":"","url":"https://api.github.com/users/PathwayCommons","html_url":"https://github.com/PathwayCommons","followers_url":"https://api.github.com/users/PathwayCommons/followers","following_url":"https://api.github.com/users/PathwayCommons/following{/other_user}","gists_url":"https://api.github.com/users/PathwayCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/PathwayCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PathwayCommons/subscriptions","organizations_url":"https://api.github.com/users/PathwayCommons/orgs","repos_url":"https://api.github.com/users/PathwayCommons/repos","events_url":"https://api.github.com/users/PathwayCommons/events{/privacy}","received_events_url":"https://api.github.com/users/PathwayCommons/received_events","type":"Organization","site_admin":false},"repo":{"id":104936681,"node_id":"MDEwOlJlcG9zaXRvcnkxMDQ5MzY2ODE=","name":"app-ui","full_name":"PathwayCommons/app-ui","owner":{"login":"PathwayCommons","id":1605506,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2MDU1MDY=","avatar_url":"https://avatars3.githubusercontent.com/u/1605506?v=4","gravatar_id":"","url":"https://api.github.com/users/PathwayCommons","html_url":"https://github.com/PathwayCommons","followers_url":"https://api.github.com/users/PathwayCommons/followers","following_url":"https://api.github.com/users/PathwayCommons/following{/other_user}","gists_url":"https://api.github.com/users/PathwayCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/PathwayCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PathwayCommons/subscriptions","organizations_url":"https://api.github.com/users/PathwayCommons/orgs","repos_url":"https://api.github.com/users/PathwayCommons/repos","events_url":"https://api.github.com/users/PathwayCommons/events{/privacy}","received_events_url":"https://api.github.com/users/PathwayCommons/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PathwayCommons/app-ui","description":null,"fork":false,"url":"https://api.github.com/repos/PathwayCommons/app-ui","forks_url":"https://api.github.com/repos/PathwayCommons/app-ui/forks","keys_url":"https://api.github.com/repos/PathwayCommons/app-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PathwayCommons/app-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PathwayCommons/app-ui/teams","hooks_url":"https://api.github.com/repos/PathwayCommons/app-ui/hooks","issue_events_url":"https://api.github.com/repos/PathwayCommons/app-ui/issues/events{/number}","events_url":"https://api.github.com/repos/PathwayCommons/app-ui/events","assignees_url":"https://api.github.com/repos/PathwayCommons/app-ui/assignees{/user}","branches_url":"https://api.github.com/repos/PathwayCommons/app-ui/branches{/branch}","tags_url":"https://api.github.com/repos/PathwayCommons/app-ui/tags","blobs_url":"https://api.github.com/repos/PathwayCommons/app-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PathwayCommons/app-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PathwayCommons/app-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/PathwayCommons/app-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PathwayCommons/app-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/PathwayCommons/app-ui/languages","stargazers_url":"https://api.github.com/repos/PathwayCommons/app-ui/stargazers","contributors_url":"https://api.github.com/repos/PathwayCommons/app-ui/contributors","subscribers_url":"https://api.github.com/repos/PathwayCommons/app-ui/subscribers","subscription_url":"https://api.github.com/repos/PathwayCommons/app-ui/subscription","commits_url":"https://api.github.com/repos/PathwayCommons/app-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/PathwayCommons/app-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/PathwayCommons/app-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/PathwayCommons/app-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/PathwayCommons/app-ui/contents/{+path}","compare_url":"https://api.github.com/repos/PathwayCommons/app-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PathwayCommons/app-ui/merges","archive_url":"https://api.github.com/repos/PathwayCommons/app-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PathwayCommons/app-ui/downloads","issues_url":"https://api.github.com/repos/PathwayCommons/app-ui/issues{/number}","pulls_url":"https://api.github.com/repos/PathwayCommons/app-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/PathwayCommons/app-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/PathwayCommons/app-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PathwayCommons/app-ui/labels{/name}","releases_url":"https://api.github.com/repos/PathwayCommons/app-ui/releases{/id}","deployments_url":"https://api.github.com/repos/PathwayCommons/app-ui/deployments","created_at":"2017-09-26T20:53:40Z","updated_at":"2018-05-17T18:33:19Z","pushed_at":"2018-06-14T15:21:03Z","git_url":"git://github.com/PathwayCommons/app-ui.git","ssh_url":"git@github.com:PathwayCommons/app-ui.git","clone_url":"https://github.com/PathwayCommons/app-ui.git","svn_url":"https://github.com/PathwayCommons/app-ui","homepage":null,"size":20724,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"open_issues_count":22,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":13,"open_issues":22,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/825"},"html":{"href":"https://github.com/PathwayCommons/app-ui/pull/825"},"issue":{"href":"https://api.github.com/repos/PathwayCommons/app-ui/issues/825"},"comments":{"href":"https://api.github.com/repos/PathwayCommons/app-ui/issues/825/comments"},"review_comments":{"href":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/825/comments"},"review_comment":{"href":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PathwayCommons/app-ui/pulls/825/commits"},"statuses":{"href":"https://api.github.com/repos/PathwayCommons/app-ui/statuses/3c1f12dc0098c4ca00f55de5044a2bf99be2281d"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"jvwong"}}