{"action":"created","comment":{"url":"https://api.github.com/repos/deflaux/codelabs/pulls/comments/23249015","id":23249015,"diff_hunk":"@@ -0,0 +1,43 @@\n+# Compute the Ti/Tv ratio of the 1,000 Genomes dataset.\n+SELECT\n+  transitions,\n+  transversions,\n+  transitions/transversions AS titv,\n+  COUNT\n+FROM (\n+  SELECT\n+    SUM(IF(mutation IN ('A->G',\n+          'G->A',\n+          'C->T',\n+          'T->C'),\n+        INTEGER(num_snps),\n+        INTEGER(0))) AS transitions,\n+    SUM(IF(mutation IN ('A->C',\n+          'C->A',\n+          'G->T',\n+          'T->G',\n+          'A->T',\n+          'T->A',\n+          'C->G',\n+          'G->C'),\n+        INTEGER(num_snps),\n+        INTEGER(0))) AS transversions,\n+        COUNT(mutation) AS COUNT\n+  FROM (\n+    SELECT\n+      CONCAT(reference_bases,\n+        CONCAT(STRING('->'),\n+          alternate_bases)) AS mutation,\n+      COUNT(alternate_bases) AS num_snps,\n+    FROM\n+      [genomics-public-data:platinum_genomes.variants]\n+    WHERE\n+      reference_name = 'chr17'\n+      AND start BETWEEN 41196311\n+      AND 41277499     \n+      AND LENGTH(alternate_bases) == 1\n+      AND LENGTH(reference_bases) == 1\n+    GROUP BY\n+      mutation,\n+    ORDER BY\n+      mutation))","path":"R/PlatinumGenomes-QC/sql/ti-tv-ratio.sql","position":43,"original_position":43,"commit_id":"4e2baa9de953ad01d8ef1707fcef878cde5b4c18","original_commit_id":"4e2baa9de953ad01d8ef1707fcef878cde5b4c18","user":{"login":"deflaux","id":1395500,"avatar_url":"https://avatars.githubusercontent.com/u/1395500?v=3","gravatar_id":"","url":"https://api.github.com/users/deflaux","html_url":"https://github.com/deflaux","followers_url":"https://api.github.com/users/deflaux/followers","following_url":"https://api.github.com/users/deflaux/following{/other_user}","gists_url":"https://api.github.com/users/deflaux/gists{/gist_id}","starred_url":"https://api.github.com/users/deflaux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deflaux/subscriptions","organizations_url":"https://api.github.com/users/deflaux/orgs","repos_url":"https://api.github.com/users/deflaux/repos","events_url":"https://api.github.com/users/deflaux/events{/privacy}","received_events_url":"https://api.github.com/users/deflaux/received_events","type":"User","site_admin":false},"body":"minor nit pick \r\n\r\nplease end with a newline","created_at":"2015-01-20T19:39:26Z","updated_at":"2015-01-20T19:39:26Z","html_url":"https://github.com/deflaux/codelabs/pull/7#discussion_r23249015","pull_request_url":"https://api.github.com/repos/deflaux/codelabs/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/deflaux/codelabs/pulls/comments/23249015"},"html":{"href":"https://github.com/deflaux/codelabs/pull/7#discussion_r23249015"},"pull_request":{"href":"https://api.github.com/repos/deflaux/codelabs/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/deflaux/codelabs/pulls/7","id":27378360,"html_url":"https://github.com/deflaux/codelabs/pull/7","diff_url":"https://github.com/deflaux/codelabs/pull/7.diff","patch_url":"https://github.com/deflaux/codelabs/pull/7.patch","issue_url":"https://api.github.com/repos/deflaux/codelabs/issues/7","number":7,"state":"open","locked":false,"title":"Adding changes for transition/transversion calculations.","user":{"login":"gregmcinnes","id":5245246,"avatar_url":"https://avatars.githubusercontent.com/u/5245246?v=3","gravatar_id":"","url":"https://api.github.com/users/gregmcinnes","html_url":"https://github.com/gregmcinnes","followers_url":"https://api.github.com/users/gregmcinnes/followers","following_url":"https://api.github.com/users/gregmcinnes/following{/other_user}","gists_url":"https://api.github.com/users/gregmcinnes/gists{/gist_id}","starred_url":"https://api.github.com/users/gregmcinnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregmcinnes/subscriptions","organizations_url":"https://api.github.com/users/gregmcinnes/orgs","repos_url":"https://api.github.com/users/gregmcinnes/repos","events_url":"https://api.github.com/users/gregmcinnes/events{/privacy}","received_events_url":"https://api.github.com/users/gregmcinnes/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-14T19:58:35Z","updated_at":"2015-01-20T19:39:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"539720027718578e63b5764a87d62c55d0f7d22c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/deflaux/codelabs/pulls/7/commits","review_comments_url":"https://api.github.com/repos/deflaux/codelabs/pulls/7/comments","review_comment_url":"https://api.github.com/repos/deflaux/codelabs/pulls/comments/{number}","comments_url":"https://api.github.com/repos/deflaux/codelabs/issues/7/comments","statuses_url":"https://api.github.com/repos/deflaux/codelabs/statuses/4e2baa9de953ad01d8ef1707fcef878cde5b4c18","head":{"label":"gregmcinnes:qc-codelab","ref":"qc-codelab","sha":"4e2baa9de953ad01d8ef1707fcef878cde5b4c18","user":{"login":"gregmcinnes","id":5245246,"avatar_url":"https://avatars.githubusercontent.com/u/5245246?v=3","gravatar_id":"","url":"https://api.github.com/users/gregmcinnes","html_url":"https://github.com/gregmcinnes","followers_url":"https://api.github.com/users/gregmcinnes/followers","following_url":"https://api.github.com/users/gregmcinnes/following{/other_user}","gists_url":"https://api.github.com/users/gregmcinnes/gists{/gist_id}","starred_url":"https://api.github.com/users/gregmcinnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregmcinnes/subscriptions","organizations_url":"https://api.github.com/users/gregmcinnes/orgs","repos_url":"https://api.github.com/users/gregmcinnes/repos","events_url":"https://api.github.com/users/gregmcinnes/events{/privacy}","received_events_url":"https://api.github.com/users/gregmcinnes/received_events","type":"User","site_admin":false},"repo":{"id":28113796,"name":"codelabs","full_name":"gregmcinnes/codelabs","owner":{"login":"gregmcinnes","id":5245246,"avatar_url":"https://avatars.githubusercontent.com/u/5245246?v=3","gravatar_id":"","url":"https://api.github.com/users/gregmcinnes","html_url":"https://github.com/gregmcinnes","followers_url":"https://api.github.com/users/gregmcinnes/followers","following_url":"https://api.github.com/users/gregmcinnes/following{/other_user}","gists_url":"https://api.github.com/users/gregmcinnes/gists{/gist_id}","starred_url":"https://api.github.com/users/gregmcinnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gregmcinnes/subscriptions","organizations_url":"https://api.github.com/users/gregmcinnes/orgs","repos_url":"https://api.github.com/users/gregmcinnes/repos","events_url":"https://api.github.com/users/gregmcinnes/events{/privacy}","received_events_url":"https://api.github.com/users/gregmcinnes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gregmcinnes/codelabs","description":"Codelabs in various languages demonstrating usage of several tools & systems upon genomics data.","fork":true,"url":"https://api.github.com/repos/gregmcinnes/codelabs","forks_url":"https://api.github.com/repos/gregmcinnes/codelabs/forks","keys_url":"https://api.github.com/repos/gregmcinnes/codelabs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gregmcinnes/codelabs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gregmcinnes/codelabs/teams","hooks_url":"https://api.github.com/repos/gregmcinnes/codelabs/hooks","issue_events_url":"https://api.github.com/repos/gregmcinnes/codelabs/issues/events{/number}","events_url":"https://api.github.com/repos/gregmcinnes/codelabs/events","assignees_url":"https://api.github.com/repos/gregmcinnes/codelabs/assignees{/user}","branches_url":"https://api.github.com/repos/gregmcinnes/codelabs/branches{/branch}","tags_url":"https://api.github.com/repos/gregmcinnes/codelabs/tags","blobs_url":"https://api.github.com/repos/gregmcinnes/codelabs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gregmcinnes/codelabs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gregmcinnes/codelabs/git/refs{/sha}","trees_url":"https://api.github.com/repos/gregmcinnes/codelabs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gregmcinnes/codelabs/statuses/{sha}","languages_url":"https://api.github.com/repos/gregmcinnes/codelabs/languages","stargazers_url":"https://api.github.com/repos/gregmcinnes/codelabs/stargazers","contributors_url":"https://api.github.com/repos/gregmcinnes/codelabs/contributors","subscribers_url":"https://api.github.com/repos/gregmcinnes/codelabs/subscribers","subscription_url":"https://api.github.com/repos/gregmcinnes/codelabs/subscription","commits_url":"https://api.github.com/repos/gregmcinnes/codelabs/commits{/sha}","git_commits_url":"https://api.github.com/repos/gregmcinnes/codelabs/git/commits{/sha}","comments_url":"https://api.github.com/repos/gregmcinnes/codelabs/comments{/number}","issue_comment_url":"https://api.github.com/repos/gregmcinnes/codelabs/issues/comments/{number}","contents_url":"https://api.github.com/repos/gregmcinnes/codelabs/contents/{+path}","compare_url":"https://api.github.com/repos/gregmcinnes/codelabs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gregmcinnes/codelabs/merges","archive_url":"https://api.github.com/repos/gregmcinnes/codelabs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gregmcinnes/codelabs/downloads","issues_url":"https://api.github.com/repos/gregmcinnes/codelabs/issues{/number}","pulls_url":"https://api.github.com/repos/gregmcinnes/codelabs/pulls{/number}","milestones_url":"https://api.github.com/repos/gregmcinnes/codelabs/milestones{/number}","notifications_url":"https://api.github.com/repos/gregmcinnes/codelabs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gregmcinnes/codelabs/labels{/name}","releases_url":"https://api.github.com/repos/gregmcinnes/codelabs/releases{/id}","created_at":"2014-12-17T00:40:06Z","updated_at":"2014-11-05T22:10:13Z","pushed_at":"2015-01-14T19:56:06Z","git_url":"git://github.com/gregmcinnes/codelabs.git","ssh_url":"git@github.com:gregmcinnes/codelabs.git","clone_url":"https://github.com/gregmcinnes/codelabs.git","svn_url":"https://github.com/gregmcinnes/codelabs","homepage":null,"size":10798,"stargazers_count":0,"watchers_count":0,"language":null,"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":"deflaux:qc-codelab","ref":"qc-codelab","sha":"6928aebeaa48a419280fab50b76d195b4a8cc1fc","user":{"login":"deflaux","id":1395500,"avatar_url":"https://avatars.githubusercontent.com/u/1395500?v=3","gravatar_id":"","url":"https://api.github.com/users/deflaux","html_url":"https://github.com/deflaux","followers_url":"https://api.github.com/users/deflaux/followers","following_url":"https://api.github.com/users/deflaux/following{/other_user}","gists_url":"https://api.github.com/users/deflaux/gists{/gist_id}","starred_url":"https://api.github.com/users/deflaux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deflaux/subscriptions","organizations_url":"https://api.github.com/users/deflaux/orgs","repos_url":"https://api.github.com/users/deflaux/repos","events_url":"https://api.github.com/users/deflaux/events{/privacy}","received_events_url":"https://api.github.com/users/deflaux/received_events","type":"User","site_admin":false},"repo":{"id":25943996,"name":"codelabs","full_name":"deflaux/codelabs","owner":{"login":"deflaux","id":1395500,"avatar_url":"https://avatars.githubusercontent.com/u/1395500?v=3","gravatar_id":"","url":"https://api.github.com/users/deflaux","html_url":"https://github.com/deflaux","followers_url":"https://api.github.com/users/deflaux/followers","following_url":"https://api.github.com/users/deflaux/following{/other_user}","gists_url":"https://api.github.com/users/deflaux/gists{/gist_id}","starred_url":"https://api.github.com/users/deflaux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deflaux/subscriptions","organizations_url":"https://api.github.com/users/deflaux/orgs","repos_url":"https://api.github.com/users/deflaux/repos","events_url":"https://api.github.com/users/deflaux/events{/privacy}","received_events_url":"https://api.github.com/users/deflaux/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/deflaux/codelabs","description":"Codelabs in various languages demonstrating usage of several tools & systems upon genomics data.","fork":false,"url":"https://api.github.com/repos/deflaux/codelabs","forks_url":"https://api.github.com/repos/deflaux/codelabs/forks","keys_url":"https://api.github.com/repos/deflaux/codelabs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deflaux/codelabs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deflaux/codelabs/teams","hooks_url":"https://api.github.com/repos/deflaux/codelabs/hooks","issue_events_url":"https://api.github.com/repos/deflaux/codelabs/issues/events{/number}","events_url":"https://api.github.com/repos/deflaux/codelabs/events","assignees_url":"https://api.github.com/repos/deflaux/codelabs/assignees{/user}","branches_url":"https://api.github.com/repos/deflaux/codelabs/branches{/branch}","tags_url":"https://api.github.com/repos/deflaux/codelabs/tags","blobs_url":"https://api.github.com/repos/deflaux/codelabs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deflaux/codelabs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deflaux/codelabs/git/refs{/sha}","trees_url":"https://api.github.com/repos/deflaux/codelabs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deflaux/codelabs/statuses/{sha}","languages_url":"https://api.github.com/repos/deflaux/codelabs/languages","stargazers_url":"https://api.github.com/repos/deflaux/codelabs/stargazers","contributors_url":"https://api.github.com/repos/deflaux/codelabs/contributors","subscribers_url":"https://api.github.com/repos/deflaux/codelabs/subscribers","subscription_url":"https://api.github.com/repos/deflaux/codelabs/subscription","commits_url":"https://api.github.com/repos/deflaux/codelabs/commits{/sha}","git_commits_url":"https://api.github.com/repos/deflaux/codelabs/git/commits{/sha}","comments_url":"https://api.github.com/repos/deflaux/codelabs/comments{/number}","issue_comment_url":"https://api.github.com/repos/deflaux/codelabs/issues/comments/{number}","contents_url":"https://api.github.com/repos/deflaux/codelabs/contents/{+path}","compare_url":"https://api.github.com/repos/deflaux/codelabs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deflaux/codelabs/merges","archive_url":"https://api.github.com/repos/deflaux/codelabs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deflaux/codelabs/downloads","issues_url":"https://api.github.com/repos/deflaux/codelabs/issues{/number}","pulls_url":"https://api.github.com/repos/deflaux/codelabs/pulls{/number}","milestones_url":"https://api.github.com/repos/deflaux/codelabs/milestones{/number}","notifications_url":"https://api.github.com/repos/deflaux/codelabs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deflaux/codelabs/labels{/name}","releases_url":"https://api.github.com/repos/deflaux/codelabs/releases{/id}","created_at":"2014-10-29T22:18:47Z","updated_at":"2014-11-05T22:10:13Z","pushed_at":"2015-01-16T18:37:06Z","git_url":"git://github.com/deflaux/codelabs.git","ssh_url":"git@github.com:deflaux/codelabs.git","clone_url":"https://github.com/deflaux/codelabs.git","svn_url":"https://github.com/deflaux/codelabs","homepage":null,"size":10965,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/deflaux/codelabs/pulls/7"},"html":{"href":"https://github.com/deflaux/codelabs/pull/7"},"issue":{"href":"https://api.github.com/repos/deflaux/codelabs/issues/7"},"comments":{"href":"https://api.github.com/repos/deflaux/codelabs/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/deflaux/codelabs/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/deflaux/codelabs/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/deflaux/codelabs/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/deflaux/codelabs/statuses/4e2baa9de953ad01d8ef1707fcef878cde5b4c18"}}}}