{"action":"created","comment":{"url":"https://api.github.com/repos/hammerlab/isovar/pulls/comments/79077002","id":79077002,"diff_hunk":"@@ -324,13 +324,22 @@ def find_mutant_amino_acid_interval(\n     # rounding down since a change in the middle of a codon should count\n     # toward the variant codons\n     n_coding_nucleotides_before_variant = len(cdna_coding_prefix)\n-    n_complete_prefix_codons = cdna_variant_start_offset // 3\n+\n+    # subtract off the number of nucleotides we dropped to shift the sequence\n+    # into the correct reading frame reading frame\n+    n_complete_prefix_codons = n_coding_nucleotides_before_variant // 3\n \n     frame_of_variant_nucleotides = n_coding_nucleotides_before_variant % 3\n     frameshift = abs(n_ref - n_alt) % 3 != 0\n     indel = n_ref != n_alt\n \n-    variant_aa_interval_start = n_complete_prefix_codons + 1\n+    if n_ref == 0 and frame_of_variant_nucleotides == 0:\n+        # if inserting at the codon boundary then add 1 to the number of","path":"isovar/translation.py","position":16,"original_position":16,"commit_id":"e4ff894034324e06cd48c34e88811800ba965330","original_commit_id":"e4ff894034324e06cd48c34e88811800ba965330","user":{"login":"ihodes","id":167803,"avatar_url":"https://avatars.githubusercontent.com/u/167803?v=3","gravatar_id":"","url":"https://api.github.com/users/ihodes","html_url":"https://github.com/ihodes","followers_url":"https://api.github.com/users/ihodes/followers","following_url":"https://api.github.com/users/ihodes/following{/other_user}","gists_url":"https://api.github.com/users/ihodes/gists{/gist_id}","starred_url":"https://api.github.com/users/ihodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ihodes/subscriptions","organizations_url":"https://api.github.com/users/ihodes/orgs","repos_url":"https://api.github.com/users/ihodes/repos","events_url":"https://api.github.com/users/ihodes/events{/privacy}","received_events_url":"https://api.github.com/users/ihodes/received_events","type":"User","site_admin":false},"body":"What is being inserted? ","created_at":"2016-09-15T22:36:52Z","updated_at":"2016-09-15T22:37:13Z","html_url":"https://github.com/hammerlab/isovar/pull/42#discussion_r79077002","pull_request_url":"https://api.github.com/repos/hammerlab/isovar/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/hammerlab/isovar/pulls/comments/79077002"},"html":{"href":"https://github.com/hammerlab/isovar/pull/42#discussion_r79077002"},"pull_request":{"href":"https://api.github.com/repos/hammerlab/isovar/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/hammerlab/isovar/pulls/42","id":85492290,"html_url":"https://github.com/hammerlab/isovar/pull/42","diff_url":"https://github.com/hammerlab/isovar/pull/42.diff","patch_url":"https://github.com/hammerlab/isovar/pull/42.patch","issue_url":"https://api.github.com/repos/hammerlab/isovar/issues/42","number":42,"state":"open","locked":false,"title":"Fixed offset computation for mutant residues in protein sequence","user":{"login":"iskandr","id":48441,"avatar_url":"https://avatars.githubusercontent.com/u/48441?v=3","gravatar_id":"","url":"https://api.github.com/users/iskandr","html_url":"https://github.com/iskandr","followers_url":"https://api.github.com/users/iskandr/followers","following_url":"https://api.github.com/users/iskandr/following{/other_user}","gists_url":"https://api.github.com/users/iskandr/gists{/gist_id}","starred_url":"https://api.github.com/users/iskandr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iskandr/subscriptions","organizations_url":"https://api.github.com/users/iskandr/orgs","repos_url":"https://api.github.com/users/iskandr/repos","events_url":"https://api.github.com/users/iskandr/events{/privacy}","received_events_url":"https://api.github.com/users/iskandr/received_events","type":"User","site_admin":false},"body":"* Added unit tests to make sure that mutant amino acids of `ProteinSequence` match our expectation\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/hammerlab/isovar/42)\n<!-- Reviewable:end -->\n","created_at":"2016-09-15T22:32:52Z","updated_at":"2016-09-15T22:37:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a620f9022dba78398bb29f2e8ea415858d098e29","assignee":{"login":"ihodes","id":167803,"avatar_url":"https://avatars.githubusercontent.com/u/167803?v=3","gravatar_id":"","url":"https://api.github.com/users/ihodes","html_url":"https://github.com/ihodes","followers_url":"https://api.github.com/users/ihodes/followers","following_url":"https://api.github.com/users/ihodes/following{/other_user}","gists_url":"https://api.github.com/users/ihodes/gists{/gist_id}","starred_url":"https://api.github.com/users/ihodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ihodes/subscriptions","organizations_url":"https://api.github.com/users/ihodes/orgs","repos_url":"https://api.github.com/users/ihodes/repos","events_url":"https://api.github.com/users/ihodes/events{/privacy}","received_events_url":"https://api.github.com/users/ihodes/received_events","type":"User","site_admin":false},"assignees":[{"login":"ihodes","id":167803,"avatar_url":"https://avatars.githubusercontent.com/u/167803?v=3","gravatar_id":"","url":"https://api.github.com/users/ihodes","html_url":"https://github.com/ihodes","followers_url":"https://api.github.com/users/ihodes/followers","following_url":"https://api.github.com/users/ihodes/following{/other_user}","gists_url":"https://api.github.com/users/ihodes/gists{/gist_id}","starred_url":"https://api.github.com/users/ihodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ihodes/subscriptions","organizations_url":"https://api.github.com/users/ihodes/orgs","repos_url":"https://api.github.com/users/ihodes/repos","events_url":"https://api.github.com/users/ihodes/events{/privacy}","received_events_url":"https://api.github.com/users/ihodes/received_events","type":"User","site_admin":false},{"login":"julia326","id":3926242,"avatar_url":"https://avatars.githubusercontent.com/u/3926242?v=3","gravatar_id":"","url":"https://api.github.com/users/julia326","html_url":"https://github.com/julia326","followers_url":"https://api.github.com/users/julia326/followers","following_url":"https://api.github.com/users/julia326/following{/other_user}","gists_url":"https://api.github.com/users/julia326/gists{/gist_id}","starred_url":"https://api.github.com/users/julia326/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julia326/subscriptions","organizations_url":"https://api.github.com/users/julia326/orgs","repos_url":"https://api.github.com/users/julia326/repos","events_url":"https://api.github.com/users/julia326/events{/privacy}","received_events_url":"https://api.github.com/users/julia326/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/hammerlab/isovar/pulls/42/commits","review_comments_url":"https://api.github.com/repos/hammerlab/isovar/pulls/42/comments","review_comment_url":"https://api.github.com/repos/hammerlab/isovar/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hammerlab/isovar/issues/42/comments","statuses_url":"https://api.github.com/repos/hammerlab/isovar/statuses/e4ff894034324e06cd48c34e88811800ba965330","head":{"label":"hammerlab:compute-mutated-offset-correctly","ref":"compute-mutated-offset-correctly","sha":"e4ff894034324e06cd48c34e88811800ba965330","user":{"login":"hammerlab","id":6563873,"avatar_url":"https://avatars.githubusercontent.com/u/6563873?v=3","gravatar_id":"","url":"https://api.github.com/users/hammerlab","html_url":"https://github.com/hammerlab","followers_url":"https://api.github.com/users/hammerlab/followers","following_url":"https://api.github.com/users/hammerlab/following{/other_user}","gists_url":"https://api.github.com/users/hammerlab/gists{/gist_id}","starred_url":"https://api.github.com/users/hammerlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hammerlab/subscriptions","organizations_url":"https://api.github.com/users/hammerlab/orgs","repos_url":"https://api.github.com/users/hammerlab/repos","events_url":"https://api.github.com/users/hammerlab/events{/privacy}","received_events_url":"https://api.github.com/users/hammerlab/received_events","type":"Organization","site_admin":false},"repo":{"id":51102454,"name":"isovar","full_name":"hammerlab/isovar","owner":{"login":"hammerlab","id":6563873,"avatar_url":"https://avatars.githubusercontent.com/u/6563873?v=3","gravatar_id":"","url":"https://api.github.com/users/hammerlab","html_url":"https://github.com/hammerlab","followers_url":"https://api.github.com/users/hammerlab/followers","following_url":"https://api.github.com/users/hammerlab/following{/other_user}","gists_url":"https://api.github.com/users/hammerlab/gists{/gist_id}","starred_url":"https://api.github.com/users/hammerlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hammerlab/subscriptions","organizations_url":"https://api.github.com/users/hammerlab/orgs","repos_url":"https://api.github.com/users/hammerlab/repos","events_url":"https://api.github.com/users/hammerlab/events{/privacy}","received_events_url":"https://api.github.com/users/hammerlab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hammerlab/isovar","description":"Abundance quantification of distinct transcript sequences containing somatic variants from cancer RNAseq","fork":false,"url":"https://api.github.com/repos/hammerlab/isovar","forks_url":"https://api.github.com/repos/hammerlab/isovar/forks","keys_url":"https://api.github.com/repos/hammerlab/isovar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hammerlab/isovar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hammerlab/isovar/teams","hooks_url":"https://api.github.com/repos/hammerlab/isovar/hooks","issue_events_url":"https://api.github.com/repos/hammerlab/isovar/issues/events{/number}","events_url":"https://api.github.com/repos/hammerlab/isovar/events","assignees_url":"https://api.github.com/repos/hammerlab/isovar/assignees{/user}","branches_url":"https://api.github.com/repos/hammerlab/isovar/branches{/branch}","tags_url":"https://api.github.com/repos/hammerlab/isovar/tags","blobs_url":"https://api.github.com/repos/hammerlab/isovar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hammerlab/isovar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hammerlab/isovar/git/refs{/sha}","trees_url":"https://api.github.com/repos/hammerlab/isovar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hammerlab/isovar/statuses/{sha}","languages_url":"https://api.github.com/repos/hammerlab/isovar/languages","stargazers_url":"https://api.github.com/repos/hammerlab/isovar/stargazers","contributors_url":"https://api.github.com/repos/hammerlab/isovar/contributors","subscribers_url":"https://api.github.com/repos/hammerlab/isovar/subscribers","subscription_url":"https://api.github.com/repos/hammerlab/isovar/subscription","commits_url":"https://api.github.com/repos/hammerlab/isovar/commits{/sha}","git_commits_url":"https://api.github.com/repos/hammerlab/isovar/git/commits{/sha}","comments_url":"https://api.github.com/repos/hammerlab/isovar/comments{/number}","issue_comment_url":"https://api.github.com/repos/hammerlab/isovar/issues/comments{/number}","contents_url":"https://api.github.com/repos/hammerlab/isovar/contents/{+path}","compare_url":"https://api.github.com/repos/hammerlab/isovar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hammerlab/isovar/merges","archive_url":"https://api.github.com/repos/hammerlab/isovar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hammerlab/isovar/downloads","issues_url":"https://api.github.com/repos/hammerlab/isovar/issues{/number}","pulls_url":"https://api.github.com/repos/hammerlab/isovar/pulls{/number}","milestones_url":"https://api.github.com/repos/hammerlab/isovar/milestones{/number}","notifications_url":"https://api.github.com/repos/hammerlab/isovar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hammerlab/isovar/labels{/name}","releases_url":"https://api.github.com/repos/hammerlab/isovar/releases{/id}","deployments_url":"https://api.github.com/repos/hammerlab/isovar/deployments","created_at":"2016-02-04T20:14:48Z","updated_at":"2016-06-07T20:46:50Z","pushed_at":"2016-09-15T22:32:56Z","git_url":"git://github.com/hammerlab/isovar.git","ssh_url":"git@github.com:hammerlab/isovar.git","clone_url":"https://github.com/hammerlab/isovar.git","svn_url":"https://github.com/hammerlab/isovar","homepage":null,"size":40860,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":15,"forks":0,"open_issues":15,"watchers":2,"default_branch":"master"}},"base":{"label":"hammerlab:master","ref":"master","sha":"59dea7129091e4dbc74e118b0cc16376f02d43fe","user":{"login":"hammerlab","id":6563873,"avatar_url":"https://avatars.githubusercontent.com/u/6563873?v=3","gravatar_id":"","url":"https://api.github.com/users/hammerlab","html_url":"https://github.com/hammerlab","followers_url":"https://api.github.com/users/hammerlab/followers","following_url":"https://api.github.com/users/hammerlab/following{/other_user}","gists_url":"https://api.github.com/users/hammerlab/gists{/gist_id}","starred_url":"https://api.github.com/users/hammerlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hammerlab/subscriptions","organizations_url":"https://api.github.com/users/hammerlab/orgs","repos_url":"https://api.github.com/users/hammerlab/repos","events_url":"https://api.github.com/users/hammerlab/events{/privacy}","received_events_url":"https://api.github.com/users/hammerlab/received_events","type":"Organization","site_admin":false},"repo":{"id":51102454,"name":"isovar","full_name":"hammerlab/isovar","owner":{"login":"hammerlab","id":6563873,"avatar_url":"https://avatars.githubusercontent.com/u/6563873?v=3","gravatar_id":"","url":"https://api.github.com/users/hammerlab","html_url":"https://github.com/hammerlab","followers_url":"https://api.github.com/users/hammerlab/followers","following_url":"https://api.github.com/users/hammerlab/following{/other_user}","gists_url":"https://api.github.com/users/hammerlab/gists{/gist_id}","starred_url":"https://api.github.com/users/hammerlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hammerlab/subscriptions","organizations_url":"https://api.github.com/users/hammerlab/orgs","repos_url":"https://api.github.com/users/hammerlab/repos","events_url":"https://api.github.com/users/hammerlab/events{/privacy}","received_events_url":"https://api.github.com/users/hammerlab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hammerlab/isovar","description":"Abundance quantification of distinct transcript sequences containing somatic variants from cancer RNAseq","fork":false,"url":"https://api.github.com/repos/hammerlab/isovar","forks_url":"https://api.github.com/repos/hammerlab/isovar/forks","keys_url":"https://api.github.com/repos/hammerlab/isovar/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hammerlab/isovar/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hammerlab/isovar/teams","hooks_url":"https://api.github.com/repos/hammerlab/isovar/hooks","issue_events_url":"https://api.github.com/repos/hammerlab/isovar/issues/events{/number}","events_url":"https://api.github.com/repos/hammerlab/isovar/events","assignees_url":"https://api.github.com/repos/hammerlab/isovar/assignees{/user}","branches_url":"https://api.github.com/repos/hammerlab/isovar/branches{/branch}","tags_url":"https://api.github.com/repos/hammerlab/isovar/tags","blobs_url":"https://api.github.com/repos/hammerlab/isovar/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hammerlab/isovar/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hammerlab/isovar/git/refs{/sha}","trees_url":"https://api.github.com/repos/hammerlab/isovar/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hammerlab/isovar/statuses/{sha}","languages_url":"https://api.github.com/repos/hammerlab/isovar/languages","stargazers_url":"https://api.github.com/repos/hammerlab/isovar/stargazers","contributors_url":"https://api.github.com/repos/hammerlab/isovar/contributors","subscribers_url":"https://api.github.com/repos/hammerlab/isovar/subscribers","subscription_url":"https://api.github.com/repos/hammerlab/isovar/subscription","commits_url":"https://api.github.com/repos/hammerlab/isovar/commits{/sha}","git_commits_url":"https://api.github.com/repos/hammerlab/isovar/git/commits{/sha}","comments_url":"https://api.github.com/repos/hammerlab/isovar/comments{/number}","issue_comment_url":"https://api.github.com/repos/hammerlab/isovar/issues/comments{/number}","contents_url":"https://api.github.com/repos/hammerlab/isovar/contents/{+path}","compare_url":"https://api.github.com/repos/hammerlab/isovar/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hammerlab/isovar/merges","archive_url":"https://api.github.com/repos/hammerlab/isovar/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hammerlab/isovar/downloads","issues_url":"https://api.github.com/repos/hammerlab/isovar/issues{/number}","pulls_url":"https://api.github.com/repos/hammerlab/isovar/pulls{/number}","milestones_url":"https://api.github.com/repos/hammerlab/isovar/milestones{/number}","notifications_url":"https://api.github.com/repos/hammerlab/isovar/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hammerlab/isovar/labels{/name}","releases_url":"https://api.github.com/repos/hammerlab/isovar/releases{/id}","deployments_url":"https://api.github.com/repos/hammerlab/isovar/deployments","created_at":"2016-02-04T20:14:48Z","updated_at":"2016-06-07T20:46:50Z","pushed_at":"2016-09-15T22:32:56Z","git_url":"git://github.com/hammerlab/isovar.git","ssh_url":"git@github.com:hammerlab/isovar.git","clone_url":"https://github.com/hammerlab/isovar.git","svn_url":"https://github.com/hammerlab/isovar","homepage":null,"size":40860,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":15,"forks":0,"open_issues":15,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hammerlab/isovar/pulls/42"},"html":{"href":"https://github.com/hammerlab/isovar/pull/42"},"issue":{"href":"https://api.github.com/repos/hammerlab/isovar/issues/42"},"comments":{"href":"https://api.github.com/repos/hammerlab/isovar/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/hammerlab/isovar/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/hammerlab/isovar/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hammerlab/isovar/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/hammerlab/isovar/statuses/e4ff894034324e06cd48c34e88811800ba965330"}}}}
{"actor":{"display_login":"ihodes"}}