{"action":"created","comment":{"url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/pulls/comments/57374380","id":57374380,"diff_hunk":"@@ -0,0 +1,20 @@\n+from toil_scripts.lib import partitions\n+\n+\n+def sample_batcher_job(job, func, samples, *args):\n+    \"\"\"\n+    Spawns a tree of jobs to avoid overloading the number of jobs spawned by a single parent.\n+\n+    :param function func: Function to spawn dynamically, passes one sample as first argument\n+    :param list samples: Array of samples to be batched\n+    :param list args: any arguments to be passed to the function\n+    :return:\n+    \"\"\"\n+    num_partitions = 100","path":"src/toil_scripts/lib/jobs.py","position":13,"original_position":13,"commit_id":"22388321ff963a000c2da3550f718ca921bf6b1d","original_commit_id":"973d2603e031dfbc607208cf0bdf55a69f92af4d","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":"Unless this number is a fixed constraint in toil, I would expose this as a parameter. At the very least, I'd add a comment to explain why 100 was chosen.","created_at":"2016-03-24T19:29:05Z","updated_at":"2016-03-24T19:29:05Z","html_url":"https://github.com/BD2KGenomics/toil-scripts/pull/190#discussion_r57374380","pull_request_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/pulls/190","_links":{"self":{"href":"https://api.github.com/repos/BD2KGenomics/toil-scripts/pulls/comments/57374380"},"html":{"href":"https://github.com/BD2KGenomics/toil-scripts/pull/190#discussion_r57374380"},"pull_request":{"href":"https://api.github.com/repos/BD2KGenomics/toil-scripts/pulls/190"}}},"pull_request":{"url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/pulls/190","id":63126572,"html_url":"https://github.com/BD2KGenomics/toil-scripts/pull/190","diff_url":"https://github.com/BD2KGenomics/toil-scripts/pull/190.diff","patch_url":"https://github.com/BD2KGenomics/toil-scripts/pull/190.patch","issue_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/issues/190","number":190,"state":"open","locked":false,"title":"Add common library (resolves #112)","user":{"login":"jvivian","id":7576256,"avatar_url":"https://avatars.githubusercontent.com/u/7576256?v=3","gravatar_id":"","url":"https://api.github.com/users/jvivian","html_url":"https://github.com/jvivian","followers_url":"https://api.github.com/users/jvivian/followers","following_url":"https://api.github.com/users/jvivian/following{/other_user}","gists_url":"https://api.github.com/users/jvivian/gists{/gist_id}","starred_url":"https://api.github.com/users/jvivian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvivian/subscriptions","organizations_url":"https://api.github.com/users/jvivian/orgs","repos_url":"https://api.github.com/users/jvivian/repos","events_url":"https://api.github.com/users/jvivian/events{/privacy}","received_events_url":"https://api.github.com/users/jvivian/received_events","type":"User","site_admin":false},"body":"Checked that tests pass on multiple machines.","created_at":"2016-03-16T20:00:56Z","updated_at":"2016-03-24T19:29:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"693282f78a750d1fccc96e436867c0e0b8a79927","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/pulls/190/commits","review_comments_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/pulls/190/comments","review_comment_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/issues/190/comments","statuses_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/statuses/22388321ff963a000c2da3550f718ca921bf6b1d","head":{"label":"BD2KGenomics:issues/112-common-library","ref":"issues/112-common-library","sha":"22388321ff963a000c2da3550f718ca921bf6b1d","user":{"login":"BD2KGenomics","id":8701293,"avatar_url":"https://avatars.githubusercontent.com/u/8701293?v=3","gravatar_id":"","url":"https://api.github.com/users/BD2KGenomics","html_url":"https://github.com/BD2KGenomics","followers_url":"https://api.github.com/users/BD2KGenomics/followers","following_url":"https://api.github.com/users/BD2KGenomics/following{/other_user}","gists_url":"https://api.github.com/users/BD2KGenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/BD2KGenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BD2KGenomics/subscriptions","organizations_url":"https://api.github.com/users/BD2KGenomics/orgs","repos_url":"https://api.github.com/users/BD2KGenomics/repos","events_url":"https://api.github.com/users/BD2KGenomics/events{/privacy}","received_events_url":"https://api.github.com/users/BD2KGenomics/received_events","type":"Organization","site_admin":false},"repo":{"id":39923176,"name":"toil-scripts","full_name":"BD2KGenomics/toil-scripts","owner":{"login":"BD2KGenomics","id":8701293,"avatar_url":"https://avatars.githubusercontent.com/u/8701293?v=3","gravatar_id":"","url":"https://api.github.com/users/BD2KGenomics","html_url":"https://github.com/BD2KGenomics","followers_url":"https://api.github.com/users/BD2KGenomics/followers","following_url":"https://api.github.com/users/BD2KGenomics/following{/other_user}","gists_url":"https://api.github.com/users/BD2KGenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/BD2KGenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BD2KGenomics/subscriptions","organizations_url":"https://api.github.com/users/BD2KGenomics/orgs","repos_url":"https://api.github.com/users/BD2KGenomics/repos","events_url":"https://api.github.com/users/BD2KGenomics/events{/privacy}","received_events_url":"https://api.github.com/users/BD2KGenomics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BD2KGenomics/toil-scripts","description":"A collection of scripts that use Toil to implement genomics pipelines","fork":false,"url":"https://api.github.com/repos/BD2KGenomics/toil-scripts","forks_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/forks","keys_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/teams","hooks_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/hooks","issue_events_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/issues/events{/number}","events_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/events","assignees_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/assignees{/user}","branches_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/branches{/branch}","tags_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/tags","blobs_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/git/refs{/sha}","trees_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/statuses/{sha}","languages_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/languages","stargazers_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/stargazers","contributors_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/contributors","subscribers_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/subscribers","subscription_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/subscription","commits_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/commits{/sha}","git_commits_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/git/commits{/sha}","comments_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/comments{/number}","issue_comment_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/issues/comments{/number}","contents_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/contents/{+path}","compare_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/merges","archive_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/downloads","issues_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/issues{/number}","pulls_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/pulls{/number}","milestones_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/milestones{/number}","notifications_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/labels{/name}","releases_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/releases{/id}","deployments_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/deployments","created_at":"2015-07-30T00:42:23Z","updated_at":"2016-02-03T15:09:01Z","pushed_at":"2016-03-24T18:19:24Z","git_url":"git://github.com/BD2KGenomics/toil-scripts.git","ssh_url":"git@github.com:BD2KGenomics/toil-scripts.git","clone_url":"https://github.com/BD2KGenomics/toil-scripts.git","svn_url":"https://github.com/BD2KGenomics/toil-scripts","homepage":"","size":602,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":72,"forks":7,"open_issues":72,"watchers":8,"default_branch":"master"}},"base":{"label":"BD2KGenomics:master","ref":"master","sha":"8b4f1d97d1af925c7e65b34473f7daa447b7a276","user":{"login":"BD2KGenomics","id":8701293,"avatar_url":"https://avatars.githubusercontent.com/u/8701293?v=3","gravatar_id":"","url":"https://api.github.com/users/BD2KGenomics","html_url":"https://github.com/BD2KGenomics","followers_url":"https://api.github.com/users/BD2KGenomics/followers","following_url":"https://api.github.com/users/BD2KGenomics/following{/other_user}","gists_url":"https://api.github.com/users/BD2KGenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/BD2KGenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BD2KGenomics/subscriptions","organizations_url":"https://api.github.com/users/BD2KGenomics/orgs","repos_url":"https://api.github.com/users/BD2KGenomics/repos","events_url":"https://api.github.com/users/BD2KGenomics/events{/privacy}","received_events_url":"https://api.github.com/users/BD2KGenomics/received_events","type":"Organization","site_admin":false},"repo":{"id":39923176,"name":"toil-scripts","full_name":"BD2KGenomics/toil-scripts","owner":{"login":"BD2KGenomics","id":8701293,"avatar_url":"https://avatars.githubusercontent.com/u/8701293?v=3","gravatar_id":"","url":"https://api.github.com/users/BD2KGenomics","html_url":"https://github.com/BD2KGenomics","followers_url":"https://api.github.com/users/BD2KGenomics/followers","following_url":"https://api.github.com/users/BD2KGenomics/following{/other_user}","gists_url":"https://api.github.com/users/BD2KGenomics/gists{/gist_id}","starred_url":"https://api.github.com/users/BD2KGenomics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BD2KGenomics/subscriptions","organizations_url":"https://api.github.com/users/BD2KGenomics/orgs","repos_url":"https://api.github.com/users/BD2KGenomics/repos","events_url":"https://api.github.com/users/BD2KGenomics/events{/privacy}","received_events_url":"https://api.github.com/users/BD2KGenomics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BD2KGenomics/toil-scripts","description":"A collection of scripts that use Toil to implement genomics pipelines","fork":false,"url":"https://api.github.com/repos/BD2KGenomics/toil-scripts","forks_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/forks","keys_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/teams","hooks_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/hooks","issue_events_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/issues/events{/number}","events_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/events","assignees_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/assignees{/user}","branches_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/branches{/branch}","tags_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/tags","blobs_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/git/refs{/sha}","trees_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/statuses/{sha}","languages_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/languages","stargazers_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/stargazers","contributors_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/contributors","subscribers_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/subscribers","subscription_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/subscription","commits_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/commits{/sha}","git_commits_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/git/commits{/sha}","comments_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/comments{/number}","issue_comment_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/issues/comments{/number}","contents_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/contents/{+path}","compare_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/merges","archive_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/downloads","issues_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/issues{/number}","pulls_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/pulls{/number}","milestones_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/milestones{/number}","notifications_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/labels{/name}","releases_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/releases{/id}","deployments_url":"https://api.github.com/repos/BD2KGenomics/toil-scripts/deployments","created_at":"2015-07-30T00:42:23Z","updated_at":"2016-02-03T15:09:01Z","pushed_at":"2016-03-24T18:19:24Z","git_url":"git://github.com/BD2KGenomics/toil-scripts.git","ssh_url":"git@github.com:BD2KGenomics/toil-scripts.git","clone_url":"https://github.com/BD2KGenomics/toil-scripts.git","svn_url":"https://github.com/BD2KGenomics/toil-scripts","homepage":"","size":602,"stargazers_count":8,"watchers_count":8,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":72,"forks":7,"open_issues":72,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BD2KGenomics/toil-scripts/pulls/190"},"html":{"href":"https://github.com/BD2KGenomics/toil-scripts/pull/190"},"issue":{"href":"https://api.github.com/repos/BD2KGenomics/toil-scripts/issues/190"},"comments":{"href":"https://api.github.com/repos/BD2KGenomics/toil-scripts/issues/190/comments"},"review_comments":{"href":"https://api.github.com/repos/BD2KGenomics/toil-scripts/pulls/190/comments"},"review_comment":{"href":"https://api.github.com/repos/BD2KGenomics/toil-scripts/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BD2KGenomics/toil-scripts/pulls/190/commits"},"statuses":{"href":"https://api.github.com/repos/BD2KGenomics/toil-scripts/statuses/22388321ff963a000c2da3550f718ca921bf6b1d"}}}}