{"action":"created","comment":{"url":"https://api.github.com/repos/broadinstitute/gatk-protected/pulls/comments/71759480","id":71759480,"diff_hunk":"@@ -0,0 +1,59 @@\n+package org.broadinstitute.hellbender.utils;\n+\n+import org.apache.commons.math3.special.Gamma;\n+import org.broadinstitute.hellbender.utils.param.ParamUtils;\n+\n+import java.util.Arrays;\n+import java.util.Collections;\n+import java.util.stream.IntStream;\n+\n+/**\n+ * The Dirichlet distribution is a distribution on multinomial distributions: if pi is a vector of positive multinomial weights\n+ * such that sum_i pi[i] = 1, the Dirichlet pdf is P(pi) = [prod_i Gamma(alpha[i]) / Gamma(sum_i alpha[i])] * prod_i pi[i]^(alpha[i] - 1)\n+ *\n+ * The vector alpha comprises the sufficient statistics for the Dirichlet distribution.\n+ *\n+ * Since the Dirichlet is the conjugate prior to the multinomial, if one has a Dirichlet prior with concentration alpha\n+ * and observes each category i n_i times (assuming categories are drawn from a multinomial distribution pi)\n+ * the posterior is alpha_i -> alpha_i + n_i\n+ *\n+ *\n+ * @author David Benjamin &lt;davidben@broadinstitute.org&gt;\n+ */\n+public class Dirichlet {","path":"src/main/java/org/broadinstitute/hellbender/utils/Dirichlet.java","position":23,"original_position":23,"commit_id":"55cc6486e76eb3f4037d0d8202a377990fc9f501","original_commit_id":"55cc6486e76eb3f4037d0d8202a377990fc9f501","user":{"login":"samuelklee","id":11076296,"avatar_url":"https://avatars.githubusercontent.com/u/11076296?v=3","gravatar_id":"","url":"https://api.github.com/users/samuelklee","html_url":"https://github.com/samuelklee","followers_url":"https://api.github.com/users/samuelklee/followers","following_url":"https://api.github.com/users/samuelklee/following{/other_user}","gists_url":"https://api.github.com/users/samuelklee/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelklee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelklee/subscriptions","organizations_url":"https://api.github.com/users/samuelklee/orgs","repos_url":"https://api.github.com/users/samuelklee/repos","events_url":"https://api.github.com/users/samuelklee/events{/privacy}","received_events_url":"https://api.github.com/users/samuelklee/received_events","type":"User","site_admin":false},"body":"i think this class could use a bit of javadoc for the constructors and non-trivial methods, and should be covered by some simple unit tests.\r\n\r\nalso, perhaps the name should be `DirichletDistribution`?  although right now there's essentially just one method, so it's a bit misleading as this doesn't implement any of the common abstract distribution interfaces.  (could refactor so the method is static, but i think it is nicer as is.)","created_at":"2016-07-21T18:22:37Z","updated_at":"2016-07-21T18:22:38Z","html_url":"https://github.com/broadinstitute/gatk-protected/pull/596#discussion_r71759480","pull_request_url":"https://api.github.com/repos/broadinstitute/gatk-protected/pulls/596","_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/gatk-protected/pulls/comments/71759480"},"html":{"href":"https://github.com/broadinstitute/gatk-protected/pull/596#discussion_r71759480"},"pull_request":{"href":"https://api.github.com/repos/broadinstitute/gatk-protected/pulls/596"}}},"pull_request":{"url":"https://api.github.com/repos/broadinstitute/gatk-protected/pulls/596","id":76012831,"html_url":"https://github.com/broadinstitute/gatk-protected/pull/596","diff_url":"https://github.com/broadinstitute/gatk-protected/pull/596.diff","patch_url":"https://github.com/broadinstitute/gatk-protected/pull/596.patch","issue_url":"https://api.github.com/repos/broadinstitute/gatk-protected/issues/596","number":596,"state":"open","locked":false,"title":"Allele fraction and copy ratio infinite  HMMs","user":{"login":"davidbenjamin","id":8438890,"avatar_url":"https://avatars.githubusercontent.com/u/8438890?v=3","gravatar_id":"","url":"https://api.github.com/users/davidbenjamin","html_url":"https://github.com/davidbenjamin","followers_url":"https://api.github.com/users/davidbenjamin/followers","following_url":"https://api.github.com/users/davidbenjamin/following{/other_user}","gists_url":"https://api.github.com/users/davidbenjamin/gists{/gist_id}","starred_url":"https://api.github.com/users/davidbenjamin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidbenjamin/subscriptions","organizations_url":"https://api.github.com/users/davidbenjamin/orgs","repos_url":"https://api.github.com/users/davidbenjamin/repos","events_url":"https://api.github.com/users/davidbenjamin/events{/privacy}","received_events_url":"https://api.github.com/users/davidbenjamin/received_events","type":"User","site_admin":false},"body":"Closes issues #210 and #547.\r\n\r\nIn addition to HMM segmentation this PR also encapsulates allelic bias parameters and function maximization.\r\n\r\nNote that this PR does not replace any part of the current workflow.  That will wait (hopefully) for combined allele fraction and copy ratio segmentation.","created_at":"2016-07-01T17:33:15Z","updated_at":"2016-07-21T18:22:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c1247a5aade7c9207efa6ab6962921a100f86b55","assignee":{"login":"samuelklee","id":11076296,"avatar_url":"https://avatars.githubusercontent.com/u/11076296?v=3","gravatar_id":"","url":"https://api.github.com/users/samuelklee","html_url":"https://github.com/samuelklee","followers_url":"https://api.github.com/users/samuelklee/followers","following_url":"https://api.github.com/users/samuelklee/following{/other_user}","gists_url":"https://api.github.com/users/samuelklee/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelklee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelklee/subscriptions","organizations_url":"https://api.github.com/users/samuelklee/orgs","repos_url":"https://api.github.com/users/samuelklee/repos","events_url":"https://api.github.com/users/samuelklee/events{/privacy}","received_events_url":"https://api.github.com/users/samuelklee/received_events","type":"User","site_admin":false},"assignees":[{"login":"samuelklee","id":11076296,"avatar_url":"https://avatars.githubusercontent.com/u/11076296?v=3","gravatar_id":"","url":"https://api.github.com/users/samuelklee","html_url":"https://github.com/samuelklee","followers_url":"https://api.github.com/users/samuelklee/followers","following_url":"https://api.github.com/users/samuelklee/following{/other_user}","gists_url":"https://api.github.com/users/samuelklee/gists{/gist_id}","starred_url":"https://api.github.com/users/samuelklee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuelklee/subscriptions","organizations_url":"https://api.github.com/users/samuelklee/orgs","repos_url":"https://api.github.com/users/samuelklee/repos","events_url":"https://api.github.com/users/samuelklee/events{/privacy}","received_events_url":"https://api.github.com/users/samuelklee/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/broadinstitute/gatk-protected/pulls/596/commits","review_comments_url":"https://api.github.com/repos/broadinstitute/gatk-protected/pulls/596/comments","review_comment_url":"https://api.github.com/repos/broadinstitute/gatk-protected/pulls/comments{/number}","comments_url":"https://api.github.com/repos/broadinstitute/gatk-protected/issues/596/comments","statuses_url":"https://api.github.com/repos/broadinstitute/gatk-protected/statuses/55cc6486e76eb3f4037d0d8202a377990fc9f501","head":{"label":"broadinstitute:db_hmm","ref":"db_hmm","sha":"55cc6486e76eb3f4037d0d8202a377990fc9f501","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":34413897,"name":"gatk-protected","full_name":"broadinstitute/gatk-protected","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-protected","description":"GATK4 development of the license-protected part of the toolkit","fork":false,"url":"https://api.github.com/repos/broadinstitute/gatk-protected","forks_url":"https://api.github.com/repos/broadinstitute/gatk-protected/forks","keys_url":"https://api.github.com/repos/broadinstitute/gatk-protected/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/gatk-protected/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/gatk-protected/teams","hooks_url":"https://api.github.com/repos/broadinstitute/gatk-protected/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/gatk-protected/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/gatk-protected/events","assignees_url":"https://api.github.com/repos/broadinstitute/gatk-protected/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/gatk-protected/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/gatk-protected/tags","blobs_url":"https://api.github.com/repos/broadinstitute/gatk-protected/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/gatk-protected/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/gatk-protected/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/gatk-protected/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/gatk-protected/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/gatk-protected/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/gatk-protected/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/gatk-protected/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/gatk-protected/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/gatk-protected/subscription","commits_url":"https://api.github.com/repos/broadinstitute/gatk-protected/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/gatk-protected/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/gatk-protected/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/gatk-protected/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/gatk-protected/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/gatk-protected/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/gatk-protected/merges","archive_url":"https://api.github.com/repos/broadinstitute/gatk-protected/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/gatk-protected/downloads","issues_url":"https://api.github.com/repos/broadinstitute/gatk-protected/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/gatk-protected/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/gatk-protected/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/gatk-protected/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/gatk-protected/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/gatk-protected/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/gatk-protected/deployments","created_at":"2015-04-22T20:24:45Z","updated_at":"2016-06-15T07:08:59Z","pushed_at":"2016-07-21T18:19:34Z","git_url":"git://github.com/broadinstitute/gatk-protected.git","ssh_url":"git@github.com:broadinstitute/gatk-protected.git","clone_url":"https://github.com/broadinstitute/gatk-protected.git","svn_url":"https://github.com/broadinstitute/gatk-protected","homepage":null,"size":104756,"stargazers_count":9,"watchers_count":9,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":129,"forks":11,"open_issues":129,"watchers":9,"default_branch":"master"}},"base":{"label":"broadinstitute:master","ref":"master","sha":"6d80f1ed621f7f2ed222353c776f3f39a643cfb6","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":34413897,"name":"gatk-protected","full_name":"broadinstitute/gatk-protected","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-protected","description":"GATK4 development of the license-protected part of the toolkit","fork":false,"url":"https://api.github.com/repos/broadinstitute/gatk-protected","forks_url":"https://api.github.com/repos/broadinstitute/gatk-protected/forks","keys_url":"https://api.github.com/repos/broadinstitute/gatk-protected/keys{/key_id}","collaborators_url":"https://api.github.com/repos/broadinstitute/gatk-protected/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/broadinstitute/gatk-protected/teams","hooks_url":"https://api.github.com/repos/broadinstitute/gatk-protected/hooks","issue_events_url":"https://api.github.com/repos/broadinstitute/gatk-protected/issues/events{/number}","events_url":"https://api.github.com/repos/broadinstitute/gatk-protected/events","assignees_url":"https://api.github.com/repos/broadinstitute/gatk-protected/assignees{/user}","branches_url":"https://api.github.com/repos/broadinstitute/gatk-protected/branches{/branch}","tags_url":"https://api.github.com/repos/broadinstitute/gatk-protected/tags","blobs_url":"https://api.github.com/repos/broadinstitute/gatk-protected/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/broadinstitute/gatk-protected/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/broadinstitute/gatk-protected/git/refs{/sha}","trees_url":"https://api.github.com/repos/broadinstitute/gatk-protected/git/trees{/sha}","statuses_url":"https://api.github.com/repos/broadinstitute/gatk-protected/statuses/{sha}","languages_url":"https://api.github.com/repos/broadinstitute/gatk-protected/languages","stargazers_url":"https://api.github.com/repos/broadinstitute/gatk-protected/stargazers","contributors_url":"https://api.github.com/repos/broadinstitute/gatk-protected/contributors","subscribers_url":"https://api.github.com/repos/broadinstitute/gatk-protected/subscribers","subscription_url":"https://api.github.com/repos/broadinstitute/gatk-protected/subscription","commits_url":"https://api.github.com/repos/broadinstitute/gatk-protected/commits{/sha}","git_commits_url":"https://api.github.com/repos/broadinstitute/gatk-protected/git/commits{/sha}","comments_url":"https://api.github.com/repos/broadinstitute/gatk-protected/comments{/number}","issue_comment_url":"https://api.github.com/repos/broadinstitute/gatk-protected/issues/comments{/number}","contents_url":"https://api.github.com/repos/broadinstitute/gatk-protected/contents/{+path}","compare_url":"https://api.github.com/repos/broadinstitute/gatk-protected/compare/{base}...{head}","merges_url":"https://api.github.com/repos/broadinstitute/gatk-protected/merges","archive_url":"https://api.github.com/repos/broadinstitute/gatk-protected/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/broadinstitute/gatk-protected/downloads","issues_url":"https://api.github.com/repos/broadinstitute/gatk-protected/issues{/number}","pulls_url":"https://api.github.com/repos/broadinstitute/gatk-protected/pulls{/number}","milestones_url":"https://api.github.com/repos/broadinstitute/gatk-protected/milestones{/number}","notifications_url":"https://api.github.com/repos/broadinstitute/gatk-protected/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/broadinstitute/gatk-protected/labels{/name}","releases_url":"https://api.github.com/repos/broadinstitute/gatk-protected/releases{/id}","deployments_url":"https://api.github.com/repos/broadinstitute/gatk-protected/deployments","created_at":"2015-04-22T20:24:45Z","updated_at":"2016-06-15T07:08:59Z","pushed_at":"2016-07-21T18:19:34Z","git_url":"git://github.com/broadinstitute/gatk-protected.git","ssh_url":"git@github.com:broadinstitute/gatk-protected.git","clone_url":"https://github.com/broadinstitute/gatk-protected.git","svn_url":"https://github.com/broadinstitute/gatk-protected","homepage":null,"size":104756,"stargazers_count":9,"watchers_count":9,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":129,"forks":11,"open_issues":129,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/broadinstitute/gatk-protected/pulls/596"},"html":{"href":"https://github.com/broadinstitute/gatk-protected/pull/596"},"issue":{"href":"https://api.github.com/repos/broadinstitute/gatk-protected/issues/596"},"comments":{"href":"https://api.github.com/repos/broadinstitute/gatk-protected/issues/596/comments"},"review_comments":{"href":"https://api.github.com/repos/broadinstitute/gatk-protected/pulls/596/comments"},"review_comment":{"href":"https://api.github.com/repos/broadinstitute/gatk-protected/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/broadinstitute/gatk-protected/pulls/596/commits"},"statuses":{"href":"https://api.github.com/repos/broadinstitute/gatk-protected/statuses/55cc6486e76eb3f4037d0d8202a377990fc9f501"}}}}
{"actor":{"display_login":"samuelklee"}}