{"action":"created","comment":{"url":"https://api.github.com/repos/genome/docm/pulls/comments/47146582","id":47146582,"diff_hunk":"@@ -22,23 +28,54 @@ def self.snp_template(variant)\n               variant.variant)\n     end\n \n-    def self.dnp_template(variant)\n-      snp_template(variant)\n+    def self.dnp_plus_strand_template(variant)\n+      snp_plus_strand_template(variant)\n     end\n \n-    def self.del_template(variant)\n+    def self.del_plus_strand_template(variant)\n       sprintf(\"%s:%sdel%s\",\n               variant.transcript.name,\n               variant.cdna_change,\n               variant.location.reference_read)\n     end\n \n-    def self.ins_template(variant)\n+    def self.ins_plus_strand_template(variant)\n       sprintf(\"%s:%sins%s\",\n               variant.transcript.name,\n               variant.cdna_change,\n               variant.variant)\n     end\n+\n+    def self.snp_minus_strand_template(variant)\n+      sprintf(\"%s:%s%s>%s\",\n+              variant.transcript.name,\n+              variant.cdna_change,\n+              reverse_complement(variant.location.reference_read),\n+              reverse_complement(variant.variant))\n+    end\n+\n+    def self.dnp_minus_strand_template(variant)\n+      snp_minus_strand_template(variant)\n+    end\n+\n+    def self.del_minus_strand_template(variant)\n+      sprintf(\"%s:%sdel%s\",\n+              variant.transcript.name,\n+              variant.cdna_change,\n+              reverse_complement(variant.location.reference_read))\n+    end\n+\n+    def self.ins_minus_strand_template(variant)\n+      sprintf(\"%s:%sins%s\",\n+              variant.transcript.name,\n+              variant.cdna_change,\n+              reverse_complement(variant.variant))\n+    end\n+\n+    def self.reverse_complement(seq)\n+      return seq.reverse().tr!('ATCGatcg','TAGCtagc')","path":"lib/data_fetchers/hgvs.rb","position":72,"original_position":72,"commit_id":"acb5d75f3d60f947140d4f37669218586285d52b","original_commit_id":"acb5d75f3d60f947140d4f37669218586285d52b","user":{"login":"acoffman","id":13370,"avatar_url":"https://avatars.githubusercontent.com/u/13370?v=3","gravatar_id":"","url":"https://api.github.com/users/acoffman","html_url":"https://github.com/acoffman","followers_url":"https://api.github.com/users/acoffman/followers","following_url":"https://api.github.com/users/acoffman/following{/other_user}","gists_url":"https://api.github.com/users/acoffman/gists{/gist_id}","starred_url":"https://api.github.com/users/acoffman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acoffman/subscriptions","organizations_url":"https://api.github.com/users/acoffman/orgs","repos_url":"https://api.github.com/users/acoffman/repos","events_url":"https://api.github.com/users/acoffman/events{/privacy}","received_events_url":"https://api.github.com/users/acoffman/received_events","type":"User","site_admin":false},"body":"@bainscou You will likely want to change this to `tr` rather than`tr!` the later returns a copy of the original string with any modifications resulting from the transformation, or `nil` if nothing was changed while the former returns a copy with any transformations applied. While its unlikely that no changes would be made, `tr` is safer in that you'll never end up with `nil` as a return value. Additionally, `return` statements are not needed unless you're using them for flow control, so this line could read `seq.reverse.tr('ATCGatcg','TAGCtagc')` and work just fine!","created_at":"2015-12-09T20:24:26Z","updated_at":"2015-12-09T20:24:26Z","html_url":"https://github.com/genome/docm/pull/18#discussion_r47146582","pull_request_url":"https://api.github.com/repos/genome/docm/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/genome/docm/pulls/comments/47146582"},"html":{"href":"https://github.com/genome/docm/pull/18#discussion_r47146582"},"pull_request":{"href":"https://api.github.com/repos/genome/docm/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/genome/docm/pulls/18","id":47707678,"html_url":"https://github.com/genome/docm/pull/18","diff_url":"https://github.com/genome/docm/pull/18.diff","patch_url":"https://github.com/genome/docm/pull/18.patch","issue_url":"https://api.github.com/repos/genome/docm/issues/18","number":18,"state":"open","locked":false,"title":"Corrected HGVS construction to always correspond to coding strand","user":{"login":"bainscou","id":1072436,"avatar_url":"https://avatars.githubusercontent.com/u/1072436?v=3","gravatar_id":"","url":"https://api.github.com/users/bainscou","html_url":"https://github.com/bainscou","followers_url":"https://api.github.com/users/bainscou/followers","following_url":"https://api.github.com/users/bainscou/following{/other_user}","gists_url":"https://api.github.com/users/bainscou/gists{/gist_id}","starred_url":"https://api.github.com/users/bainscou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bainscou/subscriptions","organizations_url":"https://api.github.com/users/bainscou/orgs","repos_url":"https://api.github.com/users/bainscou/repos","events_url":"https://api.github.com/users/bainscou/events{/privacy}","received_events_url":"https://api.github.com/users/bainscou/received_events","type":"User","site_admin":false},"body":"This PR intends to fix issue #16.\r\n\r\n@acoffman would it be best to wait and merge this PR until the versioning system is finished?","created_at":"2015-10-14T20:03:38Z","updated_at":"2015-12-09T20:24:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a002f5818ad0576d77e9f42512979350db35bc0b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/genome/docm/pulls/18/commits","review_comments_url":"https://api.github.com/repos/genome/docm/pulls/18/comments","review_comment_url":"https://api.github.com/repos/genome/docm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/genome/docm/issues/18/comments","statuses_url":"https://api.github.com/repos/genome/docm/statuses/acb5d75f3d60f947140d4f37669218586285d52b","head":{"label":"bainscou:hgvs","ref":"hgvs","sha":"acb5d75f3d60f947140d4f37669218586285d52b","user":{"login":"bainscou","id":1072436,"avatar_url":"https://avatars.githubusercontent.com/u/1072436?v=3","gravatar_id":"","url":"https://api.github.com/users/bainscou","html_url":"https://github.com/bainscou","followers_url":"https://api.github.com/users/bainscou/followers","following_url":"https://api.github.com/users/bainscou/following{/other_user}","gists_url":"https://api.github.com/users/bainscou/gists{/gist_id}","starred_url":"https://api.github.com/users/bainscou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bainscou/subscriptions","organizations_url":"https://api.github.com/users/bainscou/orgs","repos_url":"https://api.github.com/users/bainscou/repos","events_url":"https://api.github.com/users/bainscou/events{/privacy}","received_events_url":"https://api.github.com/users/bainscou/received_events","type":"User","site_admin":false},"repo":{"id":24385857,"name":"docm","full_name":"bainscou/docm","owner":{"login":"bainscou","id":1072436,"avatar_url":"https://avatars.githubusercontent.com/u/1072436?v=3","gravatar_id":"","url":"https://api.github.com/users/bainscou","html_url":"https://github.com/bainscou","followers_url":"https://api.github.com/users/bainscou/followers","following_url":"https://api.github.com/users/bainscou/following{/other_user}","gists_url":"https://api.github.com/users/bainscou/gists{/gist_id}","starred_url":"https://api.github.com/users/bainscou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bainscou/subscriptions","organizations_url":"https://api.github.com/users/bainscou/orgs","repos_url":"https://api.github.com/users/bainscou/repos","events_url":"https://api.github.com/users/bainscou/events{/privacy}","received_events_url":"https://api.github.com/users/bainscou/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bainscou/docm","description":"","fork":true,"url":"https://api.github.com/repos/bainscou/docm","forks_url":"https://api.github.com/repos/bainscou/docm/forks","keys_url":"https://api.github.com/repos/bainscou/docm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bainscou/docm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bainscou/docm/teams","hooks_url":"https://api.github.com/repos/bainscou/docm/hooks","issue_events_url":"https://api.github.com/repos/bainscou/docm/issues/events{/number}","events_url":"https://api.github.com/repos/bainscou/docm/events","assignees_url":"https://api.github.com/repos/bainscou/docm/assignees{/user}","branches_url":"https://api.github.com/repos/bainscou/docm/branches{/branch}","tags_url":"https://api.github.com/repos/bainscou/docm/tags","blobs_url":"https://api.github.com/repos/bainscou/docm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bainscou/docm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bainscou/docm/git/refs{/sha}","trees_url":"https://api.github.com/repos/bainscou/docm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bainscou/docm/statuses/{sha}","languages_url":"https://api.github.com/repos/bainscou/docm/languages","stargazers_url":"https://api.github.com/repos/bainscou/docm/stargazers","contributors_url":"https://api.github.com/repos/bainscou/docm/contributors","subscribers_url":"https://api.github.com/repos/bainscou/docm/subscribers","subscription_url":"https://api.github.com/repos/bainscou/docm/subscription","commits_url":"https://api.github.com/repos/bainscou/docm/commits{/sha}","git_commits_url":"https://api.github.com/repos/bainscou/docm/git/commits{/sha}","comments_url":"https://api.github.com/repos/bainscou/docm/comments{/number}","issue_comment_url":"https://api.github.com/repos/bainscou/docm/issues/comments{/number}","contents_url":"https://api.github.com/repos/bainscou/docm/contents/{+path}","compare_url":"https://api.github.com/repos/bainscou/docm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bainscou/docm/merges","archive_url":"https://api.github.com/repos/bainscou/docm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bainscou/docm/downloads","issues_url":"https://api.github.com/repos/bainscou/docm/issues{/number}","pulls_url":"https://api.github.com/repos/bainscou/docm/pulls{/number}","milestones_url":"https://api.github.com/repos/bainscou/docm/milestones{/number}","notifications_url":"https://api.github.com/repos/bainscou/docm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bainscou/docm/labels{/name}","releases_url":"https://api.github.com/repos/bainscou/docm/releases{/id}","created_at":"2014-09-23T19:17:52Z","updated_at":"2015-07-14T14:54:40Z","pushed_at":"2015-10-20T19:42:51Z","git_url":"git://github.com/bainscou/docm.git","ssh_url":"git@github.com:bainscou/docm.git","clone_url":"https://github.com/bainscou/docm.git","svn_url":"https://github.com/bainscou/docm","homepage":null,"size":1111,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"genome:master","ref":"master","sha":"44faa279c1359f0cad3b8d79119694b064b1b032","user":{"login":"genome","id":318108,"avatar_url":"https://avatars.githubusercontent.com/u/318108?v=3","gravatar_id":"","url":"https://api.github.com/users/genome","html_url":"https://github.com/genome","followers_url":"https://api.github.com/users/genome/followers","following_url":"https://api.github.com/users/genome/following{/other_user}","gists_url":"https://api.github.com/users/genome/gists{/gist_id}","starred_url":"https://api.github.com/users/genome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/genome/subscriptions","organizations_url":"https://api.github.com/users/genome/orgs","repos_url":"https://api.github.com/users/genome/repos","events_url":"https://api.github.com/users/genome/events{/privacy}","received_events_url":"https://api.github.com/users/genome/received_events","type":"Organization","site_admin":false},"repo":{"id":17073083,"name":"docm","full_name":"genome/docm","owner":{"login":"genome","id":318108,"avatar_url":"https://avatars.githubusercontent.com/u/318108?v=3","gravatar_id":"","url":"https://api.github.com/users/genome","html_url":"https://github.com/genome","followers_url":"https://api.github.com/users/genome/followers","following_url":"https://api.github.com/users/genome/following{/other_user}","gists_url":"https://api.github.com/users/genome/gists{/gist_id}","starred_url":"https://api.github.com/users/genome/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/genome/subscriptions","organizations_url":"https://api.github.com/users/genome/orgs","repos_url":"https://api.github.com/users/genome/repos","events_url":"https://api.github.com/users/genome/events{/privacy}","received_events_url":"https://api.github.com/users/genome/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/genome/docm","description":"Rails frontend to The Genome Institute's database of curated mutations (DoCM)","fork":false,"url":"https://api.github.com/repos/genome/docm","forks_url":"https://api.github.com/repos/genome/docm/forks","keys_url":"https://api.github.com/repos/genome/docm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/genome/docm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/genome/docm/teams","hooks_url":"https://api.github.com/repos/genome/docm/hooks","issue_events_url":"https://api.github.com/repos/genome/docm/issues/events{/number}","events_url":"https://api.github.com/repos/genome/docm/events","assignees_url":"https://api.github.com/repos/genome/docm/assignees{/user}","branches_url":"https://api.github.com/repos/genome/docm/branches{/branch}","tags_url":"https://api.github.com/repos/genome/docm/tags","blobs_url":"https://api.github.com/repos/genome/docm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/genome/docm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/genome/docm/git/refs{/sha}","trees_url":"https://api.github.com/repos/genome/docm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/genome/docm/statuses/{sha}","languages_url":"https://api.github.com/repos/genome/docm/languages","stargazers_url":"https://api.github.com/repos/genome/docm/stargazers","contributors_url":"https://api.github.com/repos/genome/docm/contributors","subscribers_url":"https://api.github.com/repos/genome/docm/subscribers","subscription_url":"https://api.github.com/repos/genome/docm/subscription","commits_url":"https://api.github.com/repos/genome/docm/commits{/sha}","git_commits_url":"https://api.github.com/repos/genome/docm/git/commits{/sha}","comments_url":"https://api.github.com/repos/genome/docm/comments{/number}","issue_comment_url":"https://api.github.com/repos/genome/docm/issues/comments{/number}","contents_url":"https://api.github.com/repos/genome/docm/contents/{+path}","compare_url":"https://api.github.com/repos/genome/docm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/genome/docm/merges","archive_url":"https://api.github.com/repos/genome/docm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/genome/docm/downloads","issues_url":"https://api.github.com/repos/genome/docm/issues{/number}","pulls_url":"https://api.github.com/repos/genome/docm/pulls{/number}","milestones_url":"https://api.github.com/repos/genome/docm/milestones{/number}","notifications_url":"https://api.github.com/repos/genome/docm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/genome/docm/labels{/name}","releases_url":"https://api.github.com/repos/genome/docm/releases{/id}","created_at":"2014-02-21T23:13:49Z","updated_at":"2015-06-17T15:47:02Z","pushed_at":"2015-12-09T20:08:08Z","git_url":"git://github.com/genome/docm.git","ssh_url":"git@github.com:genome/docm.git","clone_url":"https://github.com/genome/docm.git","svn_url":"https://github.com/genome/docm","homepage":"http://docm.genome.wustl.edu","size":1006,"stargazers_count":6,"watchers_count":6,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":17,"forks":2,"open_issues":17,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/genome/docm/pulls/18"},"html":{"href":"https://github.com/genome/docm/pull/18"},"issue":{"href":"https://api.github.com/repos/genome/docm/issues/18"},"comments":{"href":"https://api.github.com/repos/genome/docm/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/genome/docm/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/genome/docm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/genome/docm/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/genome/docm/statuses/acb5d75f3d60f947140d4f37669218586285d52b"}}}}