{"action":"created","comment":{"url":"https://api.github.com/repos/broadinstitute/hellbender/pulls/comments/30258670","id":30258670,"diff_hunk":"@@ -0,0 +1,62 @@\n+package org.broadinstitute.hellbender.engine.dataflow;\n+\n+import htsjdk.variant.variantcontext.VariantContext;\n+import htsjdk.variant.vcf.VCFCodec;\n+import org.broadinstitute.hellbender.engine.FeatureDataSource;\n+import org.broadinstitute.hellbender.engine.SkeletonVariant;\n+import org.broadinstitute.hellbender.engine.Variant;\n+import org.broadinstitute.hellbender.engine.VariantAdapter;\n+import org.broadinstitute.hellbender.utils.SimpleInterval;\n+import org.broadinstitute.hellbender.utils.test.BaseTest;\n+import org.testng.Assert;\n+import org.testng.annotations.Test;\n+\n+import java.io.File;\n+import java.util.*;\n+\n+\n+public class VariantTest extends BaseTest {\n+    private static final String FEATURE_DATA_SOURCE_TEST_DIRECTORY = publicTestDir + \"org/broadinstitute/hellbender/engine/\";\n+    private static final File QUERY_TEST_VCF = new File(FEATURE_DATA_SOURCE_TEST_DIRECTORY + \"feature_data_source_test.vcf\");\n+\n+    @Test\n+    public void testVariantAdapter() {\n+        // The test suite for reading in VCF files is FeatureDataSourceUnitTest.\n+        FeatureDataSource<VariantContext> featureSource = new FeatureDataSource<>(QUERY_TEST_VCF, new VCFCodec());\n+        List<Variant> variantList = new ArrayList<>();\n+        for (VariantContext feature : featureSource) {\n+            VariantAdapter va = VariantAdapter.of(feature);\n+            variantList.add(va);\n+        }\n+        checkVariants(variantList);\n+        featureSource.close();\n+    }\n+\n+    private void checkVariants(final List<Variant> variantList) {\n+        Set<Variant> variantSet = new HashSet<>();\n+        variantSet.add(new SkeletonVariant(new SimpleInterval(\"\", 99, 99), true));\n+        variantSet.add(new SkeletonVariant(new SimpleInterval(\"\", 198, 199), false));\n+        variantSet.add(new SkeletonVariant(new SimpleInterval(\"\", 199, 199), true));\n+        variantSet.add(new SkeletonVariant(new SimpleInterval(\"\", 202, 205), false));\n+        variantSet.add(new SkeletonVariant(new SimpleInterval(\"\", 279, 279), true));\n+        variantSet.add(new SkeletonVariant(new SimpleInterval(\"\", 283, 285), false));\n+        variantSet.add(new SkeletonVariant(new SimpleInterval(\"\", 284, 284), true));\n+        variantSet.add(new SkeletonVariant(new SimpleInterval(\"\", 285, 285), true));\n+        variantSet.add(new SkeletonVariant(new SimpleInterval(\"\", 998, 998), true));\n+        variantSet.add(new SkeletonVariant(new SimpleInterval(\"\", 999, 999), true));\n+        variantSet.add(new SkeletonVariant(new SimpleInterval(\"\", 999, 1002), false));\n+        variantSet.add(new SkeletonVariant(new SimpleInterval(\"\", 1075, 1075), true));","path":"src/test/java/org/broadinstitute/hellbender/engine/dataflow/VariantTest.java","position":48,"original_position":48,"commit_id":"c876d7f6e9734ca67c44c0b491dbb31d3a068adc","original_commit_id":"c876d7f6e9734ca67c44c0b491dbb31d3a068adc","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":"Move the known set to a TestNG DataProvider (see other hellbender test classes for examples)","created_at":"2015-05-13T18:11:26Z","updated_at":"2015-05-13T18:11:26Z","html_url":"https://github.com/broadinstitute/hellbender/pull/519#discussion_r30258670","pull_request_url":"https://api.github.com/repos/broadinstitute/hellbender/pulls/519","_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/hellbender/pulls/comments/30258670"},"html":{"href":"https://github.com/broadinstitute/hellbender/pull/519#discussion_r30258670"},"pull_request":{"href":"https://api.github.com/repos/broadinstitute/hellbender/pulls/519"}}},"pull_request":{"url":"https://api.github.com/repos/broadinstitute/hellbender/pulls/519","id":35341002,"html_url":"https://github.com/broadinstitute/hellbender/pull/519","diff_url":"https://github.com/broadinstitute/hellbender/pull/519.diff","patch_url":"https://github.com/broadinstitute/hellbender/pull/519.patch","issue_url":"https://api.github.com/repos/broadinstitute/hellbender/issues/519","number":519,"state":"open","locked":false,"title":"Variants interface, two implementations, and a test","user":{"login":"davidadamsphd","id":12084283,"avatar_url":"https://avatars.githubusercontent.com/u/12084283?v=3","gravatar_id":"","url":"https://api.github.com/users/davidadamsphd","html_url":"https://github.com/davidadamsphd","followers_url":"https://api.github.com/users/davidadamsphd/followers","following_url":"https://api.github.com/users/davidadamsphd/following{/other_user}","gists_url":"https://api.github.com/users/davidadamsphd/gists{/gist_id}","starred_url":"https://api.github.com/users/davidadamsphd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidadamsphd/subscriptions","organizations_url":"https://api.github.com/users/davidadamsphd/orgs","repos_url":"https://api.github.com/users/davidadamsphd/repos","events_url":"https://api.github.com/users/davidadamsphd/events{/privacy}","received_events_url":"https://api.github.com/users/davidadamsphd/received_events","type":"User","site_admin":false},"body":"We need a interface for variants that can be backed by the Google variant as well as VariantContext (from htsjdk). At first, we only need interval and isSNP/isIndel, so that's the interface right now. This shouldn't impact clients much as the interface interface grows because it will initially only be filled by Hellbender code. ","created_at":"2015-05-13T15:46:38Z","updated_at":"2015-05-13T18:11:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3000933a3e12054ac79dfd4f0be9f56e5ce8efcc","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/hellbender/pulls/519/commits","review_comments_url":"https://api.github.com/repos/broadinstitute/hellbender/pulls/519/comments","review_comment_url":"https://api.github.com/repos/broadinstitute/hellbender/pulls/comments{/number}","comments_url":"https://api.github.com/repos/broadinstitute/hellbender/issues/519/comments","statuses_url":"https://api.github.com/repos/broadinstitute/hellbender/statuses/c876d7f6e9734ca67c44c0b491dbb31d3a068adc","head":{"label":"broadinstitute:da_variant_start","ref":"da_variant_start","sha":"c876d7f6e9734ca67c44c0b491dbb31d3a068adc","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":"hellbender","full_name":"broadinstitute/hellbender","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/hellbender","description":"GATK4 development","fork":false,"url":"https://api.github.com/repos/broadinstitute/hellbender","forks_url":"https://api.github.com/repos/broadinstitute/hellbender/forks","keys_url":"https://api.github.com/repos/broadinstitute/hellbender/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/hellbender/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/hellbender/teams","hooks_url":"https://api.github.com/repos/broadinstitute/hellbender/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/hellbender/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/hellbender/events","assignees_url":"https://api.github.com/repos/broadinstitute/hellbender/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/hellbender/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/hellbender/tags","blobs_url":"https://api.github.com/repos/broadinstitute/hellbender/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/hellbender/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/hellbender/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/hellbender/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/hellbender/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/hellbender/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/hellbender/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/hellbender/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/hellbender/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/hellbender/subscription","commits_url":"https://api.github.com/repos/broadinstitute/hellbender/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/hellbender/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/hellbender/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/hellbender/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/hellbender/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/hellbender/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/hellbender/merges","archive_url":"https://api.github.com/repos/broadinstitute/hellbender/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/hellbender/downloads","issues_url":"https://api.github.com/repos/broadinstitute/hellbender/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/hellbender/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/hellbender/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/hellbender/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/hellbender/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/hellbender/releases{/id}","created_at":"2014-12-02T20:50:36Z","updated_at":"2015-05-07T21:01:39Z","pushed_at":"2015-05-13T18:06:33Z","git_url":"git://github.com/broadinstitute/hellbender.git","ssh_url":"git@github.com:broadinstitute/hellbender.git","clone_url":"https://github.com/broadinstitute/hellbender.git","svn_url":"https://github.com/broadinstitute/hellbender","homepage":"","size":30199,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":190,"forks":2,"open_issues":190,"watchers":6,"default_branch":"master"}},"base":{"label":"broadinstitute:master","ref":"master","sha":"6f1ba7a70dddd67174373aa0ea4afc896ac473e7","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":"hellbender","full_name":"broadinstitute/hellbender","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/hellbender","description":"GATK4 development","fork":false,"url":"https://api.github.com/repos/broadinstitute/hellbender","forks_url":"https://api.github.com/repos/broadinstitute/hellbender/forks","keys_url":"https://api.github.com/repos/broadinstitute/hellbender/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/hellbender/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/hellbender/teams","hooks_url":"https://api.github.com/repos/broadinstitute/hellbender/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/hellbender/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/hellbender/events","assignees_url":"https://api.github.com/repos/broadinstitute/hellbender/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/hellbender/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/hellbender/tags","blobs_url":"https://api.github.com/repos/broadinstitute/hellbender/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/hellbender/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/hellbender/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/hellbender/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/hellbender/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/hellbender/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/hellbender/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/hellbender/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/hellbender/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/hellbender/subscription","commits_url":"https://api.github.com/repos/broadinstitute/hellbender/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/hellbender/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/hellbender/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/hellbender/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/hellbender/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/hellbender/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/hellbender/merges","archive_url":"https://api.github.com/repos/broadinstitute/hellbender/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/hellbender/downloads","issues_url":"https://api.github.com/repos/broadinstitute/hellbender/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/hellbender/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/hellbender/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/hellbender/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/hellbender/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/hellbender/releases{/id}","created_at":"2014-12-02T20:50:36Z","updated_at":"2015-05-07T21:01:39Z","pushed_at":"2015-05-13T18:06:33Z","git_url":"git://github.com/broadinstitute/hellbender.git","ssh_url":"git@github.com:broadinstitute/hellbender.git","clone_url":"https://github.com/broadinstitute/hellbender.git","svn_url":"https://github.com/broadinstitute/hellbender","homepage":"","size":30199,"stargazers_count":6,"watchers_count":6,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":190,"forks":2,"open_issues":190,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/hellbender/pulls/519"},"html":{"href":"https://github.com/broadinstitute/hellbender/pull/519"},"issue":{"href":"https://api.github.com/repos/broadinstitute/hellbender/issues/519"},"comments":{"href":"https://api.github.com/repos/broadinstitute/hellbender/issues/519/comments"},"review_comments":{"href":"https://api.github.com/repos/broadinstitute/hellbender/pulls/519/comments"},"review_comment":{"href":"https://api.github.com/repos/broadinstitute/hellbender/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/broadinstitute/hellbender/pulls/519/commits"},"statuses":{"href":"https://api.github.com/repos/broadinstitute/hellbender/statuses/c876d7f6e9734ca67c44c0b491dbb31d3a068adc"}}}}