{"action":"created","comment":{"url":"https://api.github.com/repos/broadinstitute/gatk/pulls/comments/56569492","id":56569492,"diff_hunk":"@@ -0,0 +1,115 @@\n+package org.broadinstitute.hellbender.engine;\n+\n+import htsjdk.samtools.SAMFileHeader;\n+import htsjdk.samtools.SAMReadGroupRecord;\n+import org.broadinstitute.hellbender.utils.SimpleInterval;\n+import org.broadinstitute.hellbender.utils.downsampling.DownsamplingMethod;\n+import org.broadinstitute.hellbender.utils.locusiterator.LocusIteratorByState;\n+\n+import java.util.Set;\n+import java.util.stream.Collectors;\n+import java.util.stream.StreamSupport;\n+\n+/**\n+ * A LocusWalker is a tool that processes reads that overlaps a single position in a reference at a time from\n+ * one or multiple sources of reads, with optional contextual information from a reference and/or sets of\n+ * variants/Features.\n+ *\n+ * LocusWalker authors must implement the apply() method to process each position, and may optionally implement\n+ * onTraversalStart() and/or onTraversalDone().\n+ *\n+ * @author Daniel Gómez-Sánchez (magicDGS)\n+ */\n+public abstract class LocusWalker extends GATKTool {","path":"src/main/java/org/broadinstitute/hellbender/engine/LocusWalker.java","position":23,"original_position":23,"commit_id":"0375076bc8a350061a3d2f00ed0fd11e0969385f","original_commit_id":"0375076bc8a350061a3d2f00ed0fd11e0969385f","user":{"login":"droazen","id":798637,"avatar_url":"https://avatars.githubusercontent.com/u/798637?v=3","gravatar_id":"","url":"https://api.github.com/users/droazen","html_url":"https://github.com/droazen","followers_url":"https://api.github.com/users/droazen/followers","following_url":"https://api.github.com/users/droazen/following{/other_user}","gists_url":"https://api.github.com/users/droazen/gists{/gist_id}","starred_url":"https://api.github.com/users/droazen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/droazen/subscriptions","organizations_url":"https://api.github.com/users/droazen/orgs","repos_url":"https://api.github.com/users/droazen/repos","events_url":"https://api.github.com/users/droazen/events{/privacy}","received_events_url":"https://api.github.com/users/droazen/received_events","type":"User","site_admin":false},"body":"Could you implement an `ExampleLocusWalker` class in `tools.examples`, similar to `ExampleVariantWalker`, `ExampleReadWalkerWithReference`, and `ExampleReadWalkerWithVariants`, and add an integration test for it?","created_at":"2016-03-17T20:09:53Z","updated_at":"2016-03-17T20:09:53Z","html_url":"https://github.com/broadinstitute/gatk/pull/1526#discussion_r56569492","pull_request_url":"https://api.github.com/repos/broadinstitute/gatk/pulls/1526","_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/comments/56569492"},"html":{"href":"https://github.com/broadinstitute/gatk/pull/1526#discussion_r56569492"},"pull_request":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/1526"}}},"pull_request":{"url":"https://api.github.com/repos/broadinstitute/gatk/pulls/1526","id":60839509,"html_url":"https://github.com/broadinstitute/gatk/pull/1526","diff_url":"https://github.com/broadinstitute/gatk/pull/1526.diff","patch_url":"https://github.com/broadinstitute/gatk/pull/1526.patch","issue_url":"https://api.github.com/repos/broadinstitute/gatk/issues/1526","number":1526,"state":"open","locked":false,"title":"Implemented LocusWalker","user":{"login":"magicDGS","id":7352559,"avatar_url":"https://avatars.githubusercontent.com/u/7352559?v=3","gravatar_id":"","url":"https://api.github.com/users/magicDGS","html_url":"https://github.com/magicDGS","followers_url":"https://api.github.com/users/magicDGS/followers","following_url":"https://api.github.com/users/magicDGS/following{/other_user}","gists_url":"https://api.github.com/users/magicDGS/gists{/gist_id}","starred_url":"https://api.github.com/users/magicDGS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magicDGS/subscriptions","organizations_url":"https://api.github.com/users/magicDGS/orgs","repos_url":"https://api.github.com/users/magicDGS/repos","events_url":"https://api.github.com/users/magicDGS/events{/privacy}","received_events_url":"https://api.github.com/users/magicDGS/received_events","type":"User","site_admin":false},"body":"As described in #1464, I ported a `LocusWalker` class as the GATK3 one using `LocusIteratorByState` (LIBS). The default implementation uses no downsampling (probably it should be change once #64 is addressed), includes reads with deletions  and does not track the previous reads in the LIBS.\r\n\r\nOne important think is that the `intervalsForTraversal` is not used at all, so it is up to the author discard regions out of this ones. I was thinking to check every position for overlap in any of the interval in the list, but I'm not sure if the `intervalsForTraversal` is sorted or not; and an exhaustive checking could reduce performance. I don't know if it could be possible to implement some query in LIBS, to return only the positions that overlaps some intervals, but that will be easier.","created_at":"2016-02-26T13:09:44Z","updated_at":"2016-03-17T20:09:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0a8305f7afae7a87cd1bcfda8b770075fdaec178","assignee":{"login":"droazen","id":798637,"avatar_url":"https://avatars.githubusercontent.com/u/798637?v=3","gravatar_id":"","url":"https://api.github.com/users/droazen","html_url":"https://github.com/droazen","followers_url":"https://api.github.com/users/droazen/followers","following_url":"https://api.github.com/users/droazen/following{/other_user}","gists_url":"https://api.github.com/users/droazen/gists{/gist_id}","starred_url":"https://api.github.com/users/droazen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/droazen/subscriptions","organizations_url":"https://api.github.com/users/droazen/orgs","repos_url":"https://api.github.com/users/droazen/repos","events_url":"https://api.github.com/users/droazen/events{/privacy}","received_events_url":"https://api.github.com/users/droazen/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/broadinstitute/gatk/pulls/1526/commits","review_comments_url":"https://api.github.com/repos/broadinstitute/gatk/pulls/1526/comments","review_comment_url":"https://api.github.com/repos/broadinstitute/gatk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/broadinstitute/gatk/issues/1526/comments","statuses_url":"https://api.github.com/repos/broadinstitute/gatk/statuses/0375076bc8a350061a3d2f00ed0fd11e0969385f","head":{"label":"magicDGS:dgs_locuswalker","ref":"dgs_locuswalker","sha":"0375076bc8a350061a3d2f00ed0fd11e0969385f","user":{"login":"magicDGS","id":7352559,"avatar_url":"https://avatars.githubusercontent.com/u/7352559?v=3","gravatar_id":"","url":"https://api.github.com/users/magicDGS","html_url":"https://github.com/magicDGS","followers_url":"https://api.github.com/users/magicDGS/followers","following_url":"https://api.github.com/users/magicDGS/following{/other_user}","gists_url":"https://api.github.com/users/magicDGS/gists{/gist_id}","starred_url":"https://api.github.com/users/magicDGS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magicDGS/subscriptions","organizations_url":"https://api.github.com/users/magicDGS/orgs","repos_url":"https://api.github.com/users/magicDGS/repos","events_url":"https://api.github.com/users/magicDGS/events{/privacy}","received_events_url":"https://api.github.com/users/magicDGS/received_events","type":"User","site_admin":false},"repo":{"id":52592992,"name":"gatk","full_name":"magicDGS/gatk","owner":{"login":"magicDGS","id":7352559,"avatar_url":"https://avatars.githubusercontent.com/u/7352559?v=3","gravatar_id":"","url":"https://api.github.com/users/magicDGS","html_url":"https://github.com/magicDGS","followers_url":"https://api.github.com/users/magicDGS/followers","following_url":"https://api.github.com/users/magicDGS/following{/other_user}","gists_url":"https://api.github.com/users/magicDGS/gists{/gist_id}","starred_url":"https://api.github.com/users/magicDGS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magicDGS/subscriptions","organizations_url":"https://api.github.com/users/magicDGS/orgs","repos_url":"https://api.github.com/users/magicDGS/repos","events_url":"https://api.github.com/users/magicDGS/events{/privacy}","received_events_url":"https://api.github.com/users/magicDGS/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/magicDGS/gatk","description":"GATK4 development","fork":true,"url":"https://api.github.com/repos/magicDGS/gatk","forks_url":"https://api.github.com/repos/magicDGS/gatk/forks","keys_url":"https://api.github.com/repos/magicDGS/gatk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/magicDGS/gatk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/magicDGS/gatk/teams","hooks_url":"https://api.github.com/repos/magicDGS/gatk/hooks","issue_events_url":"https://api.github.com/repos/magicDGS/gatk/issues/events{/number}","events_url":"https://api.github.com/repos/magicDGS/gatk/events","assignees_url":"https://api.github.com/repos/magicDGS/gatk/assignees{/user}","branches_url":"https://api.github.com/repos/magicDGS/gatk/branches{/branch}","tags_url":"https://api.github.com/repos/magicDGS/gatk/tags","blobs_url":"https://api.github.com/repos/magicDGS/gatk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/magicDGS/gatk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/magicDGS/gatk/git/refs{/sha}","trees_url":"https://api.github.com/repos/magicDGS/gatk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/magicDGS/gatk/statuses/{sha}","languages_url":"https://api.github.com/repos/magicDGS/gatk/languages","stargazers_url":"https://api.github.com/repos/magicDGS/gatk/stargazers","contributors_url":"https://api.github.com/repos/magicDGS/gatk/contributors","subscribers_url":"https://api.github.com/repos/magicDGS/gatk/subscribers","subscription_url":"https://api.github.com/repos/magicDGS/gatk/subscription","commits_url":"https://api.github.com/repos/magicDGS/gatk/commits{/sha}","git_commits_url":"https://api.github.com/repos/magicDGS/gatk/git/commits{/sha}","comments_url":"https://api.github.com/repos/magicDGS/gatk/comments{/number}","issue_comment_url":"https://api.github.com/repos/magicDGS/gatk/issues/comments{/number}","contents_url":"https://api.github.com/repos/magicDGS/gatk/contents/{+path}","compare_url":"https://api.github.com/repos/magicDGS/gatk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/magicDGS/gatk/merges","archive_url":"https://api.github.com/repos/magicDGS/gatk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/magicDGS/gatk/downloads","issues_url":"https://api.github.com/repos/magicDGS/gatk/issues{/number}","pulls_url":"https://api.github.com/repos/magicDGS/gatk/pulls{/number}","milestones_url":"https://api.github.com/repos/magicDGS/gatk/milestones{/number}","notifications_url":"https://api.github.com/repos/magicDGS/gatk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/magicDGS/gatk/labels{/name}","releases_url":"https://api.github.com/repos/magicDGS/gatk/releases{/id}","deployments_url":"https://api.github.com/repos/magicDGS/gatk/deployments","created_at":"2016-02-26T09:19:29Z","updated_at":"2016-02-26T09:19:36Z","pushed_at":"2016-02-26T14:48:33Z","git_url":"git://github.com/magicDGS/gatk.git","ssh_url":"git@github.com:magicDGS/gatk.git","clone_url":"https://github.com/magicDGS/gatk.git","svn_url":"https://github.com/magicDGS/gatk","homepage":"","size":39909,"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":"broadinstitute:master","ref":"master","sha":"a4a60390d1adf377955e8b78fe2cb1b43728aa80","user":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"repo":{"id":27452807,"name":"gatk","full_name":"broadinstitute/gatk","owner":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars.githubusercontent.com/u/393552?v=3","gravatar_id":"","url":"https://api.github.com/users/broadinstitute","html_url":"https://github.com/broadinstitute","followers_url":"https://api.github.com/users/broadinstitute/followers","following_url":"https://api.github.com/users/broadinstitute/following{/other_user}","gists_url":"https://api.github.com/users/broadinstitute/gists{/gist_id}","starred_url":"https://api.github.com/users/broadinstitute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/broadinstitute/subscriptions","organizations_url":"https://api.github.com/users/broadinstitute/orgs","repos_url":"https://api.github.com/users/broadinstitute/repos","events_url":"https://api.github.com/users/broadinstitute/events{/privacy}","received_events_url":"https://api.github.com/users/broadinstitute/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/broadinstitute/gatk","description":"GATK4 development","fork":false,"url":"https://api.github.com/repos/broadinstitute/gatk","forks_url":"https://api.github.com/repos/broadinstitute/gatk/forks","keys_url":"https://api.github.com/repos/broadinstitute/gatk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/gatk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/gatk/teams","hooks_url":"https://api.github.com/repos/broadinstitute/gatk/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/gatk/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/gatk/events","assignees_url":"https://api.github.com/repos/broadinstitute/gatk/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/gatk/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/gatk/tags","blobs_url":"https://api.github.com/repos/broadinstitute/gatk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/gatk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/gatk/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/gatk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/gatk/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/gatk/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/gatk/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/gatk/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/gatk/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/gatk/subscription","commits_url":"https://api.github.com/repos/broadinstitute/gatk/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/gatk/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/gatk/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/gatk/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/gatk/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/gatk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/gatk/merges","archive_url":"https://api.github.com/repos/broadinstitute/gatk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/gatk/downloads","issues_url":"https://api.github.com/repos/broadinstitute/gatk/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/gatk/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/gatk/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/gatk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/gatk/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/gatk/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/gatk/deployments","created_at":"2014-12-02T20:50:36Z","updated_at":"2016-03-13T04:55:12Z","pushed_at":"2016-03-17T19:55:53Z","git_url":"git://github.com/broadinstitute/gatk.git","ssh_url":"git@github.com:broadinstitute/gatk.git","clone_url":"https://github.com/broadinstitute/gatk.git","svn_url":"https://github.com/broadinstitute/gatk","homepage":"","size":62243,"stargazers_count":51,"watchers_count":51,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":296,"forks":21,"open_issues":296,"watchers":51,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/1526"},"html":{"href":"https://github.com/broadinstitute/gatk/pull/1526"},"issue":{"href":"https://api.github.com/repos/broadinstitute/gatk/issues/1526"},"comments":{"href":"https://api.github.com/repos/broadinstitute/gatk/issues/1526/comments"},"review_comments":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/1526/comments"},"review_comment":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/1526/commits"},"statuses":{"href":"https://api.github.com/repos/broadinstitute/gatk/statuses/0375076bc8a350061a3d2f00ed0fd11e0969385f"}}}}