{"action":"created","comment":{"url":"https://api.github.com/repos/hammerlab/topiary/pulls/comments/34827163","id":34827163,"diff_hunk":"@@ -96,12 +98,18 @@ def __init__(\n             raise ValueError(\n                 \"Epitope lengths must be positive integers, got: %s\" % (\n                     min(self.epitope_lengths),))\n-        # even if user doesn't want any padding around the mutation we need\n+        # If user doesn't provide any padding around the mutation we need\n         # to at least include enough of the surrounding non-mutated\n         # residues to construct candidate epitopes of the specified lengths\n         min_required_padding = max(self.epitope_lengths) - 1\n-        padding_around_mutation = max(\n-            padding_around_mutation, min_required_padding)\n+        if padding_around_mutation is None:\n+            padding_around_mutation = min_required_padding\n+        else:\n+            if padding_around_mutation < min_required_padding:\n+                raise ValueError(\"Padding around mutation cannot \"\n+                                 \"be less than %d for epitope lengths \"\n+                                 \"%s\" % (min_required_padding,\n+                                         self.epitope_lengths))","path":"topiary/mutant_epitope_predictor.py","position":40,"original_position":40,"commit_id":"e344d4e44698b90fae965e318a0f2c09b2913ce8","original_commit_id":"e344d4e44698b90fae965e318a0f2c09b2913ce8","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":"Is the error string missing a string formatter for the epitope lengths?","created_at":"2015-07-16T19:20:30Z","updated_at":"2015-07-16T19:20:30Z","html_url":"https://github.com/hammerlab/topiary/pull/9#discussion_r34827163","pull_request_url":"https://api.github.com/repos/hammerlab/topiary/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/hammerlab/topiary/pulls/comments/34827163"},"html":{"href":"https://github.com/hammerlab/topiary/pull/9#discussion_r34827163"},"pull_request":{"href":"https://api.github.com/repos/hammerlab/topiary/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/hammerlab/topiary/pulls/9","id":36143810,"html_url":"https://github.com/hammerlab/topiary/pull/9","diff_url":"https://github.com/hammerlab/topiary/pull/9.diff","patch_url":"https://github.com/hammerlab/topiary/pull/9.patch","issue_url":"https://api.github.com/repos/hammerlab/topiary/issues/9","number":9,"state":"open","locked":false,"title":"Update padding requirements to fix #8","user":{"login":"tavinathanson","id":322932,"avatar_url":"https://avatars.githubusercontent.com/u/322932?v=3","gravatar_id":"","url":"https://api.github.com/users/tavinathanson","html_url":"https://github.com/tavinathanson","followers_url":"https://api.github.com/users/tavinathanson/followers","following_url":"https://api.github.com/users/tavinathanson/following{/other_user}","gists_url":"https://api.github.com/users/tavinathanson/gists{/gist_id}","starred_url":"https://api.github.com/users/tavinathanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tavinathanson/subscriptions","organizations_url":"https://api.github.com/users/tavinathanson/orgs","repos_url":"https://api.github.com/users/tavinathanson/repos","events_url":"https://api.github.com/users/tavinathanson/events{/privacy}","received_events_url":"https://api.github.com/users/tavinathanson/received_events","type":"User","site_admin":false},"body":"We now raise an error if invalid padding is specified: see #8 ","created_at":"2015-05-25T14:48:05Z","updated_at":"2015-07-16T19:20:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"17b384582b0916237f569f560abd268566759ff3","assignee":{"login":"arahuja","id":455755,"avatar_url":"https://avatars.githubusercontent.com/u/455755?v=3","gravatar_id":"","url":"https://api.github.com/users/arahuja","html_url":"https://github.com/arahuja","followers_url":"https://api.github.com/users/arahuja/followers","following_url":"https://api.github.com/users/arahuja/following{/other_user}","gists_url":"https://api.github.com/users/arahuja/gists{/gist_id}","starred_url":"https://api.github.com/users/arahuja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arahuja/subscriptions","organizations_url":"https://api.github.com/users/arahuja/orgs","repos_url":"https://api.github.com/users/arahuja/repos","events_url":"https://api.github.com/users/arahuja/events{/privacy}","received_events_url":"https://api.github.com/users/arahuja/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/hammerlab/topiary/pulls/9/commits","review_comments_url":"https://api.github.com/repos/hammerlab/topiary/pulls/9/comments","review_comment_url":"https://api.github.com/repos/hammerlab/topiary/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hammerlab/topiary/issues/9/comments","statuses_url":"https://api.github.com/repos/hammerlab/topiary/statuses/e344d4e44698b90fae965e318a0f2c09b2913ce8","head":{"label":"hammerlab:chunking","ref":"chunking","sha":"e344d4e44698b90fae965e318a0f2c09b2913ce8","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":33150343,"name":"topiary","full_name":"hammerlab/topiary","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/topiary","description":"Predict mutated T-cell epitopes from sequencing data","fork":false,"url":"https://api.github.com/repos/hammerlab/topiary","forks_url":"https://api.github.com/repos/hammerlab/topiary/forks","keys_url":"https://api.github.com/repos/hammerlab/topiary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hammerlab/topiary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hammerlab/topiary/teams","hooks_url":"https://api.github.com/repos/hammerlab/topiary/hooks","issue_events_url":"https://api.github.com/repos/hammerlab/topiary/issues/events{/number}","events_url":"https://api.github.com/repos/hammerlab/topiary/events","assignees_url":"https://api.github.com/repos/hammerlab/topiary/assignees{/user}","branches_url":"https://api.github.com/repos/hammerlab/topiary/branches{/branch}","tags_url":"https://api.github.com/repos/hammerlab/topiary/tags","blobs_url":"https://api.github.com/repos/hammerlab/topiary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hammerlab/topiary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hammerlab/topiary/git/refs{/sha}","trees_url":"https://api.github.com/repos/hammerlab/topiary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hammerlab/topiary/statuses/{sha}","languages_url":"https://api.github.com/repos/hammerlab/topiary/languages","stargazers_url":"https://api.github.com/repos/hammerlab/topiary/stargazers","contributors_url":"https://api.github.com/repos/hammerlab/topiary/contributors","subscribers_url":"https://api.github.com/repos/hammerlab/topiary/subscribers","subscription_url":"https://api.github.com/repos/hammerlab/topiary/subscription","commits_url":"https://api.github.com/repos/hammerlab/topiary/commits{/sha}","git_commits_url":"https://api.github.com/repos/hammerlab/topiary/git/commits{/sha}","comments_url":"https://api.github.com/repos/hammerlab/topiary/comments{/number}","issue_comment_url":"https://api.github.com/repos/hammerlab/topiary/issues/comments{/number}","contents_url":"https://api.github.com/repos/hammerlab/topiary/contents/{+path}","compare_url":"https://api.github.com/repos/hammerlab/topiary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hammerlab/topiary/merges","archive_url":"https://api.github.com/repos/hammerlab/topiary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hammerlab/topiary/downloads","issues_url":"https://api.github.com/repos/hammerlab/topiary/issues{/number}","pulls_url":"https://api.github.com/repos/hammerlab/topiary/pulls{/number}","milestones_url":"https://api.github.com/repos/hammerlab/topiary/milestones{/number}","notifications_url":"https://api.github.com/repos/hammerlab/topiary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hammerlab/topiary/labels{/name}","releases_url":"https://api.github.com/repos/hammerlab/topiary/releases{/id}","created_at":"2015-03-30T21:53:09Z","updated_at":"2015-07-15T15:08:03Z","pushed_at":"2015-05-25T14:48:06Z","git_url":"git://github.com/hammerlab/topiary.git","ssh_url":"git@github.com:hammerlab/topiary.git","clone_url":"https://github.com/hammerlab/topiary.git","svn_url":"https://github.com/hammerlab/topiary","homepage":"","size":356,"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":9,"forks":0,"open_issues":9,"watchers":2,"default_branch":"master"}},"base":{"label":"hammerlab:master","ref":"master","sha":"79bf8e99ea977d39f647a3f80cafbfb19492fa09","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":33150343,"name":"topiary","full_name":"hammerlab/topiary","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/topiary","description":"Predict mutated T-cell epitopes from sequencing data","fork":false,"url":"https://api.github.com/repos/hammerlab/topiary","forks_url":"https://api.github.com/repos/hammerlab/topiary/forks","keys_url":"https://api.github.com/repos/hammerlab/topiary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hammerlab/topiary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hammerlab/topiary/teams","hooks_url":"https://api.github.com/repos/hammerlab/topiary/hooks","issue_events_url":"https://api.github.com/repos/hammerlab/topiary/issues/events{/number}","events_url":"https://api.github.com/repos/hammerlab/topiary/events","assignees_url":"https://api.github.com/repos/hammerlab/topiary/assignees{/user}","branches_url":"https://api.github.com/repos/hammerlab/topiary/branches{/branch}","tags_url":"https://api.github.com/repos/hammerlab/topiary/tags","blobs_url":"https://api.github.com/repos/hammerlab/topiary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hammerlab/topiary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hammerlab/topiary/git/refs{/sha}","trees_url":"https://api.github.com/repos/hammerlab/topiary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hammerlab/topiary/statuses/{sha}","languages_url":"https://api.github.com/repos/hammerlab/topiary/languages","stargazers_url":"https://api.github.com/repos/hammerlab/topiary/stargazers","contributors_url":"https://api.github.com/repos/hammerlab/topiary/contributors","subscribers_url":"https://api.github.com/repos/hammerlab/topiary/subscribers","subscription_url":"https://api.github.com/repos/hammerlab/topiary/subscription","commits_url":"https://api.github.com/repos/hammerlab/topiary/commits{/sha}","git_commits_url":"https://api.github.com/repos/hammerlab/topiary/git/commits{/sha}","comments_url":"https://api.github.com/repos/hammerlab/topiary/comments{/number}","issue_comment_url":"https://api.github.com/repos/hammerlab/topiary/issues/comments{/number}","contents_url":"https://api.github.com/repos/hammerlab/topiary/contents/{+path}","compare_url":"https://api.github.com/repos/hammerlab/topiary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hammerlab/topiary/merges","archive_url":"https://api.github.com/repos/hammerlab/topiary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hammerlab/topiary/downloads","issues_url":"https://api.github.com/repos/hammerlab/topiary/issues{/number}","pulls_url":"https://api.github.com/repos/hammerlab/topiary/pulls{/number}","milestones_url":"https://api.github.com/repos/hammerlab/topiary/milestones{/number}","notifications_url":"https://api.github.com/repos/hammerlab/topiary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hammerlab/topiary/labels{/name}","releases_url":"https://api.github.com/repos/hammerlab/topiary/releases{/id}","created_at":"2015-03-30T21:53:09Z","updated_at":"2015-07-15T15:08:03Z","pushed_at":"2015-05-25T14:48:06Z","git_url":"git://github.com/hammerlab/topiary.git","ssh_url":"git@github.com:hammerlab/topiary.git","clone_url":"https://github.com/hammerlab/topiary.git","svn_url":"https://github.com/hammerlab/topiary","homepage":"","size":356,"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":9,"forks":0,"open_issues":9,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hammerlab/topiary/pulls/9"},"html":{"href":"https://github.com/hammerlab/topiary/pull/9"},"issue":{"href":"https://api.github.com/repos/hammerlab/topiary/issues/9"},"comments":{"href":"https://api.github.com/repos/hammerlab/topiary/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/hammerlab/topiary/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/hammerlab/topiary/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hammerlab/topiary/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/hammerlab/topiary/statuses/e344d4e44698b90fae965e318a0f2c09b2913ce8"}}}}