{"action":"created","comment":{"url":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/comments/61285299","id":61285299,"diff_hunk":"@@ -53,8 +52,56 @@ object FreeBayes {\n \n   /** Somatic Defaults */\n   val DefaultMinAlternateAlleleFraction = Some(0.1.toFloat)\n+}\n+\n+/** Task to run freepayes using GNP parallel. This assumes regions are being piped into this task via a pipe chain. */\n+class FreeBayesParallel(val ref: PathToFasta,\n+                        val bam: List[PathToBam],\n+                        val somatic: Boolean,\n+                        val memory: Memory,\n+                        val minThreads: Int,\n+                        val maxThreads: Int,\n+                        val useBestNAlleles: Option[Int],\n+                        val maxCoverage: Option[Int],\n+                        val minRepeatEntropy: Option[Int],\n+                        val minAlternateAlleleFraction: Option[Float] = None)\n+  extends ProcessTask with Configuration with VariableResources with Pipe[Text,Vcf] {\n+\n+  override def args: Seq[Any] = {\n+    val buffer = ListBuffer[Any]()\n+\n+    /** Trivial method to make the adding of arguments to the list of arguments more readable below. */\n+    def applyArgs[T](arg: String, value: Option[T]): Unit = value.foreach(buffer.append(arg, _))\n+    // Runs FreeBayes on multiple regions in parallel.\n+    buffer.append(\"parallel\", \"-k\", \"-j\", s\"$numThreads\")\n+    // FreeBayes args\n+    buffer.append(configureExecutable(FreeBayesExecutableConfigKey, \"freebayes\"))\n+    buffer.append(\"-f\", ref)\n+    applyArgs(\"--use-best-n-alleles\",     useBestNAlleles)\n+    applyArgs(\"--max-coverage\",           maxCoverage)\n+    applyArgs(\"--min-repeat-entropy\",     minRepeatEntropy)\n+    applyArgs(\"--min-alternate-fraction\", minAlternateAlleleFraction)\n+    if (somatic) {\n+      buffer.append(\"--pooled-discrete\", \"--pooled-continuous\", \"--genotype-qualities\")\n+      buffer.append(\"--report-genotype-likelihood-max\", \"--allele-balance-priors-off\")\n+    }\n+    bam.foreach(b => buffer.append(\"-b\", b.toAbsolutePath))\n+    buffer.append(\"--region\", \"{}\")\n+\n+    buffer.toSeq\n+  }\n+\n+","path":"tasks/src/main/scala/dagr/tasks/vc/FreeBayes.scala","position":56,"original_position":56,"commit_id":"6164e34136b57a44a8a7ec5a0b1ae414070e8610","original_commit_id":"6164e34136b57a44a8a7ec5a0b1ae414070e8610","user":{"login":"nh13","id":846274,"avatar_url":"https://avatars.githubusercontent.com/u/846274?v=3","gravatar_id":"","url":"https://api.github.com/users/nh13","html_url":"https://github.com/nh13","followers_url":"https://api.github.com/users/nh13/followers","following_url":"https://api.github.com/users/nh13/following{/other_user}","gists_url":"https://api.github.com/users/nh13/gists{/gist_id}","starred_url":"https://api.github.com/users/nh13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nh13/subscriptions","organizations_url":"https://api.github.com/users/nh13/orgs","repos_url":"https://api.github.com/users/nh13/repos","events_url":"https://api.github.com/users/nh13/events{/privacy}","received_events_url":"https://api.github.com/users/nh13/received_events","type":"User","site_admin":false},"body":"TODO: remove","created_at":"2016-04-27T15:58:01Z","updated_at":"2016-04-27T15:58:01Z","html_url":"https://github.com/fulcrumgenomics/dagr/pull/156#discussion_r61285299","pull_request_url":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/156","_links":{"self":{"href":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/comments/61285299"},"html":{"href":"https://github.com/fulcrumgenomics/dagr/pull/156#discussion_r61285299"},"pull_request":{"href":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/156"}}},"pull_request":{"url":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/156","id":66225223,"html_url":"https://github.com/fulcrumgenomics/dagr/pull/156","diff_url":"https://github.com/fulcrumgenomics/dagr/pull/156.diff","patch_url":"https://github.com/fulcrumgenomics/dagr/pull/156.patch","issue_url":"https://api.github.com/repos/fulcrumgenomics/dagr/issues/156","number":156,"state":"open","locked":false,"title":"Improvements to FreeBayes Germline calling.","user":{"login":"nh13","id":846274,"avatar_url":"https://avatars.githubusercontent.com/u/846274?v=3","gravatar_id":"","url":"https://api.github.com/users/nh13","html_url":"https://github.com/nh13","followers_url":"https://api.github.com/users/nh13/followers","following_url":"https://api.github.com/users/nh13/following{/other_user}","gists_url":"https://api.github.com/users/nh13/gists{/gist_id}","starred_url":"https://api.github.com/users/nh13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nh13/subscriptions","organizations_url":"https://api.github.com/users/nh13/orgs","repos_url":"https://api.github.com/users/nh13/repos","events_url":"https://api.github.com/users/nh13/events{/privacy}","received_events_url":"https://api.github.com/users/nh13/received_events","type":"User","site_admin":false},"body":"Using Pipes in FilterFreeBayesCalls. This also requires a ShellCommand class that does not modify any arguments with\r\nquotes or the like.  Also updated FreeBayes filtering based on BCBIO best practices.","created_at":"2016-04-12T20:47:10Z","updated_at":"2016-04-27T15:58:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b632537fce393d0c9187ba2327296b1d5a4e18f","assignee":{"login":"tfenne","id":1609210,"avatar_url":"https://avatars.githubusercontent.com/u/1609210?v=3","gravatar_id":"","url":"https://api.github.com/users/tfenne","html_url":"https://github.com/tfenne","followers_url":"https://api.github.com/users/tfenne/followers","following_url":"https://api.github.com/users/tfenne/following{/other_user}","gists_url":"https://api.github.com/users/tfenne/gists{/gist_id}","starred_url":"https://api.github.com/users/tfenne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfenne/subscriptions","organizations_url":"https://api.github.com/users/tfenne/orgs","repos_url":"https://api.github.com/users/tfenne/repos","events_url":"https://api.github.com/users/tfenne/events{/privacy}","received_events_url":"https://api.github.com/users/tfenne/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/156/commits","review_comments_url":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/156/comments","review_comment_url":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fulcrumgenomics/dagr/issues/156/comments","statuses_url":"https://api.github.com/repos/fulcrumgenomics/dagr/statuses/6164e34136b57a44a8a7ec5a0b1ae414070e8610","head":{"label":"fulcrumgenomics:nh_freebayes_filter_fixup","ref":"nh_freebayes_filter_fixup","sha":"6164e34136b57a44a8a7ec5a0b1ae414070e8610","user":{"login":"fulcrumgenomics","id":13546013,"avatar_url":"https://avatars.githubusercontent.com/u/13546013?v=3","gravatar_id":"","url":"https://api.github.com/users/fulcrumgenomics","html_url":"https://github.com/fulcrumgenomics","followers_url":"https://api.github.com/users/fulcrumgenomics/followers","following_url":"https://api.github.com/users/fulcrumgenomics/following{/other_user}","gists_url":"https://api.github.com/users/fulcrumgenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/fulcrumgenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fulcrumgenomics/subscriptions","organizations_url":"https://api.github.com/users/fulcrumgenomics/orgs","repos_url":"https://api.github.com/users/fulcrumgenomics/repos","events_url":"https://api.github.com/users/fulcrumgenomics/events{/privacy}","received_events_url":"https://api.github.com/users/fulcrumgenomics/received_events","type":"Organization","site_admin":false},"repo":{"id":50968977,"name":"dagr","full_name":"fulcrumgenomics/dagr","owner":{"login":"fulcrumgenomics","id":13546013,"avatar_url":"https://avatars.githubusercontent.com/u/13546013?v=3","gravatar_id":"","url":"https://api.github.com/users/fulcrumgenomics","html_url":"https://github.com/fulcrumgenomics","followers_url":"https://api.github.com/users/fulcrumgenomics/followers","following_url":"https://api.github.com/users/fulcrumgenomics/following{/other_user}","gists_url":"https://api.github.com/users/fulcrumgenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/fulcrumgenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fulcrumgenomics/subscriptions","organizations_url":"https://api.github.com/users/fulcrumgenomics/orgs","repos_url":"https://api.github.com/users/fulcrumgenomics/repos","events_url":"https://api.github.com/users/fulcrumgenomics/events{/privacy}","received_events_url":"https://api.github.com/users/fulcrumgenomics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fulcrumgenomics/dagr","description":"A scala based DSL and framework for writing and executing bioinformatics pipelines as Directed Acyclic GRaphs","fork":false,"url":"https://api.github.com/repos/fulcrumgenomics/dagr","forks_url":"https://api.github.com/repos/fulcrumgenomics/dagr/forks","keys_url":"https://api.github.com/repos/fulcrumgenomics/dagr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fulcrumgenomics/dagr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fulcrumgenomics/dagr/teams","hooks_url":"https://api.github.com/repos/fulcrumgenomics/dagr/hooks","issue_events_url":"https://api.github.com/repos/fulcrumgenomics/dagr/issues/events{/number}","events_url":"https://api.github.com/repos/fulcrumgenomics/dagr/events","assignees_url":"https://api.github.com/repos/fulcrumgenomics/dagr/assignees{/user}","branches_url":"https://api.github.com/repos/fulcrumgenomics/dagr/branches{/branch}","tags_url":"https://api.github.com/repos/fulcrumgenomics/dagr/tags","blobs_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/refs{/sha}","trees_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fulcrumgenomics/dagr/statuses/{sha}","languages_url":"https://api.github.com/repos/fulcrumgenomics/dagr/languages","stargazers_url":"https://api.github.com/repos/fulcrumgenomics/dagr/stargazers","contributors_url":"https://api.github.com/repos/fulcrumgenomics/dagr/contributors","subscribers_url":"https://api.github.com/repos/fulcrumgenomics/dagr/subscribers","subscription_url":"https://api.github.com/repos/fulcrumgenomics/dagr/subscription","commits_url":"https://api.github.com/repos/fulcrumgenomics/dagr/commits{/sha}","git_commits_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/commits{/sha}","comments_url":"https://api.github.com/repos/fulcrumgenomics/dagr/comments{/number}","issue_comment_url":"https://api.github.com/repos/fulcrumgenomics/dagr/issues/comments{/number}","contents_url":"https://api.github.com/repos/fulcrumgenomics/dagr/contents/{+path}","compare_url":"https://api.github.com/repos/fulcrumgenomics/dagr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fulcrumgenomics/dagr/merges","archive_url":"https://api.github.com/repos/fulcrumgenomics/dagr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fulcrumgenomics/dagr/downloads","issues_url":"https://api.github.com/repos/fulcrumgenomics/dagr/issues{/number}","pulls_url":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls{/number}","milestones_url":"https://api.github.com/repos/fulcrumgenomics/dagr/milestones{/number}","notifications_url":"https://api.github.com/repos/fulcrumgenomics/dagr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fulcrumgenomics/dagr/labels{/name}","releases_url":"https://api.github.com/repos/fulcrumgenomics/dagr/releases{/id}","deployments_url":"https://api.github.com/repos/fulcrumgenomics/dagr/deployments","created_at":"2016-02-03T02:46:27Z","updated_at":"2016-03-21T16:24:07Z","pushed_at":"2016-04-27T15:56:23Z","git_url":"git://github.com/fulcrumgenomics/dagr.git","ssh_url":"git@github.com:fulcrumgenomics/dagr.git","clone_url":"https://github.com/fulcrumgenomics/dagr.git","svn_url":"https://github.com/fulcrumgenomics/dagr","homepage":"","size":3495,"stargazers_count":7,"watchers_count":7,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":36,"forks":1,"open_issues":36,"watchers":7,"default_branch":"master"}},"base":{"label":"fulcrumgenomics:master","ref":"master","sha":"09fe66846e2cc24ca7b93e6f3a30946f4b45b941","user":{"login":"fulcrumgenomics","id":13546013,"avatar_url":"https://avatars.githubusercontent.com/u/13546013?v=3","gravatar_id":"","url":"https://api.github.com/users/fulcrumgenomics","html_url":"https://github.com/fulcrumgenomics","followers_url":"https://api.github.com/users/fulcrumgenomics/followers","following_url":"https://api.github.com/users/fulcrumgenomics/following{/other_user}","gists_url":"https://api.github.com/users/fulcrumgenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/fulcrumgenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fulcrumgenomics/subscriptions","organizations_url":"https://api.github.com/users/fulcrumgenomics/orgs","repos_url":"https://api.github.com/users/fulcrumgenomics/repos","events_url":"https://api.github.com/users/fulcrumgenomics/events{/privacy}","received_events_url":"https://api.github.com/users/fulcrumgenomics/received_events","type":"Organization","site_admin":false},"repo":{"id":50968977,"name":"dagr","full_name":"fulcrumgenomics/dagr","owner":{"login":"fulcrumgenomics","id":13546013,"avatar_url":"https://avatars.githubusercontent.com/u/13546013?v=3","gravatar_id":"","url":"https://api.github.com/users/fulcrumgenomics","html_url":"https://github.com/fulcrumgenomics","followers_url":"https://api.github.com/users/fulcrumgenomics/followers","following_url":"https://api.github.com/users/fulcrumgenomics/following{/other_user}","gists_url":"https://api.github.com/users/fulcrumgenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/fulcrumgenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fulcrumgenomics/subscriptions","organizations_url":"https://api.github.com/users/fulcrumgenomics/orgs","repos_url":"https://api.github.com/users/fulcrumgenomics/repos","events_url":"https://api.github.com/users/fulcrumgenomics/events{/privacy}","received_events_url":"https://api.github.com/users/fulcrumgenomics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fulcrumgenomics/dagr","description":"A scala based DSL and framework for writing and executing bioinformatics pipelines as Directed Acyclic GRaphs","fork":false,"url":"https://api.github.com/repos/fulcrumgenomics/dagr","forks_url":"https://api.github.com/repos/fulcrumgenomics/dagr/forks","keys_url":"https://api.github.com/repos/fulcrumgenomics/dagr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fulcrumgenomics/dagr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fulcrumgenomics/dagr/teams","hooks_url":"https://api.github.com/repos/fulcrumgenomics/dagr/hooks","issue_events_url":"https://api.github.com/repos/fulcrumgenomics/dagr/issues/events{/number}","events_url":"https://api.github.com/repos/fulcrumgenomics/dagr/events","assignees_url":"https://api.github.com/repos/fulcrumgenomics/dagr/assignees{/user}","branches_url":"https://api.github.com/repos/fulcrumgenomics/dagr/branches{/branch}","tags_url":"https://api.github.com/repos/fulcrumgenomics/dagr/tags","blobs_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/refs{/sha}","trees_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fulcrumgenomics/dagr/statuses/{sha}","languages_url":"https://api.github.com/repos/fulcrumgenomics/dagr/languages","stargazers_url":"https://api.github.com/repos/fulcrumgenomics/dagr/stargazers","contributors_url":"https://api.github.com/repos/fulcrumgenomics/dagr/contributors","subscribers_url":"https://api.github.com/repos/fulcrumgenomics/dagr/subscribers","subscription_url":"https://api.github.com/repos/fulcrumgenomics/dagr/subscription","commits_url":"https://api.github.com/repos/fulcrumgenomics/dagr/commits{/sha}","git_commits_url":"https://api.github.com/repos/fulcrumgenomics/dagr/git/commits{/sha}","comments_url":"https://api.github.com/repos/fulcrumgenomics/dagr/comments{/number}","issue_comment_url":"https://api.github.com/repos/fulcrumgenomics/dagr/issues/comments{/number}","contents_url":"https://api.github.com/repos/fulcrumgenomics/dagr/contents/{+path}","compare_url":"https://api.github.com/repos/fulcrumgenomics/dagr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fulcrumgenomics/dagr/merges","archive_url":"https://api.github.com/repos/fulcrumgenomics/dagr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fulcrumgenomics/dagr/downloads","issues_url":"https://api.github.com/repos/fulcrumgenomics/dagr/issues{/number}","pulls_url":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls{/number}","milestones_url":"https://api.github.com/repos/fulcrumgenomics/dagr/milestones{/number}","notifications_url":"https://api.github.com/repos/fulcrumgenomics/dagr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fulcrumgenomics/dagr/labels{/name}","releases_url":"https://api.github.com/repos/fulcrumgenomics/dagr/releases{/id}","deployments_url":"https://api.github.com/repos/fulcrumgenomics/dagr/deployments","created_at":"2016-02-03T02:46:27Z","updated_at":"2016-03-21T16:24:07Z","pushed_at":"2016-04-27T15:56:23Z","git_url":"git://github.com/fulcrumgenomics/dagr.git","ssh_url":"git@github.com:fulcrumgenomics/dagr.git","clone_url":"https://github.com/fulcrumgenomics/dagr.git","svn_url":"https://github.com/fulcrumgenomics/dagr","homepage":"","size":3495,"stargazers_count":7,"watchers_count":7,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":36,"forks":1,"open_issues":36,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/156"},"html":{"href":"https://github.com/fulcrumgenomics/dagr/pull/156"},"issue":{"href":"https://api.github.com/repos/fulcrumgenomics/dagr/issues/156"},"comments":{"href":"https://api.github.com/repos/fulcrumgenomics/dagr/issues/156/comments"},"review_comments":{"href":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/156/comments"},"review_comment":{"href":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fulcrumgenomics/dagr/pulls/156/commits"},"statuses":{"href":"https://api.github.com/repos/fulcrumgenomics/dagr/statuses/6164e34136b57a44a8a7ec5a0b1ae414070e8610"}}}}