{"action":"created","comment":{"url":"https://api.github.com/repos/icgc-dcc/dcc-portal/pulls/comments/71819625","id":71819625,"diff_hunk":"@@ -1213,4 +1213,254 @@ angular.module('icgc.pathwayviewer.directives.services', [])\n     this.getRenderUtils = function() {\n       return RendererUtils;\n     };\n+  })\n+  .service('PathwayDataService', function ($q, Restangular, GeneSetHierarchy, GeneSetService, SetService,\n+                                               CompoundsService, GeneSetVerificationService, LocationService) {\n+    var _pathwayDataService = this;\n+    _pathwayDataService.getGeneSet = function (geneSetId) {\n+       return Restangular.one('genesets').one(geneSetId).get().then(function (geneSet) {\n+         return geneSet;\n+       });\n+    };\n+    _pathwayDataService.getUIParentPathways = function (geneSet) {\n+      return GeneSetHierarchy.uiPathwayHierarchy(geneSet.hierarchy, geneSet);\n+    };\n+    _pathwayDataService.getParentPathwayId = function (geneSet) {\n+      return _pathwayDataService.getUIParentPathways(geneSet)[0].geneSetId;\n+    };\n+    _pathwayDataService.getPathwayId = function (geneSet) {\n+      return _pathwayDataService.getUIParentPathways(geneSet)[0].diagramId;\n+    };\n+    _pathwayDataService.getPathwayXML = function (geneSet) {\n+      return GeneSetService.getPathwayXML(_pathwayDataService.getPathwayId(geneSet)).then(function (pathwayXML) {\n+        return pathwayXML;\n+      });\n+    };\n+    _pathwayDataService.getPathwayZoom = function (geneSet) {\n+      if (_pathwayDataService.getParentPathwayId(geneSet) === _pathwayDataService.getPathwayId(geneSet)) {\n+        return $q.resolve;\n+      }\n+ \n+     return GeneSetService.getPathwayZoom(_pathwayDataService.getParentPathwayId(geneSet))\n+       .then(function (pathwayZoom) {\n+         return pathwayZoom;\n+       });\n+    };\n+    _pathwayDataService.getPathwayProteinMap = function (geneSet) {\n+    return GeneSetService.getPathwayProteinMap(_pathwayDataService.getParentPathwayId(geneSet), [])\n+      .then(function (pathwayProteinMap) {\n+        return pathwayProteinMap;\n+      });\n+    };\n+    _pathwayDataService.getEntitySetId = function (geneSet) {\n+      return SetService.getTransientSet('GENE', {\n+        'filters': {gene:{pathwayId:{is:[_pathwayDataService.getParentPathwayId(geneSet)]}}},\n+        'sortBy': 'id',\n+        'sortOrder': 'ASCENDING',\n+        'name': _pathwayDataService.getParentPathwayId(geneSet),\n+        'size': geneSet.geneCount,\n+        'transient': true \n+      }).then(function (entitySetData) {\n+        return entitySetData.id;\n+      });\n+    };\n+    _pathwayDataService.getDrugs = function (entitySetId) {\n+      return CompoundsService.getCompoundsFromEntitySetId(entitySetId).then(function(drugs) {  \n+        return drugs;\n+      });","path":"dcc-portal-ui/app/scripts/pathwayviewer/js/services.js","position":76,"original_position":76,"commit_id":"990e806d088da2c96da8c4debe5584f990b90045","original_commit_id":"990e806d088da2c96da8c4debe5584f990b90045","user":{"login":"cheapsteak","id":743976,"avatar_url":"https://avatars.githubusercontent.com/u/743976?v=3","gravatar_id":"","url":"https://api.github.com/users/cheapsteak","html_url":"https://github.com/cheapsteak","followers_url":"https://api.github.com/users/cheapsteak/followers","following_url":"https://api.github.com/users/cheapsteak/following{/other_user}","gists_url":"https://api.github.com/users/cheapsteak/gists{/gist_id}","starred_url":"https://api.github.com/users/cheapsteak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheapsteak/subscriptions","organizations_url":"https://api.github.com/users/cheapsteak/orgs","repos_url":"https://api.github.com/users/cheapsteak/repos","events_url":"https://api.github.com/users/cheapsteak/events{/privacy}","received_events_url":"https://api.github.com/users/cheapsteak/received_events","type":"User","site_admin":false},"body":"shouldn't need this `then` either","created_at":"2016-07-22T02:40:19Z","updated_at":"2016-07-22T02:40:19Z","html_url":"https://github.com/icgc-dcc/dcc-portal/pull/17#discussion_r71819625","pull_request_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/icgc-dcc/dcc-portal/pulls/comments/71819625"},"html":{"href":"https://github.com/icgc-dcc/dcc-portal/pull/17#discussion_r71819625"},"pull_request":{"href":"https://api.github.com/repos/icgc-dcc/dcc-portal/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/icgc-dcc/dcc-portal/pulls/17","id":77128468,"html_url":"https://github.com/icgc-dcc/dcc-portal/pull/17","diff_url":"https://github.com/icgc-dcc/dcc-portal/pull/17.diff","patch_url":"https://github.com/icgc-dcc/dcc-portal/pull/17.patch","issue_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/issues/17","number":17,"state":"open","locked":false,"title":"Feature/pathway viewer drugs","user":{"login":"jweiser","id":2857592,"avatar_url":"https://avatars.githubusercontent.com/u/2857592?v=3","gravatar_id":"","url":"https://api.github.com/users/jweiser","html_url":"https://github.com/jweiser","followers_url":"https://api.github.com/users/jweiser/followers","following_url":"https://api.github.com/users/jweiser/following{/other_user}","gists_url":"https://api.github.com/users/jweiser/gists{/gist_id}","starred_url":"https://api.github.com/users/jweiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jweiser/subscriptions","organizations_url":"https://api.github.com/users/jweiser/orgs","repos_url":"https://api.github.com/users/jweiser/repos","events_url":"https://api.github.com/users/jweiser/events{/privacy}","received_events_url":"https://api.github.com/users/jweiser/received_events","type":"User","site_admin":false},"body":"added drug overlay to pathway viewer in enrichment analysis and sortable columns to mutation/drug gene table","created_at":"2016-07-12T14:21:00Z","updated_at":"2016-07-22T02:40:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dec5674d9c92949f5c509b13a610f802fb260498","assignee":{"login":"cheapsteak","id":743976,"avatar_url":"https://avatars.githubusercontent.com/u/743976?v=3","gravatar_id":"","url":"https://api.github.com/users/cheapsteak","html_url":"https://github.com/cheapsteak","followers_url":"https://api.github.com/users/cheapsteak/followers","following_url":"https://api.github.com/users/cheapsteak/following{/other_user}","gists_url":"https://api.github.com/users/cheapsteak/gists{/gist_id}","starred_url":"https://api.github.com/users/cheapsteak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheapsteak/subscriptions","organizations_url":"https://api.github.com/users/cheapsteak/orgs","repos_url":"https://api.github.com/users/cheapsteak/repos","events_url":"https://api.github.com/users/cheapsteak/events{/privacy}","received_events_url":"https://api.github.com/users/cheapsteak/received_events","type":"User","site_admin":false},"assignees":[{"login":"cheapsteak","id":743976,"avatar_url":"https://avatars.githubusercontent.com/u/743976?v=3","gravatar_id":"","url":"https://api.github.com/users/cheapsteak","html_url":"https://github.com/cheapsteak","followers_url":"https://api.github.com/users/cheapsteak/followers","following_url":"https://api.github.com/users/cheapsteak/following{/other_user}","gists_url":"https://api.github.com/users/cheapsteak/gists{/gist_id}","starred_url":"https://api.github.com/users/cheapsteak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheapsteak/subscriptions","organizations_url":"https://api.github.com/users/cheapsteak/orgs","repos_url":"https://api.github.com/users/cheapsteak/repos","events_url":"https://api.github.com/users/cheapsteak/events{/privacy}","received_events_url":"https://api.github.com/users/cheapsteak/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/pulls/17/commits","review_comments_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/pulls/17/comments","review_comment_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/issues/17/comments","statuses_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/statuses/990e806d088da2c96da8c4debe5584f990b90045","head":{"label":"icgc-dcc:feature/pathway-viewer-drugs","ref":"feature/pathway-viewer-drugs","sha":"990e806d088da2c96da8c4debe5584f990b90045","user":{"login":"icgc-dcc","id":1508638,"avatar_url":"https://avatars.githubusercontent.com/u/1508638?v=3","gravatar_id":"","url":"https://api.github.com/users/icgc-dcc","html_url":"https://github.com/icgc-dcc","followers_url":"https://api.github.com/users/icgc-dcc/followers","following_url":"https://api.github.com/users/icgc-dcc/following{/other_user}","gists_url":"https://api.github.com/users/icgc-dcc/gists{/gist_id}","starred_url":"https://api.github.com/users/icgc-dcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icgc-dcc/subscriptions","organizations_url":"https://api.github.com/users/icgc-dcc/orgs","repos_url":"https://api.github.com/users/icgc-dcc/repos","events_url":"https://api.github.com/users/icgc-dcc/events{/privacy}","received_events_url":"https://api.github.com/users/icgc-dcc/received_events","type":"Organization","site_admin":false},"repo":{"id":62242110,"name":"dcc-portal","full_name":"icgc-dcc/dcc-portal","owner":{"login":"icgc-dcc","id":1508638,"avatar_url":"https://avatars.githubusercontent.com/u/1508638?v=3","gravatar_id":"","url":"https://api.github.com/users/icgc-dcc","html_url":"https://github.com/icgc-dcc","followers_url":"https://api.github.com/users/icgc-dcc/followers","following_url":"https://api.github.com/users/icgc-dcc/following{/other_user}","gists_url":"https://api.github.com/users/icgc-dcc/gists{/gist_id}","starred_url":"https://api.github.com/users/icgc-dcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icgc-dcc/subscriptions","organizations_url":"https://api.github.com/users/icgc-dcc/orgs","repos_url":"https://api.github.com/users/icgc-dcc/repos","events_url":"https://api.github.com/users/icgc-dcc/events{/privacy}","received_events_url":"https://api.github.com/users/icgc-dcc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/icgc-dcc/dcc-portal","description":"Data portal for exploring and accessing data","fork":false,"url":"https://api.github.com/repos/icgc-dcc/dcc-portal","forks_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/forks","keys_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/teams","hooks_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/hooks","issue_events_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/issues/events{/number}","events_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/events","assignees_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/assignees{/user}","branches_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/branches{/branch}","tags_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/tags","blobs_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/languages","stargazers_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/stargazers","contributors_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/contributors","subscribers_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/subscribers","subscription_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/subscription","commits_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/contents/{+path}","compare_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/merges","archive_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/downloads","issues_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/issues{/number}","pulls_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/labels{/name}","releases_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/releases{/id}","deployments_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/deployments","created_at":"2016-06-29T16:44:10Z","updated_at":"2016-07-18T13:55:22Z","pushed_at":"2016-07-22T01:11:27Z","git_url":"git://github.com/icgc-dcc/dcc-portal.git","ssh_url":"git@github.com:icgc-dcc/dcc-portal.git","clone_url":"https://github.com/icgc-dcc/dcc-portal.git","svn_url":"https://github.com/icgc-dcc/dcc-portal","homepage":"https://dcc.icgc.org/","size":11229,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":3,"default_branch":"develop"}},"base":{"label":"icgc-dcc:develop","ref":"develop","sha":"0e2b4a4dbcbbe89e901c2c7045004d0f1ebcd626","user":{"login":"icgc-dcc","id":1508638,"avatar_url":"https://avatars.githubusercontent.com/u/1508638?v=3","gravatar_id":"","url":"https://api.github.com/users/icgc-dcc","html_url":"https://github.com/icgc-dcc","followers_url":"https://api.github.com/users/icgc-dcc/followers","following_url":"https://api.github.com/users/icgc-dcc/following{/other_user}","gists_url":"https://api.github.com/users/icgc-dcc/gists{/gist_id}","starred_url":"https://api.github.com/users/icgc-dcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icgc-dcc/subscriptions","organizations_url":"https://api.github.com/users/icgc-dcc/orgs","repos_url":"https://api.github.com/users/icgc-dcc/repos","events_url":"https://api.github.com/users/icgc-dcc/events{/privacy}","received_events_url":"https://api.github.com/users/icgc-dcc/received_events","type":"Organization","site_admin":false},"repo":{"id":62242110,"name":"dcc-portal","full_name":"icgc-dcc/dcc-portal","owner":{"login":"icgc-dcc","id":1508638,"avatar_url":"https://avatars.githubusercontent.com/u/1508638?v=3","gravatar_id":"","url":"https://api.github.com/users/icgc-dcc","html_url":"https://github.com/icgc-dcc","followers_url":"https://api.github.com/users/icgc-dcc/followers","following_url":"https://api.github.com/users/icgc-dcc/following{/other_user}","gists_url":"https://api.github.com/users/icgc-dcc/gists{/gist_id}","starred_url":"https://api.github.com/users/icgc-dcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/icgc-dcc/subscriptions","organizations_url":"https://api.github.com/users/icgc-dcc/orgs","repos_url":"https://api.github.com/users/icgc-dcc/repos","events_url":"https://api.github.com/users/icgc-dcc/events{/privacy}","received_events_url":"https://api.github.com/users/icgc-dcc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/icgc-dcc/dcc-portal","description":"Data portal for exploring and accessing data","fork":false,"url":"https://api.github.com/repos/icgc-dcc/dcc-portal","forks_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/forks","keys_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/teams","hooks_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/hooks","issue_events_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/issues/events{/number}","events_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/events","assignees_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/assignees{/user}","branches_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/branches{/branch}","tags_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/tags","blobs_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/languages","stargazers_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/stargazers","contributors_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/contributors","subscribers_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/subscribers","subscription_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/subscription","commits_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/contents/{+path}","compare_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/merges","archive_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/downloads","issues_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/issues{/number}","pulls_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/labels{/name}","releases_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/releases{/id}","deployments_url":"https://api.github.com/repos/icgc-dcc/dcc-portal/deployments","created_at":"2016-06-29T16:44:10Z","updated_at":"2016-07-18T13:55:22Z","pushed_at":"2016-07-22T01:11:27Z","git_url":"git://github.com/icgc-dcc/dcc-portal.git","ssh_url":"git@github.com:icgc-dcc/dcc-portal.git","clone_url":"https://github.com/icgc-dcc/dcc-portal.git","svn_url":"https://github.com/icgc-dcc/dcc-portal","homepage":"https://dcc.icgc.org/","size":11229,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":6,"forks":1,"open_issues":6,"watchers":3,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/icgc-dcc/dcc-portal/pulls/17"},"html":{"href":"https://github.com/icgc-dcc/dcc-portal/pull/17"},"issue":{"href":"https://api.github.com/repos/icgc-dcc/dcc-portal/issues/17"},"comments":{"href":"https://api.github.com/repos/icgc-dcc/dcc-portal/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/icgc-dcc/dcc-portal/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/icgc-dcc/dcc-portal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/icgc-dcc/dcc-portal/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/icgc-dcc/dcc-portal/statuses/990e806d088da2c96da8c4debe5584f990b90045"}}}}
{"actor":{"display_login":"cheapsteak"}}