{"action":"created","comment":{"url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/pulls/comments/56241883","id":56241883,"diff_hunk":"@@ -0,0 +1,182 @@\n+\"\"\"This notebook updates all file annotations a project.\n+\n+There are four required file annotations for any assay file uploaded to Synapse.\n+\n+`UID` - a universal ID for the sample represented in the file\n+`dataType`: `mRNA`, `miRNA`, `methylation`, etc.\n+`fileType`: `bam`, `fastq`, etc.\n+`fileSubType`: is `fileType`-specific; e.g., `bam` can have `mapped` or `unmapped`.\n+\n+This script uses the `dataType` field to get assay-specific files (using a query lookup dictionary `assayToQuery`),\n+and then the `UID` to merge existing file annotations and the table metadata (which is obtained through a lookup\n+dictionary `assayToMetadataTable`.\n+\n+\"\"\"\n+\n+import sys\n+import pandas as pd\n+import numpy","path":"update_annotations_from_table.py","position":23,"original_position":18,"commit_id":"a473b7973653b0091ab4acf378550173f43b70b6","original_commit_id":"deb9b12ae2230e52344f9b0a92d7cfd1172c2feb","user":{"login":"xindiguo","id":16565812,"avatar_url":"https://avatars.githubusercontent.com/u/16565812?v=3","gravatar_id":"","url":"https://api.github.com/users/xindiguo","html_url":"https://github.com/xindiguo","followers_url":"https://api.github.com/users/xindiguo/followers","following_url":"https://api.github.com/users/xindiguo/following{/other_user}","gists_url":"https://api.github.com/users/xindiguo/gists{/gist_id}","starred_url":"https://api.github.com/users/xindiguo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xindiguo/subscriptions","organizations_url":"https://api.github.com/users/xindiguo/orgs","repos_url":"https://api.github.com/users/xindiguo/repos","events_url":"https://api.github.com/users/xindiguo/events{/privacy}","received_events_url":"https://api.github.com/users/xindiguo/received_events","type":"User","site_admin":false},"body":"Pandas has <code>pandas.isnull()</code> for checking missing values (NaN in numeric arrays, None/NaN in object arrays).","created_at":"2016-03-15T21:13:54Z","updated_at":"2016-03-15T21:13:54Z","html_url":"https://github.com/Sage-Bionetworks/pythonSynapseUtils/pull/5#discussion_r56241883","pull_request_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/pulls/comments/56241883"},"html":{"href":"https://github.com/Sage-Bionetworks/pythonSynapseUtils/pull/5#discussion_r56241883"},"pull_request":{"href":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/pulls/5","id":61307027,"html_url":"https://github.com/Sage-Bionetworks/pythonSynapseUtils/pull/5","diff_url":"https://github.com/Sage-Bionetworks/pythonSynapseUtils/pull/5.diff","patch_url":"https://github.com/Sage-Bionetworks/pythonSynapseUtils/pull/5.patch","issue_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/issues/5","number":5,"state":"open","locked":false,"title":"added script to update annots from a Synapse table, datatype specific","user":{"login":"kdaily","id":84993,"avatar_url":"https://avatars.githubusercontent.com/u/84993?v=3","gravatar_id":"","url":"https://api.github.com/users/kdaily","html_url":"https://github.com/kdaily","followers_url":"https://api.github.com/users/kdaily/followers","following_url":"https://api.github.com/users/kdaily/following{/other_user}","gists_url":"https://api.github.com/users/kdaily/gists{/gist_id}","starred_url":"https://api.github.com/users/kdaily/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdaily/subscriptions","organizations_url":"https://api.github.com/users/kdaily/orgs","repos_url":"https://api.github.com/users/kdaily/repos","events_url":"https://api.github.com/users/kdaily/events{/privacy}","received_events_url":"https://api.github.com/users/kdaily/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-01T20:57:18Z","updated_at":"2016-03-15T21:13:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"521c6c160e06180311505f1a951262a188ddf916","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/pulls/5/commits","review_comments_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/pulls/5/comments","review_comment_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/issues/5/comments","statuses_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/statuses/a473b7973653b0091ab4acf378550173f43b70b6","head":{"label":"kdaily:updateannots","ref":"updateannots","sha":"a473b7973653b0091ab4acf378550173f43b70b6","user":{"login":"kdaily","id":84993,"avatar_url":"https://avatars.githubusercontent.com/u/84993?v=3","gravatar_id":"","url":"https://api.github.com/users/kdaily","html_url":"https://github.com/kdaily","followers_url":"https://api.github.com/users/kdaily/followers","following_url":"https://api.github.com/users/kdaily/following{/other_user}","gists_url":"https://api.github.com/users/kdaily/gists{/gist_id}","starred_url":"https://api.github.com/users/kdaily/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdaily/subscriptions","organizations_url":"https://api.github.com/users/kdaily/orgs","repos_url":"https://api.github.com/users/kdaily/repos","events_url":"https://api.github.com/users/kdaily/events{/privacy}","received_events_url":"https://api.github.com/users/kdaily/received_events","type":"User","site_admin":false},"repo":{"id":41060392,"name":"pythonSynapseUtils","full_name":"kdaily/pythonSynapseUtils","owner":{"login":"kdaily","id":84993,"avatar_url":"https://avatars.githubusercontent.com/u/84993?v=3","gravatar_id":"","url":"https://api.github.com/users/kdaily","html_url":"https://github.com/kdaily","followers_url":"https://api.github.com/users/kdaily/followers","following_url":"https://api.github.com/users/kdaily/following{/other_user}","gists_url":"https://api.github.com/users/kdaily/gists{/gist_id}","starred_url":"https://api.github.com/users/kdaily/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdaily/subscriptions","organizations_url":"https://api.github.com/users/kdaily/orgs","repos_url":"https://api.github.com/users/kdaily/repos","events_url":"https://api.github.com/users/kdaily/events{/privacy}","received_events_url":"https://api.github.com/users/kdaily/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kdaily/pythonSynapseUtils","description":"Helper Scripts to ease routine synapse python client oriented tasks","fork":true,"url":"https://api.github.com/repos/kdaily/pythonSynapseUtils","forks_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/forks","keys_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/teams","hooks_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/hooks","issue_events_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/issues/events{/number}","events_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/events","assignees_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/assignees{/user}","branches_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/branches{/branch}","tags_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/tags","blobs_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/git/refs{/sha}","trees_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/statuses/{sha}","languages_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/languages","stargazers_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/stargazers","contributors_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/contributors","subscribers_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/subscribers","subscription_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/subscription","commits_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/commits{/sha}","git_commits_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/git/commits{/sha}","comments_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/comments{/number}","issue_comment_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/issues/comments{/number}","contents_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/contents/{+path}","compare_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/merges","archive_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/downloads","issues_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/issues{/number}","pulls_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/pulls{/number}","milestones_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/milestones{/number}","notifications_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/labels{/name}","releases_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/releases{/id}","deployments_url":"https://api.github.com/repos/kdaily/pythonSynapseUtils/deployments","created_at":"2015-08-19T21:21:34Z","updated_at":"2016-03-01T20:55:56Z","pushed_at":"2016-03-08T01:23:57Z","git_url":"git://github.com/kdaily/pythonSynapseUtils.git","ssh_url":"git@github.com:kdaily/pythonSynapseUtils.git","clone_url":"https://github.com/kdaily/pythonSynapseUtils.git","svn_url":"https://github.com/kdaily/pythonSynapseUtils","homepage":null,"size":20,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"Sage-Bionetworks:master","ref":"master","sha":"c408854e5e22945ff6d1492bceb29b91026db276","user":{"login":"Sage-Bionetworks","id":1250897,"avatar_url":"https://avatars.githubusercontent.com/u/1250897?v=3","gravatar_id":"","url":"https://api.github.com/users/Sage-Bionetworks","html_url":"https://github.com/Sage-Bionetworks","followers_url":"https://api.github.com/users/Sage-Bionetworks/followers","following_url":"https://api.github.com/users/Sage-Bionetworks/following{/other_user}","gists_url":"https://api.github.com/users/Sage-Bionetworks/gists{/gist_id}","starred_url":"https://api.github.com/users/Sage-Bionetworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sage-Bionetworks/subscriptions","organizations_url":"https://api.github.com/users/Sage-Bionetworks/orgs","repos_url":"https://api.github.com/users/Sage-Bionetworks/repos","events_url":"https://api.github.com/users/Sage-Bionetworks/events{/privacy}","received_events_url":"https://api.github.com/users/Sage-Bionetworks/received_events","type":"Organization","site_admin":false},"repo":{"id":23128714,"name":"pythonSynapseUtils","full_name":"Sage-Bionetworks/pythonSynapseUtils","owner":{"login":"Sage-Bionetworks","id":1250897,"avatar_url":"https://avatars.githubusercontent.com/u/1250897?v=3","gravatar_id":"","url":"https://api.github.com/users/Sage-Bionetworks","html_url":"https://github.com/Sage-Bionetworks","followers_url":"https://api.github.com/users/Sage-Bionetworks/followers","following_url":"https://api.github.com/users/Sage-Bionetworks/following{/other_user}","gists_url":"https://api.github.com/users/Sage-Bionetworks/gists{/gist_id}","starred_url":"https://api.github.com/users/Sage-Bionetworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sage-Bionetworks/subscriptions","organizations_url":"https://api.github.com/users/Sage-Bionetworks/orgs","repos_url":"https://api.github.com/users/Sage-Bionetworks/repos","events_url":"https://api.github.com/users/Sage-Bionetworks/events{/privacy}","received_events_url":"https://api.github.com/users/Sage-Bionetworks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Sage-Bionetworks/pythonSynapseUtils","description":"Helper Scripts to ease routine synapse python client oriented tasks","fork":false,"url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils","forks_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/forks","keys_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/teams","hooks_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/hooks","issue_events_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/issues/events{/number}","events_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/events","assignees_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/assignees{/user}","branches_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/branches{/branch}","tags_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/tags","blobs_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/statuses/{sha}","languages_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/languages","stargazers_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/stargazers","contributors_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/contributors","subscribers_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/subscribers","subscription_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/subscription","commits_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/contents/{+path}","compare_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/merges","archive_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/downloads","issues_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/issues{/number}","pulls_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/pulls{/number}","milestones_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/milestones{/number}","notifications_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/labels{/name}","releases_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/releases{/id}","deployments_url":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/deployments","created_at":"2014-08-19T23:08:27Z","updated_at":"2016-01-29T23:34:34Z","pushed_at":"2016-03-09T06:15:17Z","git_url":"git://github.com/Sage-Bionetworks/pythonSynapseUtils.git","ssh_url":"git@github.com:Sage-Bionetworks/pythonSynapseUtils.git","clone_url":"https://github.com/Sage-Bionetworks/pythonSynapseUtils.git","svn_url":"https://github.com/Sage-Bionetworks/pythonSynapseUtils","homepage":null,"size":48,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":5,"forks":4,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/pulls/5"},"html":{"href":"https://github.com/Sage-Bionetworks/pythonSynapseUtils/pull/5"},"issue":{"href":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/issues/5"},"comments":{"href":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/Sage-Bionetworks/pythonSynapseUtils/statuses/a473b7973653b0091ab4acf378550173f43b70b6"}}}}