{"action":"created","comment":{"url":"https://api.github.com/repos/bigdatagenomics/adam/pulls/comments/46878636","id":46878636,"diff_hunk":"@@ -38,4 +38,36 @@ class RichGenotype(val genotype: Genotype) {\n       case _ => GenotypeType.NO_CALL\n     }\n   }\n+\n+\n+  /**\n+    * True if all observed alleles are the same (regardless of whether they are ref or alt); if any alleles are no-calls, this method will return false.\n+    */\n+  def isHom: Boolean = { isHomRef || isHomVar }\n+\n+  /**\n+    * True if all observed alleles are ref; if any alleles are no-calls, this method will return false.\n+    */\n+  def isHomRef: Boolean = { getType == GenotypeType.HOM_REF }","path":"adam-core/src/main/scala/org/bdgenomics/adam/rich/RichGenotype.scala","position":14,"original_position":14,"commit_id":"1220f662f2d2a342b28699ebbbba2f9efee8a955","original_commit_id":"45d68e8f3c0690506ccdcbc16f61c11c5693441b","user":{"login":"fnothaft","id":3752466,"avatar_url":"https://avatars.githubusercontent.com/u/3752466?v=3","gravatar_id":"","url":"https://api.github.com/users/fnothaft","html_url":"https://github.com/fnothaft","followers_url":"https://api.github.com/users/fnothaft/followers","following_url":"https://api.github.com/users/fnothaft/following{/other_user}","gists_url":"https://api.github.com/users/fnothaft/gists{/gist_id}","starred_url":"https://api.github.com/users/fnothaft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fnothaft/subscriptions","organizations_url":"https://api.github.com/users/fnothaft/orgs","repos_url":"https://api.github.com/users/fnothaft/repos","events_url":"https://api.github.com/users/fnothaft/events{/privacy}","received_events_url":"https://api.github.com/users/fnothaft/received_events","type":"User","site_admin":false},"body":"I believe it is.","created_at":"2015-12-07T21:16:34Z","updated_at":"2015-12-07T21:16:34Z","html_url":"https://github.com/bigdatagenomics/adam/pull/895#discussion_r46878636","pull_request_url":"https://api.github.com/repos/bigdatagenomics/adam/pulls/895","_links":{"self":{"href":"https://api.github.com/repos/bigdatagenomics/adam/pulls/comments/46878636"},"html":{"href":"https://github.com/bigdatagenomics/adam/pull/895#discussion_r46878636"},"pull_request":{"href":"https://api.github.com/repos/bigdatagenomics/adam/pulls/895"}}},"pull_request":{"url":"https://api.github.com/repos/bigdatagenomics/adam/pulls/895","id":52780278,"html_url":"https://github.com/bigdatagenomics/adam/pull/895","diff_url":"https://github.com/bigdatagenomics/adam/pull/895.diff","patch_url":"https://github.com/bigdatagenomics/adam/pull/895.patch","issue_url":"https://api.github.com/repos/bigdatagenomics/adam/issues/895","number":895,"state":"open","locked":false,"title":"Added is* genotype methods from HTS-JDK Genotype to RichGenotype","user":{"login":"NeillGibson","id":15608993,"avatar_url":"https://avatars.githubusercontent.com/u/15608993?v=3","gravatar_id":"","url":"https://api.github.com/users/NeillGibson","html_url":"https://github.com/NeillGibson","followers_url":"https://api.github.com/users/NeillGibson/followers","following_url":"https://api.github.com/users/NeillGibson/following{/other_user}","gists_url":"https://api.github.com/users/NeillGibson/gists{/gist_id}","starred_url":"https://api.github.com/users/NeillGibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeillGibson/subscriptions","organizations_url":"https://api.github.com/users/NeillGibson/orgs","repos_url":"https://api.github.com/users/NeillGibson/repos","events_url":"https://api.github.com/users/NeillGibson/events{/privacy}","received_events_url":"https://api.github.com/users/NeillGibson/received_events","type":"User","site_admin":false},"body":"I added the is* genotype methods from HTS-JDK Genotype to Adam RichGenotype. \r\nThis makes it easier to filter on a genotypeRDD.\r\nCompare for instance \r\n`genotypeRDD.filter(_.isHom)`\r\nto\r\n`genotypeRDD.filter(gt => (gt.getType = GenotypeType.HOM_REF) || (gt.getType = GenotypeType.HOM_ALT)  )` \r\n\r\nThese methods are copied almost exactly from from\r\nhttps://github.com/samtools/htsjdk/blob/master/src/java/htsjdk/variant/variantcontext/Genotype.java#L230\r\n\r\nI did not add `isMixed` and `isAvailable` since Adam seems to handle these Genotypes the same as GenotypeType.NO_CALL\r\n ","created_at":"2015-12-06T13:43:18Z","updated_at":"2015-12-07T21:16:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5fb6aae089b8ed669c626532b8e36a3282757d0e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bigdatagenomics/adam/pulls/895/commits","review_comments_url":"https://api.github.com/repos/bigdatagenomics/adam/pulls/895/comments","review_comment_url":"https://api.github.com/repos/bigdatagenomics/adam/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bigdatagenomics/adam/issues/895/comments","statuses_url":"https://api.github.com/repos/bigdatagenomics/adam/statuses/1220f662f2d2a342b28699ebbbba2f9efee8a955","head":{"label":"NeillGibson:master","ref":"master","sha":"1220f662f2d2a342b28699ebbbba2f9efee8a955","user":{"login":"NeillGibson","id":15608993,"avatar_url":"https://avatars.githubusercontent.com/u/15608993?v=3","gravatar_id":"","url":"https://api.github.com/users/NeillGibson","html_url":"https://github.com/NeillGibson","followers_url":"https://api.github.com/users/NeillGibson/followers","following_url":"https://api.github.com/users/NeillGibson/following{/other_user}","gists_url":"https://api.github.com/users/NeillGibson/gists{/gist_id}","starred_url":"https://api.github.com/users/NeillGibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeillGibson/subscriptions","organizations_url":"https://api.github.com/users/NeillGibson/orgs","repos_url":"https://api.github.com/users/NeillGibson/repos","events_url":"https://api.github.com/users/NeillGibson/events{/privacy}","received_events_url":"https://api.github.com/users/NeillGibson/received_events","type":"User","site_admin":false},"repo":{"id":47494012,"name":"adam","full_name":"NeillGibson/adam","owner":{"login":"NeillGibson","id":15608993,"avatar_url":"https://avatars.githubusercontent.com/u/15608993?v=3","gravatar_id":"","url":"https://api.github.com/users/NeillGibson","html_url":"https://github.com/NeillGibson","followers_url":"https://api.github.com/users/NeillGibson/followers","following_url":"https://api.github.com/users/NeillGibson/following{/other_user}","gists_url":"https://api.github.com/users/NeillGibson/gists{/gist_id}","starred_url":"https://api.github.com/users/NeillGibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeillGibson/subscriptions","organizations_url":"https://api.github.com/users/NeillGibson/orgs","repos_url":"https://api.github.com/users/NeillGibson/repos","events_url":"https://api.github.com/users/NeillGibson/events{/privacy}","received_events_url":"https://api.github.com/users/NeillGibson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NeillGibson/adam","description":"ADAM is a genomics analysis platform with specialized file formats built using Apache Avro, Apache Spark and Parquet. Apache 2 licensed.","fork":true,"url":"https://api.github.com/repos/NeillGibson/adam","forks_url":"https://api.github.com/repos/NeillGibson/adam/forks","keys_url":"https://api.github.com/repos/NeillGibson/adam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NeillGibson/adam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NeillGibson/adam/teams","hooks_url":"https://api.github.com/repos/NeillGibson/adam/hooks","issue_events_url":"https://api.github.com/repos/NeillGibson/adam/issues/events{/number}","events_url":"https://api.github.com/repos/NeillGibson/adam/events","assignees_url":"https://api.github.com/repos/NeillGibson/adam/assignees{/user}","branches_url":"https://api.github.com/repos/NeillGibson/adam/branches{/branch}","tags_url":"https://api.github.com/repos/NeillGibson/adam/tags","blobs_url":"https://api.github.com/repos/NeillGibson/adam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NeillGibson/adam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NeillGibson/adam/git/refs{/sha}","trees_url":"https://api.github.com/repos/NeillGibson/adam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NeillGibson/adam/statuses/{sha}","languages_url":"https://api.github.com/repos/NeillGibson/adam/languages","stargazers_url":"https://api.github.com/repos/NeillGibson/adam/stargazers","contributors_url":"https://api.github.com/repos/NeillGibson/adam/contributors","subscribers_url":"https://api.github.com/repos/NeillGibson/adam/subscribers","subscription_url":"https://api.github.com/repos/NeillGibson/adam/subscription","commits_url":"https://api.github.com/repos/NeillGibson/adam/commits{/sha}","git_commits_url":"https://api.github.com/repos/NeillGibson/adam/git/commits{/sha}","comments_url":"https://api.github.com/repos/NeillGibson/adam/comments{/number}","issue_comment_url":"https://api.github.com/repos/NeillGibson/adam/issues/comments{/number}","contents_url":"https://api.github.com/repos/NeillGibson/adam/contents/{+path}","compare_url":"https://api.github.com/repos/NeillGibson/adam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NeillGibson/adam/merges","archive_url":"https://api.github.com/repos/NeillGibson/adam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NeillGibson/adam/downloads","issues_url":"https://api.github.com/repos/NeillGibson/adam/issues{/number}","pulls_url":"https://api.github.com/repos/NeillGibson/adam/pulls{/number}","milestones_url":"https://api.github.com/repos/NeillGibson/adam/milestones{/number}","notifications_url":"https://api.github.com/repos/NeillGibson/adam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NeillGibson/adam/labels{/name}","releases_url":"https://api.github.com/repos/NeillGibson/adam/releases{/id}","created_at":"2015-12-06T11:27:35Z","updated_at":"2015-12-06T11:27:37Z","pushed_at":"2015-12-07T17:57:12Z","git_url":"git://github.com/NeillGibson/adam.git","ssh_url":"git@github.com:NeillGibson/adam.git","clone_url":"https://github.com/NeillGibson/adam.git","svn_url":"https://github.com/NeillGibson/adam","homepage":"http://bdgenomics.org/","size":4798,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"bigdatagenomics:master","ref":"master","sha":"8cd2a860277642cfff70e4145f2bdb8ea7ab67c0","user":{"login":"bigdatagenomics","id":5839438,"avatar_url":"https://avatars.githubusercontent.com/u/5839438?v=3","gravatar_id":"","url":"https://api.github.com/users/bigdatagenomics","html_url":"https://github.com/bigdatagenomics","followers_url":"https://api.github.com/users/bigdatagenomics/followers","following_url":"https://api.github.com/users/bigdatagenomics/following{/other_user}","gists_url":"https://api.github.com/users/bigdatagenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/bigdatagenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigdatagenomics/subscriptions","organizations_url":"https://api.github.com/users/bigdatagenomics/orgs","repos_url":"https://api.github.com/users/bigdatagenomics/repos","events_url":"https://api.github.com/users/bigdatagenomics/events{/privacy}","received_events_url":"https://api.github.com/users/bigdatagenomics/received_events","type":"Organization","site_admin":false},"repo":{"id":14541530,"name":"adam","full_name":"bigdatagenomics/adam","owner":{"login":"bigdatagenomics","id":5839438,"avatar_url":"https://avatars.githubusercontent.com/u/5839438?v=3","gravatar_id":"","url":"https://api.github.com/users/bigdatagenomics","html_url":"https://github.com/bigdatagenomics","followers_url":"https://api.github.com/users/bigdatagenomics/followers","following_url":"https://api.github.com/users/bigdatagenomics/following{/other_user}","gists_url":"https://api.github.com/users/bigdatagenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/bigdatagenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigdatagenomics/subscriptions","organizations_url":"https://api.github.com/users/bigdatagenomics/orgs","repos_url":"https://api.github.com/users/bigdatagenomics/repos","events_url":"https://api.github.com/users/bigdatagenomics/events{/privacy}","received_events_url":"https://api.github.com/users/bigdatagenomics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bigdatagenomics/adam","description":"ADAM is a genomics analysis platform with specialized file formats built using Apache Avro, Apache Spark and Parquet. Apache 2 licensed.","fork":false,"url":"https://api.github.com/repos/bigdatagenomics/adam","forks_url":"https://api.github.com/repos/bigdatagenomics/adam/forks","keys_url":"https://api.github.com/repos/bigdatagenomics/adam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bigdatagenomics/adam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bigdatagenomics/adam/teams","hooks_url":"https://api.github.com/repos/bigdatagenomics/adam/hooks","issue_events_url":"https://api.github.com/repos/bigdatagenomics/adam/issues/events{/number}","events_url":"https://api.github.com/repos/bigdatagenomics/adam/events","assignees_url":"https://api.github.com/repos/bigdatagenomics/adam/assignees{/user}","branches_url":"https://api.github.com/repos/bigdatagenomics/adam/branches{/branch}","tags_url":"https://api.github.com/repos/bigdatagenomics/adam/tags","blobs_url":"https://api.github.com/repos/bigdatagenomics/adam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bigdatagenomics/adam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bigdatagenomics/adam/git/refs{/sha}","trees_url":"https://api.github.com/repos/bigdatagenomics/adam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bigdatagenomics/adam/statuses/{sha}","languages_url":"https://api.github.com/repos/bigdatagenomics/adam/languages","stargazers_url":"https://api.github.com/repos/bigdatagenomics/adam/stargazers","contributors_url":"https://api.github.com/repos/bigdatagenomics/adam/contributors","subscribers_url":"https://api.github.com/repos/bigdatagenomics/adam/subscribers","subscription_url":"https://api.github.com/repos/bigdatagenomics/adam/subscription","commits_url":"https://api.github.com/repos/bigdatagenomics/adam/commits{/sha}","git_commits_url":"https://api.github.com/repos/bigdatagenomics/adam/git/commits{/sha}","comments_url":"https://api.github.com/repos/bigdatagenomics/adam/comments{/number}","issue_comment_url":"https://api.github.com/repos/bigdatagenomics/adam/issues/comments{/number}","contents_url":"https://api.github.com/repos/bigdatagenomics/adam/contents/{+path}","compare_url":"https://api.github.com/repos/bigdatagenomics/adam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bigdatagenomics/adam/merges","archive_url":"https://api.github.com/repos/bigdatagenomics/adam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bigdatagenomics/adam/downloads","issues_url":"https://api.github.com/repos/bigdatagenomics/adam/issues{/number}","pulls_url":"https://api.github.com/repos/bigdatagenomics/adam/pulls{/number}","milestones_url":"https://api.github.com/repos/bigdatagenomics/adam/milestones{/number}","notifications_url":"https://api.github.com/repos/bigdatagenomics/adam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bigdatagenomics/adam/labels{/name}","releases_url":"https://api.github.com/repos/bigdatagenomics/adam/releases{/id}","created_at":"2013-11-19T23:47:57Z","updated_at":"2015-12-07T00:10:38Z","pushed_at":"2015-12-07T17:57:12Z","git_url":"git://github.com/bigdatagenomics/adam.git","ssh_url":"git@github.com:bigdatagenomics/adam.git","clone_url":"https://github.com/bigdatagenomics/adam.git","svn_url":"https://github.com/bigdatagenomics/adam","homepage":"http://bdgenomics.org/","size":52504,"stargazers_count":360,"watchers_count":360,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":136,"mirror_url":null,"open_issues_count":108,"forks":136,"open_issues":108,"watchers":360,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bigdatagenomics/adam/pulls/895"},"html":{"href":"https://github.com/bigdatagenomics/adam/pull/895"},"issue":{"href":"https://api.github.com/repos/bigdatagenomics/adam/issues/895"},"comments":{"href":"https://api.github.com/repos/bigdatagenomics/adam/issues/895/comments"},"review_comments":{"href":"https://api.github.com/repos/bigdatagenomics/adam/pulls/895/comments"},"review_comment":{"href":"https://api.github.com/repos/bigdatagenomics/adam/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bigdatagenomics/adam/pulls/895/commits"},"statuses":{"href":"https://api.github.com/repos/bigdatagenomics/adam/statuses/1220f662f2d2a342b28699ebbbba2f9efee8a955"}}}}