{"action":"created","comment":{"url":"https://api.github.com/repos/cognoma/machine-learning/pulls/comments/76488283","id":76488283,"diff_hunk":"@@ -0,0 +1,535 @@\n+\n+# coding: utf-8\n+\n+# # Predicting Aberrations in The Hippo Signaling Pathway\n+\n+# ## To do this, we will use Hetnets to query \"Signaling by Hippo\"\n+# \n+# The query is built in the [Cypher Language](https://neo4j.com/developer/cypher-query-language/) and draws data from [Hetionet](https://neo4j.het.io/browser/)\n+# \n+# ### How Cognoma could help with Hippo signaling\n+# \n+# The Hippo pathway is a highly conserved signaling cascade that controls organ size, cell growth, and cell death ([Zhao et al. 2010](http://doi.org/10.1101/gad.1909210)). It is one of the mechanisms that influences size diversity across eukaryotes; including different sizes across dog breeds ([Dong et al. 2007](http://doi.org/10.1016/j.cell.2007.07.019), [Crickmore and Mann 2008](http://doi.org/10.1002/bies.20806)). Recently, Hippo signaling has also been shown to be important for tumorigenesis, but there are shockingly few recurrent mutations of single genes within the pathway across tissues ([Harvey et al 2013](http://doi.org/10.1038/nrc3458)). Therefore, leveraging cancers from multiple tissues and combining genes associated with the same pathway could aid in the detection of a Hippo signaling specific gene expression signature. Cognoma is situated well to quickly query the list of all pathway associated genes, build a machine learning classifier to detect aberrant pathway activity, and output tissue and gene specific performance.\n+\n+# In[1]:\n+\n+import os\n+import urllib\n+import random\n+import warnings\n+\n+import pandas as pd\n+import numpy as np\n+import matplotlib.pyplot as plt\n+import seaborn as sns\n+from sklearn import preprocessing, grid_search\n+from sklearn.linear_model import SGDClassifier\n+from sklearn.cross_validation import train_test_split\n+from sklearn.metrics import roc_auc_score, roc_curve\n+from sklearn.pipeline import make_pipeline\n+from sklearn.preprocessing import StandardScaler\n+from sklearn.feature_selection import SelectKBest\n+from statsmodels.robust.scale import mad\n+\n+\n+# In[2]:\n+\n+from neo4j.v1 import GraphDatabase\n+\n+\n+# In[3]:\n+\n+get_ipython().magic('matplotlib inline')\n+plt.style.use('seaborn-notebook')\n+\n+\n+# ## Specify model configuration\n+\n+# In[4]:\n+\n+REACTOMEPATHWAY = 'PC7_7459'  # \"Signaling by Hippo\" in Reactome","path":"scripts/2.TCGA-MLexample_Pathway.py","position":50,"original_position":50,"commit_id":"48dc5940108d52fa11f83cd7e5f66a1380d9079d","original_commit_id":"48dc5940108d52fa11f83cd7e5f66a1380d9079d","user":{"login":"dhimmel","id":1117703,"avatar_url":"https://avatars.githubusercontent.com/u/1117703?v=3","gravatar_id":"","url":"https://api.github.com/users/dhimmel","html_url":"https://github.com/dhimmel","followers_url":"https://api.github.com/users/dhimmel/followers","following_url":"https://api.github.com/users/dhimmel/following{/other_user}","gists_url":"https://api.github.com/users/dhimmel/gists{/gist_id}","starred_url":"https://api.github.com/users/dhimmel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhimmel/subscriptions","organizations_url":"https://api.github.com/users/dhimmel/orgs","repos_url":"https://api.github.com/users/dhimmel/repos","events_url":"https://api.github.com/users/dhimmel/events{/privacy}","received_events_url":"https://api.github.com/users/dhimmel/received_events","type":"User","site_admin":false},"body":"@stephenshank I think this is because Reactome gene sets where extracted though [Pathway Commons](http://www.pathwaycommons.org/). You're right that attribution to the corresponding Reactome pathway is suboptimal in Hetionet v1.0. Will keep this in mind for the future.","created_at":"2016-08-26T21:07:41Z","updated_at":"2016-08-26T21:07:41Z","html_url":"https://github.com/cognoma/machine-learning/pull/39#discussion_r76488283","pull_request_url":"https://api.github.com/repos/cognoma/machine-learning/pulls/39","_links":{"self":{"href":"https://api.github.com/repos/cognoma/machine-learning/pulls/comments/76488283"},"html":{"href":"https://github.com/cognoma/machine-learning/pull/39#discussion_r76488283"},"pull_request":{"href":"https://api.github.com/repos/cognoma/machine-learning/pulls/39"}}},"pull_request":{"url":"https://api.github.com/repos/cognoma/machine-learning/pulls/39","id":82936718,"html_url":"https://github.com/cognoma/machine-learning/pull/39","diff_url":"https://github.com/cognoma/machine-learning/pull/39.diff","patch_url":"https://github.com/cognoma/machine-learning/pull/39.patch","issue_url":"https://api.github.com/repos/cognoma/machine-learning/issues/39","number":39,"state":"open","locked":false,"title":"Machine Learning Pathway Classifier Example","user":{"login":"gwaygenomics","id":7340421,"avatar_url":"https://avatars.githubusercontent.com/u/7340421?v=3","gravatar_id":"","url":"https://api.github.com/users/gwaygenomics","html_url":"https://github.com/gwaygenomics","followers_url":"https://api.github.com/users/gwaygenomics/followers","following_url":"https://api.github.com/users/gwaygenomics/following{/other_user}","gists_url":"https://api.github.com/users/gwaygenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/gwaygenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwaygenomics/subscriptions","organizations_url":"https://api.github.com/users/gwaygenomics/orgs","repos_url":"https://api.github.com/users/gwaygenomics/repos","events_url":"https://api.github.com/users/gwaygenomics/events{/privacy}","received_events_url":"https://api.github.com/users/gwaygenomics/received_events","type":"User","site_admin":false},"body":"The pull request adds an example of predicting a Biological Pathway signature using PanCancer data. In the example, I predict Hippo Signaling with variable prediction across tissues. The pull request makes two contributions:\r\n\r\n1. Demonstrates that we _can_ predict whole pathways using the Cognoma approach\r\n2. Drives home the need for tissue specific visualizations and the importance of selecting appropriate tissues for training the classifier.","created_at":"2016-08-26T18:57:01Z","updated_at":"2016-08-26T21:07:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e85b30e3ee4bb9c5cfbb5454c5bb3caa31b89a8d","assignee":{"login":"yl565","id":15843826,"avatar_url":"https://avatars.githubusercontent.com/u/15843826?v=3","gravatar_id":"","url":"https://api.github.com/users/yl565","html_url":"https://github.com/yl565","followers_url":"https://api.github.com/users/yl565/followers","following_url":"https://api.github.com/users/yl565/following{/other_user}","gists_url":"https://api.github.com/users/yl565/gists{/gist_id}","starred_url":"https://api.github.com/users/yl565/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yl565/subscriptions","organizations_url":"https://api.github.com/users/yl565/orgs","repos_url":"https://api.github.com/users/yl565/repos","events_url":"https://api.github.com/users/yl565/events{/privacy}","received_events_url":"https://api.github.com/users/yl565/received_events","type":"User","site_admin":false},"assignees":[{"login":"yl565","id":15843826,"avatar_url":"https://avatars.githubusercontent.com/u/15843826?v=3","gravatar_id":"","url":"https://api.github.com/users/yl565","html_url":"https://github.com/yl565","followers_url":"https://api.github.com/users/yl565/followers","following_url":"https://api.github.com/users/yl565/following{/other_user}","gists_url":"https://api.github.com/users/yl565/gists{/gist_id}","starred_url":"https://api.github.com/users/yl565/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yl565/subscriptions","organizations_url":"https://api.github.com/users/yl565/orgs","repos_url":"https://api.github.com/users/yl565/repos","events_url":"https://api.github.com/users/yl565/events{/privacy}","received_events_url":"https://api.github.com/users/yl565/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/cognoma/machine-learning/pulls/39/commits","review_comments_url":"https://api.github.com/repos/cognoma/machine-learning/pulls/39/comments","review_comment_url":"https://api.github.com/repos/cognoma/machine-learning/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cognoma/machine-learning/issues/39/comments","statuses_url":"https://api.github.com/repos/cognoma/machine-learning/statuses/48dc5940108d52fa11f83cd7e5f66a1380d9079d","head":{"label":"gwaygenomics:pathway","ref":"pathway","sha":"48dc5940108d52fa11f83cd7e5f66a1380d9079d","user":{"login":"gwaygenomics","id":7340421,"avatar_url":"https://avatars.githubusercontent.com/u/7340421?v=3","gravatar_id":"","url":"https://api.github.com/users/gwaygenomics","html_url":"https://github.com/gwaygenomics","followers_url":"https://api.github.com/users/gwaygenomics/followers","following_url":"https://api.github.com/users/gwaygenomics/following{/other_user}","gists_url":"https://api.github.com/users/gwaygenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/gwaygenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwaygenomics/subscriptions","organizations_url":"https://api.github.com/users/gwaygenomics/orgs","repos_url":"https://api.github.com/users/gwaygenomics/repos","events_url":"https://api.github.com/users/gwaygenomics/events{/privacy}","received_events_url":"https://api.github.com/users/gwaygenomics/received_events","type":"User","site_admin":false},"repo":{"id":64150251,"name":"machine-learning","full_name":"gwaygenomics/machine-learning","owner":{"login":"gwaygenomics","id":7340421,"avatar_url":"https://avatars.githubusercontent.com/u/7340421?v=3","gravatar_id":"","url":"https://api.github.com/users/gwaygenomics","html_url":"https://github.com/gwaygenomics","followers_url":"https://api.github.com/users/gwaygenomics/followers","following_url":"https://api.github.com/users/gwaygenomics/following{/other_user}","gists_url":"https://api.github.com/users/gwaygenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/gwaygenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwaygenomics/subscriptions","organizations_url":"https://api.github.com/users/gwaygenomics/orgs","repos_url":"https://api.github.com/users/gwaygenomics/repos","events_url":"https://api.github.com/users/gwaygenomics/events{/privacy}","received_events_url":"https://api.github.com/users/gwaygenomics/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gwaygenomics/machine-learning","description":"Machine learning for Project Cognoma","fork":true,"url":"https://api.github.com/repos/gwaygenomics/machine-learning","forks_url":"https://api.github.com/repos/gwaygenomics/machine-learning/forks","keys_url":"https://api.github.com/repos/gwaygenomics/machine-learning/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gwaygenomics/machine-learning/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gwaygenomics/machine-learning/teams","hooks_url":"https://api.github.com/repos/gwaygenomics/machine-learning/hooks","issue_events_url":"https://api.github.com/repos/gwaygenomics/machine-learning/issues/events{/number}","events_url":"https://api.github.com/repos/gwaygenomics/machine-learning/events","assignees_url":"https://api.github.com/repos/gwaygenomics/machine-learning/assignees{/user}","branches_url":"https://api.github.com/repos/gwaygenomics/machine-learning/branches{/branch}","tags_url":"https://api.github.com/repos/gwaygenomics/machine-learning/tags","blobs_url":"https://api.github.com/repos/gwaygenomics/machine-learning/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gwaygenomics/machine-learning/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gwaygenomics/machine-learning/git/refs{/sha}","trees_url":"https://api.github.com/repos/gwaygenomics/machine-learning/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gwaygenomics/machine-learning/statuses/{sha}","languages_url":"https://api.github.com/repos/gwaygenomics/machine-learning/languages","stargazers_url":"https://api.github.com/repos/gwaygenomics/machine-learning/stargazers","contributors_url":"https://api.github.com/repos/gwaygenomics/machine-learning/contributors","subscribers_url":"https://api.github.com/repos/gwaygenomics/machine-learning/subscribers","subscription_url":"https://api.github.com/repos/gwaygenomics/machine-learning/subscription","commits_url":"https://api.github.com/repos/gwaygenomics/machine-learning/commits{/sha}","git_commits_url":"https://api.github.com/repos/gwaygenomics/machine-learning/git/commits{/sha}","comments_url":"https://api.github.com/repos/gwaygenomics/machine-learning/comments{/number}","issue_comment_url":"https://api.github.com/repos/gwaygenomics/machine-learning/issues/comments{/number}","contents_url":"https://api.github.com/repos/gwaygenomics/machine-learning/contents/{+path}","compare_url":"https://api.github.com/repos/gwaygenomics/machine-learning/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gwaygenomics/machine-learning/merges","archive_url":"https://api.github.com/repos/gwaygenomics/machine-learning/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gwaygenomics/machine-learning/downloads","issues_url":"https://api.github.com/repos/gwaygenomics/machine-learning/issues{/number}","pulls_url":"https://api.github.com/repos/gwaygenomics/machine-learning/pulls{/number}","milestones_url":"https://api.github.com/repos/gwaygenomics/machine-learning/milestones{/number}","notifications_url":"https://api.github.com/repos/gwaygenomics/machine-learning/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gwaygenomics/machine-learning/labels{/name}","releases_url":"https://api.github.com/repos/gwaygenomics/machine-learning/releases{/id}","deployments_url":"https://api.github.com/repos/gwaygenomics/machine-learning/deployments","created_at":"2016-07-25T16:23:52Z","updated_at":"2016-07-25T21:00:16Z","pushed_at":"2016-08-26T19:03:19Z","git_url":"git://github.com/gwaygenomics/machine-learning.git","ssh_url":"git@github.com:gwaygenomics/machine-learning.git","clone_url":"https://github.com/gwaygenomics/machine-learning.git","svn_url":"https://github.com/gwaygenomics/machine-learning","homepage":null,"size":1426,"stargazers_count":0,"watchers_count":0,"language":"Jupyter Notebook","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":"cognoma:master","ref":"master","sha":"bf48349bcbe353fa1fcc47d3680a8ae65d756088","user":{"login":"cognoma","id":20342585,"avatar_url":"https://avatars.githubusercontent.com/u/20342585?v=3","gravatar_id":"","url":"https://api.github.com/users/cognoma","html_url":"https://github.com/cognoma","followers_url":"https://api.github.com/users/cognoma/followers","following_url":"https://api.github.com/users/cognoma/following{/other_user}","gists_url":"https://api.github.com/users/cognoma/gists{/gist_id}","starred_url":"https://api.github.com/users/cognoma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cognoma/subscriptions","organizations_url":"https://api.github.com/users/cognoma/orgs","repos_url":"https://api.github.com/users/cognoma/repos","events_url":"https://api.github.com/users/cognoma/events{/privacy}","received_events_url":"https://api.github.com/users/cognoma/received_events","type":"Organization","site_admin":false},"repo":{"id":63727862,"name":"machine-learning","full_name":"cognoma/machine-learning","owner":{"login":"cognoma","id":20342585,"avatar_url":"https://avatars.githubusercontent.com/u/20342585?v=3","gravatar_id":"","url":"https://api.github.com/users/cognoma","html_url":"https://github.com/cognoma","followers_url":"https://api.github.com/users/cognoma/followers","following_url":"https://api.github.com/users/cognoma/following{/other_user}","gists_url":"https://api.github.com/users/cognoma/gists{/gist_id}","starred_url":"https://api.github.com/users/cognoma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cognoma/subscriptions","organizations_url":"https://api.github.com/users/cognoma/orgs","repos_url":"https://api.github.com/users/cognoma/repos","events_url":"https://api.github.com/users/cognoma/events{/privacy}","received_events_url":"https://api.github.com/users/cognoma/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cognoma/machine-learning","description":"Machine learning for Project Cognoma","fork":false,"url":"https://api.github.com/repos/cognoma/machine-learning","forks_url":"https://api.github.com/repos/cognoma/machine-learning/forks","keys_url":"https://api.github.com/repos/cognoma/machine-learning/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cognoma/machine-learning/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cognoma/machine-learning/teams","hooks_url":"https://api.github.com/repos/cognoma/machine-learning/hooks","issue_events_url":"https://api.github.com/repos/cognoma/machine-learning/issues/events{/number}","events_url":"https://api.github.com/repos/cognoma/machine-learning/events","assignees_url":"https://api.github.com/repos/cognoma/machine-learning/assignees{/user}","branches_url":"https://api.github.com/repos/cognoma/machine-learning/branches{/branch}","tags_url":"https://api.github.com/repos/cognoma/machine-learning/tags","blobs_url":"https://api.github.com/repos/cognoma/machine-learning/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cognoma/machine-learning/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cognoma/machine-learning/git/refs{/sha}","trees_url":"https://api.github.com/repos/cognoma/machine-learning/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cognoma/machine-learning/statuses/{sha}","languages_url":"https://api.github.com/repos/cognoma/machine-learning/languages","stargazers_url":"https://api.github.com/repos/cognoma/machine-learning/stargazers","contributors_url":"https://api.github.com/repos/cognoma/machine-learning/contributors","subscribers_url":"https://api.github.com/repos/cognoma/machine-learning/subscribers","subscription_url":"https://api.github.com/repos/cognoma/machine-learning/subscription","commits_url":"https://api.github.com/repos/cognoma/machine-learning/commits{/sha}","git_commits_url":"https://api.github.com/repos/cognoma/machine-learning/git/commits{/sha}","comments_url":"https://api.github.com/repos/cognoma/machine-learning/comments{/number}","issue_comment_url":"https://api.github.com/repos/cognoma/machine-learning/issues/comments{/number}","contents_url":"https://api.github.com/repos/cognoma/machine-learning/contents/{+path}","compare_url":"https://api.github.com/repos/cognoma/machine-learning/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cognoma/machine-learning/merges","archive_url":"https://api.github.com/repos/cognoma/machine-learning/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cognoma/machine-learning/downloads","issues_url":"https://api.github.com/repos/cognoma/machine-learning/issues{/number}","pulls_url":"https://api.github.com/repos/cognoma/machine-learning/pulls{/number}","milestones_url":"https://api.github.com/repos/cognoma/machine-learning/milestones{/number}","notifications_url":"https://api.github.com/repos/cognoma/machine-learning/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cognoma/machine-learning/labels{/name}","releases_url":"https://api.github.com/repos/cognoma/machine-learning/releases{/id}","deployments_url":"https://api.github.com/repos/cognoma/machine-learning/deployments","created_at":"2016-07-19T21:03:15Z","updated_at":"2016-08-19T03:07:28Z","pushed_at":"2016-08-26T19:03:20Z","git_url":"git://github.com/cognoma/machine-learning.git","ssh_url":"git@github.com:cognoma/machine-learning.git","clone_url":"https://github.com/cognoma/machine-learning.git","svn_url":"https://github.com/cognoma/machine-learning","homepage":null,"size":3236,"stargazers_count":2,"watchers_count":2,"language":"Jupyter Notebook","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15,"mirror_url":null,"open_issues_count":19,"forks":15,"open_issues":19,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cognoma/machine-learning/pulls/39"},"html":{"href":"https://github.com/cognoma/machine-learning/pull/39"},"issue":{"href":"https://api.github.com/repos/cognoma/machine-learning/issues/39"},"comments":{"href":"https://api.github.com/repos/cognoma/machine-learning/issues/39/comments"},"review_comments":{"href":"https://api.github.com/repos/cognoma/machine-learning/pulls/39/comments"},"review_comment":{"href":"https://api.github.com/repos/cognoma/machine-learning/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cognoma/machine-learning/pulls/39/commits"},"statuses":{"href":"https://api.github.com/repos/cognoma/machine-learning/statuses/48dc5940108d52fa11f83cd7e5f66a1380d9079d"}}}}
{"actor":{"display_login":"dhimmel"}}