{"action":"created","comment":{"url":"https://api.github.com/repos/molgenis/hadoop-pipeline/pulls/comments/43871385","id":43871385,"diff_hunk":"@@ -0,0 +1,56 @@\n+package org.molgenis.hadoop.pipeline.application.processes;\n+\n+import java.io.InputStream;\n+\n+import org.apache.commons.io.IOUtils;\n+\n+import htsjdk.samtools.SAMRecord;\n+import htsjdk.samtools.SAMRecordIterator;\n+import htsjdk.samtools.SamInputResource;\n+import htsjdk.samtools.SamReader;\n+import htsjdk.samtools.SamReaderFactory;\n+import htsjdk.samtools.ValidationStringency;\n+\n+/**\n+ * Sink for digesting SAM-formatted {@link InputStream}{@code s}.\n+ */\n+public abstract class SamRecordSink extends Sink<SAMRecord>\n+{\n+\t/**\n+\t * Digests a SAM-formatted {@link InputStream}. For each {@link SAMRecord} present in the {@link InputStream},\n+\t * {@link #digestStreamItem(SAMRecord)} is called.\n+\t */\n+\t@Override\n+\tpublic void handleInputStream(InputStream inputStream)\n+\t{\n+\t\tSamReader samReader = null;\n+\t\ttry\n+\t\t{\n+\t\t\tSamReaderFactory samReaderFactory = SamReaderFactory.makeDefault()\n+\t\t\t\t\t.validationStringency(ValidationStringency.LENIENT);\n+\t\t\tsamReader = samReaderFactory.open(SamInputResource.of(inputStream));\n+\t\t\tSAMRecordIterator samIterator = samReader.iterator();\n+\t\t\twhile (samIterator.hasNext())\n+\t\t\t{\n+\t\t\t\tdigestStreamItem(samIterator.next());\n+\t\t\t}\n+\t\t}\n+\t\tfinally\n+\t\t{\n+\t\t\tIOUtils.closeQuietly(samReader);\n+\t\t}\n+\t}\n+\n+\t/**\n+\t * Digests a single {@link SAMRecord} from the {@link InputStream}. Be sure to create a custom {@code @Override}\n+\t * implementation!\n+\t * \n+\t * @param item\n+\t *            {@link SAMRecord}\n+\t */\n+\t@Override\n+\tprotected void digestStreamItem(SAMRecord item)\n+\t{\n+\t}\n+","path":"hadoop-pipeline-application/src/main/java/org/molgenis/hadoop/pipeline/application/processes/SamRecordSink.java","position":55,"original_position":55,"commit_id":"4a4a8a322e180cef79f65029c28b104d4bc57ae2","original_commit_id":"9d95c1e70b21425ad3b1d8a8231e7cc0d5a2812c","user":{"login":"erwinwinder","id":116559,"avatar_url":"https://avatars.githubusercontent.com/u/116559?v=3","gravatar_id":"","url":"https://api.github.com/users/erwinwinder","html_url":"https://github.com/erwinwinder","followers_url":"https://api.github.com/users/erwinwinder/followers","following_url":"https://api.github.com/users/erwinwinder/following{/other_user}","gists_url":"https://api.github.com/users/erwinwinder/gists{/gist_id}","starred_url":"https://api.github.com/users/erwinwinder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erwinwinder/subscriptions","organizations_url":"https://api.github.com/users/erwinwinder/orgs","repos_url":"https://api.github.com/users/erwinwinder/repos","events_url":"https://api.github.com/users/erwinwinder/events{/privacy}","received_events_url":"https://api.github.com/users/erwinwinder/received_events","type":"User","site_admin":false},"body":"Make digestStreamItem abstract, so subclasses are required to override it","created_at":"2015-11-04T11:51:53Z","updated_at":"2015-11-04T11:51:53Z","html_url":"https://github.com/molgenis/hadoop-pipeline/pull/4#discussion_r43871385","pull_request_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/molgenis/hadoop-pipeline/pulls/comments/43871385"},"html":{"href":"https://github.com/molgenis/hadoop-pipeline/pull/4#discussion_r43871385"},"pull_request":{"href":"https://api.github.com/repos/molgenis/hadoop-pipeline/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/molgenis/hadoop-pipeline/pulls/4","id":49538940,"html_url":"https://github.com/molgenis/hadoop-pipeline/pull/4","diff_url":"https://github.com/molgenis/hadoop-pipeline/pull/4.diff","patch_url":"https://github.com/molgenis/hadoop-pipeline/pull/4.patch","issue_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/issues/4","number":4,"state":"open","locked":false,"title":"New implementation process execution.","user":{"login":"svandenhoek","id":7658246,"avatar_url":"https://avatars.githubusercontent.com/u/7658246?v=3","gravatar_id":"","url":"https://api.github.com/users/svandenhoek","html_url":"https://github.com/svandenhoek","followers_url":"https://api.github.com/users/svandenhoek/followers","following_url":"https://api.github.com/users/svandenhoek/following{/other_user}","gists_url":"https://api.github.com/users/svandenhoek/gists{/gist_id}","starred_url":"https://api.github.com/users/svandenhoek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svandenhoek/subscriptions","organizations_url":"https://api.github.com/users/svandenhoek/orgs","repos_url":"https://api.github.com/users/svandenhoek/repos","events_url":"https://api.github.com/users/svandenhoek/events{/privacy}","received_events_url":"https://api.github.com/users/svandenhoek/received_events","type":"User","site_admin":false},"body":"Implemented a new process execution which allows for directly pipe-ing data between processes and allows writing process output directly to the Mapper/Reducer context without first storing it in a variable. Additional updates to other files (such as the READMEs and scripts) have been added accordingly as well. The old code is currently moved to a package called \"legacy\".","created_at":"2015-11-03T10:28:30Z","updated_at":"2015-11-04T11:51:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"097364da9638ea7cc084d7fd34b47563d8847cac","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/pulls/4/commits","review_comments_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/pulls/4/comments","review_comment_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/pulls/comments{/number}","comments_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/issues/4/comments","statuses_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/statuses/4a4a8a322e180cef79f65029c28b104d4bc57ae2","head":{"label":"svandenhoek:master","ref":"master","sha":"4a4a8a322e180cef79f65029c28b104d4bc57ae2","user":{"login":"svandenhoek","id":7658246,"avatar_url":"https://avatars.githubusercontent.com/u/7658246?v=3","gravatar_id":"","url":"https://api.github.com/users/svandenhoek","html_url":"https://github.com/svandenhoek","followers_url":"https://api.github.com/users/svandenhoek/followers","following_url":"https://api.github.com/users/svandenhoek/following{/other_user}","gists_url":"https://api.github.com/users/svandenhoek/gists{/gist_id}","starred_url":"https://api.github.com/users/svandenhoek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svandenhoek/subscriptions","organizations_url":"https://api.github.com/users/svandenhoek/orgs","repos_url":"https://api.github.com/users/svandenhoek/repos","events_url":"https://api.github.com/users/svandenhoek/events{/privacy}","received_events_url":"https://api.github.com/users/svandenhoek/received_events","type":"User","site_admin":false},"repo":{"id":42851113,"name":"hadoop-pipeline","full_name":"svandenhoek/hadoop-pipeline","owner":{"login":"svandenhoek","id":7658246,"avatar_url":"https://avatars.githubusercontent.com/u/7658246?v=3","gravatar_id":"","url":"https://api.github.com/users/svandenhoek","html_url":"https://github.com/svandenhoek","followers_url":"https://api.github.com/users/svandenhoek/followers","following_url":"https://api.github.com/users/svandenhoek/following{/other_user}","gists_url":"https://api.github.com/users/svandenhoek/gists{/gist_id}","starred_url":"https://api.github.com/users/svandenhoek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svandenhoek/subscriptions","organizations_url":"https://api.github.com/users/svandenhoek/orgs","repos_url":"https://api.github.com/users/svandenhoek/repos","events_url":"https://api.github.com/users/svandenhoek/events{/privacy}","received_events_url":"https://api.github.com/users/svandenhoek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/svandenhoek/hadoop-pipeline","description":" Implementation of a hadoop (map-reduce) Next-Generation Sequencing pipeline for fast single sample genetic diagnostics.","fork":true,"url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline","forks_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/forks","keys_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/teams","hooks_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/hooks","issue_events_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/issues/events{/number}","events_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/events","assignees_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/assignees{/user}","branches_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/branches{/branch}","tags_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/tags","blobs_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/git/refs{/sha}","trees_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/statuses/{sha}","languages_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/languages","stargazers_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/stargazers","contributors_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/contributors","subscribers_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/subscribers","subscription_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/subscription","commits_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/commits{/sha}","git_commits_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/git/commits{/sha}","comments_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/comments{/number}","issue_comment_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/issues/comments{/number}","contents_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/contents/{+path}","compare_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/merges","archive_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/downloads","issues_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/issues{/number}","pulls_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/pulls{/number}","milestones_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/milestones{/number}","notifications_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/labels{/name}","releases_url":"https://api.github.com/repos/svandenhoek/hadoop-pipeline/releases{/id}","created_at":"2015-09-21T07:34:41Z","updated_at":"2015-10-06T12:42:01Z","pushed_at":"2015-11-04T11:46:59Z","git_url":"git://github.com/svandenhoek/hadoop-pipeline.git","ssh_url":"git@github.com:svandenhoek/hadoop-pipeline.git","clone_url":"https://github.com/svandenhoek/hadoop-pipeline.git","svn_url":"https://github.com/svandenhoek/hadoop-pipeline","homepage":null,"size":40342,"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":"molgenis:master","ref":"master","sha":"938890f477223e96ed0dfe308cde1a8a4747d0b1","user":{"login":"molgenis","id":1688158,"avatar_url":"https://avatars.githubusercontent.com/u/1688158?v=3","gravatar_id":"","url":"https://api.github.com/users/molgenis","html_url":"https://github.com/molgenis","followers_url":"https://api.github.com/users/molgenis/followers","following_url":"https://api.github.com/users/molgenis/following{/other_user}","gists_url":"https://api.github.com/users/molgenis/gists{/gist_id}","starred_url":"https://api.github.com/users/molgenis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/molgenis/subscriptions","organizations_url":"https://api.github.com/users/molgenis/orgs","repos_url":"https://api.github.com/users/molgenis/repos","events_url":"https://api.github.com/users/molgenis/events{/privacy}","received_events_url":"https://api.github.com/users/molgenis/received_events","type":"Organization","site_admin":false},"repo":{"id":42850667,"name":"hadoop-pipeline","full_name":"molgenis/hadoop-pipeline","owner":{"login":"molgenis","id":1688158,"avatar_url":"https://avatars.githubusercontent.com/u/1688158?v=3","gravatar_id":"","url":"https://api.github.com/users/molgenis","html_url":"https://github.com/molgenis","followers_url":"https://api.github.com/users/molgenis/followers","following_url":"https://api.github.com/users/molgenis/following{/other_user}","gists_url":"https://api.github.com/users/molgenis/gists{/gist_id}","starred_url":"https://api.github.com/users/molgenis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/molgenis/subscriptions","organizations_url":"https://api.github.com/users/molgenis/orgs","repos_url":"https://api.github.com/users/molgenis/repos","events_url":"https://api.github.com/users/molgenis/events{/privacy}","received_events_url":"https://api.github.com/users/molgenis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/molgenis/hadoop-pipeline","description":" Implementation of a hadoop (map-reduce) Next-Generation Sequencing pipeline for fast single sample genetic diagnostics.","fork":false,"url":"https://api.github.com/repos/molgenis/hadoop-pipeline","forks_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/forks","keys_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/teams","hooks_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/hooks","issue_events_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/issues/events{/number}","events_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/events","assignees_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/assignees{/user}","branches_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/branches{/branch}","tags_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/tags","blobs_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/git/refs{/sha}","trees_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/statuses/{sha}","languages_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/languages","stargazers_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/stargazers","contributors_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/contributors","subscribers_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/subscribers","subscription_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/subscription","commits_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/commits{/sha}","git_commits_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/git/commits{/sha}","comments_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/comments{/number}","issue_comment_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/issues/comments{/number}","contents_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/contents/{+path}","compare_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/merges","archive_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/downloads","issues_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/issues{/number}","pulls_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/pulls{/number}","milestones_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/milestones{/number}","notifications_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/labels{/name}","releases_url":"https://api.github.com/repos/molgenis/hadoop-pipeline/releases{/id}","created_at":"2015-09-21T07:28:00Z","updated_at":"2015-10-15T10:49:12Z","pushed_at":"2015-11-04T11:47:00Z","git_url":"git://github.com/molgenis/hadoop-pipeline.git","ssh_url":"git@github.com:molgenis/hadoop-pipeline.git","clone_url":"https://github.com/molgenis/hadoop-pipeline.git","svn_url":"https://github.com/molgenis/hadoop-pipeline","homepage":null,"size":40375,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/molgenis/hadoop-pipeline/pulls/4"},"html":{"href":"https://github.com/molgenis/hadoop-pipeline/pull/4"},"issue":{"href":"https://api.github.com/repos/molgenis/hadoop-pipeline/issues/4"},"comments":{"href":"https://api.github.com/repos/molgenis/hadoop-pipeline/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/molgenis/hadoop-pipeline/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/molgenis/hadoop-pipeline/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/molgenis/hadoop-pipeline/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/molgenis/hadoop-pipeline/statuses/4a4a8a322e180cef79f65029c28b104d4bc57ae2"}}}}