{"action":"closed","number":40,"pull_request":{"url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/pulls/40","id":69741808,"html_url":"https://github.com/AstraZeneca-NGS/VarDictJava/pull/40","diff_url":"https://github.com/AstraZeneca-NGS/VarDictJava/pull/40.diff","patch_url":"https://github.com/AstraZeneca-NGS/VarDictJava/pull/40.patch","issue_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/issues/40","number":40,"state":"closed","locked":false,"title":"When altering soft-clipping at the end of the read, don't attempt to …","user":{"login":"tfenne","id":1609210,"avatar_url":"https://avatars.githubusercontent.com/u/1609210?v=3","gravatar_id":"","url":"https://api.github.com/users/tfenne","html_url":"https://github.com/tfenne","followers_url":"https://api.github.com/users/tfenne/followers","following_url":"https://api.github.com/users/tfenne/following{/other_user}","gists_url":"https://api.github.com/users/tfenne/gists{/gist_id}","starred_url":"https://api.github.com/users/tfenne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfenne/subscriptions","organizations_url":"https://api.github.com/users/tfenne/orgs","repos_url":"https://api.github.com/users/tfenne/repos","events_url":"https://api.github.com/users/tfenne/events{/privacy}","received_events_url":"https://api.github.com/users/tfenne/received_events","type":"User","site_admin":false},"body":"…trim back the read after any soft-clipping was removed.\r\n\r\nThis is an attempt to fix [issue 38](https://github.com/AstraZeneca-NGS/VarDictJava/issues/38).  The problem appears, I think, to be the code around line 6200-6210 where VarDict is trying to adjust the soft-clipping at the end of the read.  Prior to this commit, if less than three but greater than zero soft-clipped bases matched the reference, the code would enter the `if` branch on line 6201 and bump `mch` up by one and `soft` down by one.  It does _not_ however adjust `refoff` and `rdoff`, which if they are to be used again should be adjusted in sync.  \r\n\r\nAfter this, the code would then enter the `if` branch on line 6210, which uses all four of `mch`, `soft`, `refoff` and `rdoff` and examine the read to see if it needed trimming back.  Since the variables are out of sync, when there are enough mismatches the code can go beyond `0` for `rdoff - rn - 1`, and cause the `StringIndexOutOfBoundsException`\r\n\r\nThe simplist fix is to turn the `if` into an `else if` on line 6210 since why would you trim back a `M` segment you just extended?","created_at":"2016-05-11T21:02:07Z","updated_at":"2016-05-17T17:03:06Z","closed_at":"2016-05-17T17:03:06Z","merged_at":"2016-05-17T17:03:06Z","merge_commit_sha":"d860f027d51bc60642b2449c6cdf5aedca9ac01d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/pulls/40/commits","review_comments_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/pulls/40/comments","review_comment_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/issues/40/comments","statuses_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/statuses/55c42daceb8d3486d8f579047aa2af41fe1426f0","head":{"label":"tfenne:tf_fix_indexoutofbounds","ref":"tf_fix_indexoutofbounds","sha":"55c42daceb8d3486d8f579047aa2af41fe1426f0","user":{"login":"tfenne","id":1609210,"avatar_url":"https://avatars.githubusercontent.com/u/1609210?v=3","gravatar_id":"","url":"https://api.github.com/users/tfenne","html_url":"https://github.com/tfenne","followers_url":"https://api.github.com/users/tfenne/followers","following_url":"https://api.github.com/users/tfenne/following{/other_user}","gists_url":"https://api.github.com/users/tfenne/gists{/gist_id}","starred_url":"https://api.github.com/users/tfenne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfenne/subscriptions","organizations_url":"https://api.github.com/users/tfenne/orgs","repos_url":"https://api.github.com/users/tfenne/repos","events_url":"https://api.github.com/users/tfenne/events{/privacy}","received_events_url":"https://api.github.com/users/tfenne/received_events","type":"User","site_admin":false},"repo":{"id":58578401,"name":"VarDictJava","full_name":"tfenne/VarDictJava","owner":{"login":"tfenne","id":1609210,"avatar_url":"https://avatars.githubusercontent.com/u/1609210?v=3","gravatar_id":"","url":"https://api.github.com/users/tfenne","html_url":"https://github.com/tfenne","followers_url":"https://api.github.com/users/tfenne/followers","following_url":"https://api.github.com/users/tfenne/following{/other_user}","gists_url":"https://api.github.com/users/tfenne/gists{/gist_id}","starred_url":"https://api.github.com/users/tfenne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfenne/subscriptions","organizations_url":"https://api.github.com/users/tfenne/orgs","repos_url":"https://api.github.com/users/tfenne/repos","events_url":"https://api.github.com/users/tfenne/events{/privacy}","received_events_url":"https://api.github.com/users/tfenne/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tfenne/VarDictJava","description":"VarDict Java port","fork":true,"url":"https://api.github.com/repos/tfenne/VarDictJava","forks_url":"https://api.github.com/repos/tfenne/VarDictJava/forks","keys_url":"https://api.github.com/repos/tfenne/VarDictJava/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tfenne/VarDictJava/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tfenne/VarDictJava/teams","hooks_url":"https://api.github.com/repos/tfenne/VarDictJava/hooks","issue_events_url":"https://api.github.com/repos/tfenne/VarDictJava/issues/events{/number}","events_url":"https://api.github.com/repos/tfenne/VarDictJava/events","assignees_url":"https://api.github.com/repos/tfenne/VarDictJava/assignees{/user}","branches_url":"https://api.github.com/repos/tfenne/VarDictJava/branches{/branch}","tags_url":"https://api.github.com/repos/tfenne/VarDictJava/tags","blobs_url":"https://api.github.com/repos/tfenne/VarDictJava/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tfenne/VarDictJava/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tfenne/VarDictJava/git/refs{/sha}","trees_url":"https://api.github.com/repos/tfenne/VarDictJava/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tfenne/VarDictJava/statuses/{sha}","languages_url":"https://api.github.com/repos/tfenne/VarDictJava/languages","stargazers_url":"https://api.github.com/repos/tfenne/VarDictJava/stargazers","contributors_url":"https://api.github.com/repos/tfenne/VarDictJava/contributors","subscribers_url":"https://api.github.com/repos/tfenne/VarDictJava/subscribers","subscription_url":"https://api.github.com/repos/tfenne/VarDictJava/subscription","commits_url":"https://api.github.com/repos/tfenne/VarDictJava/commits{/sha}","git_commits_url":"https://api.github.com/repos/tfenne/VarDictJava/git/commits{/sha}","comments_url":"https://api.github.com/repos/tfenne/VarDictJava/comments{/number}","issue_comment_url":"https://api.github.com/repos/tfenne/VarDictJava/issues/comments{/number}","contents_url":"https://api.github.com/repos/tfenne/VarDictJava/contents/{+path}","compare_url":"https://api.github.com/repos/tfenne/VarDictJava/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tfenne/VarDictJava/merges","archive_url":"https://api.github.com/repos/tfenne/VarDictJava/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tfenne/VarDictJava/downloads","issues_url":"https://api.github.com/repos/tfenne/VarDictJava/issues{/number}","pulls_url":"https://api.github.com/repos/tfenne/VarDictJava/pulls{/number}","milestones_url":"https://api.github.com/repos/tfenne/VarDictJava/milestones{/number}","notifications_url":"https://api.github.com/repos/tfenne/VarDictJava/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tfenne/VarDictJava/labels{/name}","releases_url":"https://api.github.com/repos/tfenne/VarDictJava/releases{/id}","deployments_url":"https://api.github.com/repos/tfenne/VarDictJava/deployments","created_at":"2016-05-11T20:26:37Z","updated_at":"2016-05-11T20:26:38Z","pushed_at":"2016-05-11T20:53:15Z","git_url":"git://github.com/tfenne/VarDictJava.git","ssh_url":"git@github.com:tfenne/VarDictJava.git","clone_url":"https://github.com/tfenne/VarDictJava.git","svn_url":"https://github.com/tfenne/VarDictJava","homepage":null,"size":11326,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"AstraZeneca-NGS:master","ref":"master","sha":"c96b0e56a00cd814120e1246a764f3e9ac655413","user":{"login":"AstraZeneca-NGS","id":7849971,"avatar_url":"https://avatars.githubusercontent.com/u/7849971?v=3","gravatar_id":"","url":"https://api.github.com/users/AstraZeneca-NGS","html_url":"https://github.com/AstraZeneca-NGS","followers_url":"https://api.github.com/users/AstraZeneca-NGS/followers","following_url":"https://api.github.com/users/AstraZeneca-NGS/following{/other_user}","gists_url":"https://api.github.com/users/AstraZeneca-NGS/gists{/gist_id}","starred_url":"https://api.github.com/users/AstraZeneca-NGS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AstraZeneca-NGS/subscriptions","organizations_url":"https://api.github.com/users/AstraZeneca-NGS/orgs","repos_url":"https://api.github.com/users/AstraZeneca-NGS/repos","events_url":"https://api.github.com/users/AstraZeneca-NGS/events{/privacy}","received_events_url":"https://api.github.com/users/AstraZeneca-NGS/received_events","type":"Organization","site_admin":false},"repo":{"id":26852732,"name":"VarDictJava","full_name":"AstraZeneca-NGS/VarDictJava","owner":{"login":"AstraZeneca-NGS","id":7849971,"avatar_url":"https://avatars.githubusercontent.com/u/7849971?v=3","gravatar_id":"","url":"https://api.github.com/users/AstraZeneca-NGS","html_url":"https://github.com/AstraZeneca-NGS","followers_url":"https://api.github.com/users/AstraZeneca-NGS/followers","following_url":"https://api.github.com/users/AstraZeneca-NGS/following{/other_user}","gists_url":"https://api.github.com/users/AstraZeneca-NGS/gists{/gist_id}","starred_url":"https://api.github.com/users/AstraZeneca-NGS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AstraZeneca-NGS/subscriptions","organizations_url":"https://api.github.com/users/AstraZeneca-NGS/orgs","repos_url":"https://api.github.com/users/AstraZeneca-NGS/repos","events_url":"https://api.github.com/users/AstraZeneca-NGS/events{/privacy}","received_events_url":"https://api.github.com/users/AstraZeneca-NGS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AstraZeneca-NGS/VarDictJava","description":"VarDict Java port","fork":false,"url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava","forks_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/forks","keys_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/teams","hooks_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/hooks","issue_events_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/issues/events{/number}","events_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/events","assignees_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/assignees{/user}","branches_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/branches{/branch}","tags_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/tags","blobs_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/git/refs{/sha}","trees_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/statuses/{sha}","languages_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/languages","stargazers_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/stargazers","contributors_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/contributors","subscribers_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/subscribers","subscription_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/subscription","commits_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/commits{/sha}","git_commits_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/git/commits{/sha}","comments_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/comments{/number}","issue_comment_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/issues/comments{/number}","contents_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/contents/{+path}","compare_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/merges","archive_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/downloads","issues_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/issues{/number}","pulls_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/pulls{/number}","milestones_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/milestones{/number}","notifications_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/labels{/name}","releases_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/releases{/id}","deployments_url":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/deployments","created_at":"2014-11-19T08:52:27Z","updated_at":"2016-05-04T14:11:50Z","pushed_at":"2016-05-17T17:03:06Z","git_url":"git://github.com/AstraZeneca-NGS/VarDictJava.git","ssh_url":"git@github.com:AstraZeneca-NGS/VarDictJava.git","clone_url":"https://github.com/AstraZeneca-NGS/VarDictJava.git","svn_url":"https://github.com/AstraZeneca-NGS/VarDictJava","homepage":null,"size":10067,"stargazers_count":12,"watchers_count":12,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":12,"forks":6,"open_issues":12,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/pulls/40"},"html":{"href":"https://github.com/AstraZeneca-NGS/VarDictJava/pull/40"},"issue":{"href":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/issues/40"},"comments":{"href":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/issues/40/comments"},"review_comments":{"href":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/pulls/40/comments"},"review_comment":{"href":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/pulls/40/commits"},"statuses":{"href":"https://api.github.com/repos/AstraZeneca-NGS/VarDictJava/statuses/55c42daceb8d3486d8f579047aa2af41fe1426f0"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"mjafin","id":3286525,"avatar_url":"https://avatars.githubusercontent.com/u/3286525?v=3","gravatar_id":"","url":"https://api.github.com/users/mjafin","html_url":"https://github.com/mjafin","followers_url":"https://api.github.com/users/mjafin/followers","following_url":"https://api.github.com/users/mjafin/following{/other_user}","gists_url":"https://api.github.com/users/mjafin/gists{/gist_id}","starred_url":"https://api.github.com/users/mjafin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjafin/subscriptions","organizations_url":"https://api.github.com/users/mjafin/orgs","repos_url":"https://api.github.com/users/mjafin/repos","events_url":"https://api.github.com/users/mjafin/events{/privacy}","received_events_url":"https://api.github.com/users/mjafin/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}