{"action":"created","comment":{"url":"https://api.github.com/repos/broadinstitute/gatk/pulls/comments/146077795","pull_request_review_id":70978623,"id":146077795,"diff_hunk":"@@ -1,82 +1,60 @@\n package org.broadinstitute.hellbender.tools.spark.pathseq;\n \n import htsjdk.samtools.SAMFileHeader;\n+import htsjdk.samtools.SAMRecord;\n import htsjdk.samtools.SAMSequenceDictionary;\n import htsjdk.samtools.SAMSequenceRecord;\n+import htsjdk.samtools.fastq.FastqReader;\n+import htsjdk.samtools.fastq.FastqRecord;\n import htsjdk.samtools.util.SequenceUtil;\n-import org.apache.commons.io.IOUtils;\n-import org.apache.commons.io.LineIterator;\n import org.apache.spark.api.java.JavaRDD;\n import org.apache.spark.api.java.JavaSparkContext;\n import org.broadinstitute.hellbender.CommandLineProgramTest;\n import org.broadinstitute.hellbender.engine.spark.SparkContextFactory;\n import org.broadinstitute.hellbender.utils.bwa.BwaMemIndexCache;\n import org.broadinstitute.hellbender.utils.read.ArtificialReadUtils;\n import org.broadinstitute.hellbender.utils.read.GATKRead;\n+import org.broadinstitute.hellbender.utils.read.SAMRecordToGATKReadAdapter;\n import org.testng.Assert;\n-import org.testng.TestException;\n import org.testng.annotations.DataProvider;\n import org.testng.annotations.Test;\n import scala.Tuple2;\n \n import java.io.File;\n-import java.io.FileReader;\n-import java.io.IOException;\n import java.util.ArrayList;\n import java.util.Comparator;\n import java.util.List;\n-import java.util.stream.Collectors;\n \n public class PSFilterTest extends CommandLineProgramTest {\n \n-    private final String BWA_IMAGE_PATH = \"src/test/resources/\" + PSFilter.class.getPackage().getName().replace(\".\", \"/\") + \"/hg19mini.fasta.img\";\n-\n-    static final List<List<String>> readFastq(final File fastqFile) {\n-        try {\n-            final LineIterator itr = IOUtils.lineIterator(new FileReader(fastqFile));\n-            final List<List<String>> seqs = new ArrayList<>(100);\n-            while (itr.hasNext()) {\n-                final List<String> read = new ArrayList<>(3);\n-                String readName = itr.next();\n-                if (readName.endsWith(\"/1\") || readName.endsWith(\"/2\")) {\n-                    readName = readName.substring(0, readName.length() - 2);\n-                }\n-                read.add(readName);\n-                read.add(itr.next());\n-                itr.next();\n-                read.add(itr.next());\n-                seqs.add(read);\n-            }\n-            return seqs;\n-        } catch (IOException e) {\n-            logger.error(\"Could not open test file \" + fastqFile.getAbsolutePath(), e);\n-        }\n-        throw new TestException(\"Invalid fastq test file \" + fastqFile);\n+    private static final String BWA_IMAGE_PATH = publicTestDir + PSFilter.class.getPackage().getName().replace(\".\", \"/\") + \"/hg19mini.fasta.img\";\n+\n+    static final GATKRead fastqRecordToGATKRead(final FastqRecord rec) {","path":"src/test/java/org/broadinstitute/hellbender/tools/spark/pathseq/PSFilterTest.java","position":61,"original_position":61,"commit_id":"396dc66e2470622447256a7d8305b56a5c910e65","original_commit_id":"fa698cffae0771e2e2b7f05d93cafb5a0d86408a","user":{"login":"mwalker174","id":5686877,"avatar_url":"https://avatars2.githubusercontent.com/u/5686877?v=4","gravatar_id":"","url":"https://api.github.com/users/mwalker174","html_url":"https://github.com/mwalker174","followers_url":"https://api.github.com/users/mwalker174/followers","following_url":"https://api.github.com/users/mwalker174/following{/other_user}","gists_url":"https://api.github.com/users/mwalker174/gists{/gist_id}","starred_url":"https://api.github.com/users/mwalker174/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwalker174/subscriptions","organizations_url":"https://api.github.com/users/mwalker174/orgs","repos_url":"https://api.github.com/users/mwalker174/repos","events_url":"https://api.github.com/users/mwalker174/events{/privacy}","received_events_url":"https://api.github.com/users/mwalker174/received_events","type":"User","site_admin":false},"body":"Changed this and all below to private.","created_at":"2017-10-20T22:15:21Z","updated_at":"2017-10-20T22:15:21Z","html_url":"https://github.com/broadinstitute/gatk/pull/3611#discussion_r146077795","pull_request_url":"https://api.github.com/repos/broadinstitute/gatk/pulls/3611","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/comments/146077795"},"html":{"href":"https://github.com/broadinstitute/gatk/pull/3611#discussion_r146077795"},"pull_request":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/3611"}},"in_reply_to_id":144626881},"pull_request":{"url":"https://api.github.com/repos/broadinstitute/gatk/pulls/3611","id":142984234,"html_url":"https://github.com/broadinstitute/gatk/pull/3611","diff_url":"https://github.com/broadinstitute/gatk/pull/3611.diff","patch_url":"https://github.com/broadinstitute/gatk/pull/3611.patch","issue_url":"https://api.github.com/repos/broadinstitute/gatk/issues/3611","number":3611,"state":"open","locked":false,"title":"Read count logging for PathSeq Filter, Score, and Pipeline tools","user":{"login":"mwalker174","id":5686877,"avatar_url":"https://avatars2.githubusercontent.com/u/5686877?v=4","gravatar_id":"","url":"https://api.github.com/users/mwalker174","html_url":"https://github.com/mwalker174","followers_url":"https://api.github.com/users/mwalker174/followers","following_url":"https://api.github.com/users/mwalker174/following{/other_user}","gists_url":"https://api.github.com/users/mwalker174/gists{/gist_id}","starred_url":"https://api.github.com/users/mwalker174/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwalker174/subscriptions","organizations_url":"https://api.github.com/users/mwalker174/orgs","repos_url":"https://api.github.com/users/mwalker174/repos","events_url":"https://api.github.com/users/mwalker174/events{/privacy}","received_events_url":"https://api.github.com/users/mwalker174/received_events","type":"User","site_admin":false},"body":"Read counts at different stages of the PathSeq pipeline are now logged using `MetricsFile`. The filter metrics contains the number of reads remaining and number of reads filtered at each step (after filtering pre-aligned reads, low quality/complexity reads, host reads, and duplicates). The score metrics give number of pathogen-mapped and unmapped reads.\r\n\r\nThese metrics are now validated in the PathSeq integration tests, which have also been refactored to use DataProviders instead of separate functions.","created_at":"2017-09-25T21:05:14Z","updated_at":"2017-10-20T22:15:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c4e23e26e5ed72f830a6924fb39ecdb92b35c497","assignee":{"login":"mwalker174","id":5686877,"avatar_url":"https://avatars2.githubusercontent.com/u/5686877?v=4","gravatar_id":"","url":"https://api.github.com/users/mwalker174","html_url":"https://github.com/mwalker174","followers_url":"https://api.github.com/users/mwalker174/followers","following_url":"https://api.github.com/users/mwalker174/following{/other_user}","gists_url":"https://api.github.com/users/mwalker174/gists{/gist_id}","starred_url":"https://api.github.com/users/mwalker174/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwalker174/subscriptions","organizations_url":"https://api.github.com/users/mwalker174/orgs","repos_url":"https://api.github.com/users/mwalker174/repos","events_url":"https://api.github.com/users/mwalker174/events{/privacy}","received_events_url":"https://api.github.com/users/mwalker174/received_events","type":"User","site_admin":false},"assignees":[{"login":"mwalker174","id":5686877,"avatar_url":"https://avatars2.githubusercontent.com/u/5686877?v=4","gravatar_id":"","url":"https://api.github.com/users/mwalker174","html_url":"https://github.com/mwalker174","followers_url":"https://api.github.com/users/mwalker174/followers","following_url":"https://api.github.com/users/mwalker174/following{/other_user}","gists_url":"https://api.github.com/users/mwalker174/gists{/gist_id}","starred_url":"https://api.github.com/users/mwalker174/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwalker174/subscriptions","organizations_url":"https://api.github.com/users/mwalker174/orgs","repos_url":"https://api.github.com/users/mwalker174/repos","events_url":"https://api.github.com/users/mwalker174/events{/privacy}","received_events_url":"https://api.github.com/users/mwalker174/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/broadinstitute/gatk/pulls/3611/commits","review_comments_url":"https://api.github.com/repos/broadinstitute/gatk/pulls/3611/comments","review_comment_url":"https://api.github.com/repos/broadinstitute/gatk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/broadinstitute/gatk/issues/3611/comments","statuses_url":"https://api.github.com/repos/broadinstitute/gatk/statuses/396dc66e2470622447256a7d8305b56a5c910e65","head":{"label":"broadinstitute:mw_count","ref":"mw_count","sha":"396dc66e2470622447256a7d8305b56a5c910e65","user":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","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://avatars0.githubusercontent.com/u/393552?v=4","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":"Official code repository for GATK versions 4 and up","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":"2017-10-20T13:45:43Z","pushed_at":"2017-10-20T19:30:44Z","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":"https://software.broadinstitute.org/gatk","size":161762,"stargazers_count":247,"watchers_count":247,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":96,"mirror_url":null,"archived":false,"open_issues_count":764,"forks":96,"open_issues":764,"watchers":247,"default_branch":"master"}},"base":{"label":"broadinstitute:master","ref":"master","sha":"777b2e19051f2860eea01a56c1ca604f4186cf5a","user":{"login":"broadinstitute","id":393552,"avatar_url":"https://avatars0.githubusercontent.com/u/393552?v=4","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://avatars0.githubusercontent.com/u/393552?v=4","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":"Official code repository for GATK versions 4 and up","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":"2017-10-20T13:45:43Z","pushed_at":"2017-10-20T19:30:44Z","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":"https://software.broadinstitute.org/gatk","size":161762,"stargazers_count":247,"watchers_count":247,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":96,"mirror_url":null,"archived":false,"open_issues_count":764,"forks":96,"open_issues":764,"watchers":247,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/3611"},"html":{"href":"https://github.com/broadinstitute/gatk/pull/3611"},"issue":{"href":"https://api.github.com/repos/broadinstitute/gatk/issues/3611"},"comments":{"href":"https://api.github.com/repos/broadinstitute/gatk/issues/3611/comments"},"review_comments":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/3611/comments"},"review_comment":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/broadinstitute/gatk/pulls/3611/commits"},"statuses":{"href":"https://api.github.com/repos/broadinstitute/gatk/statuses/396dc66e2470622447256a7d8305b56a5c910e65"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mwalker174"}}