{"action":"created","comment":{"url":"https://api.github.com/repos/biocore/deblur/pulls/comments/68757191","id":68757191,"diff_hunk":"@@ -0,0 +1,159 @@\n+# ----------------------------------------------------------------------------\n+# Copyright (c) 2015, The Deblur Development Team.\n+#\n+# Distributed under the terms of the BSD 3-clause License.\n+#\n+# The full license is in the file LICENSE, distributed with this software.\n+# ----------------------------------------------------------------------------\n+from __future__ import division\n+import os\n+from os.path import join\n+from tempfile import mkdtemp\n+import multiprocessing as mp\n+import traceback\n+import sys\n+import subprocess\n+from functools import partial\n+\n+\n+def deblur_system_call(params, fps):\n+    \"\"\"Build deblur command for subprocess.\n+\n+    Parameters\n+    ----------\n+    params: dict\n+        parameter settings to pass to deblur\n+    fps: tuple\n+        input and output paths\n+\n+    Returns\n+    -------\n+    stdout: string\n+        process output directed to standard output\n+    stderr: string\n+        process output directed to standard error\n+    return_value: integer\n+        return code from process\n+\n+    \"\"\"\n+    input_fp, output_dp = fps\n+    script_name = \"deblur\"\n+    script_subprogram = \"workflow_parallel\"\n+    # construct command\n+    command = [script_name,\n+               script_subprogram,\n+               '--seqs-fp', input_fp,\n+               '--output-dir', output_dp]\n+    # add reference databases to command\n+    ref_fp_l = [db[1] for db in enumerate(params.get('ref-fp', []))]","path":"deblur/parallel_deblur.py","position":48,"original_position":48,"commit_id":"58e5a0a0242fdabdac7458df7417799281bbd07b","original_commit_id":"58e5a0a0242fdabdac7458df7417799281bbd07b","user":{"login":"ekopylova","id":6933444,"avatar_url":"https://avatars.githubusercontent.com/u/6933444?v=3","gravatar_id":"","url":"https://api.github.com/users/ekopylova","html_url":"https://github.com/ekopylova","followers_url":"https://api.github.com/users/ekopylova/followers","following_url":"https://api.github.com/users/ekopylova/following{/other_user}","gists_url":"https://api.github.com/users/ekopylova/gists{/gist_id}","starred_url":"https://api.github.com/users/ekopylova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekopylova/subscriptions","organizations_url":"https://api.github.com/users/ekopylova/orgs","repos_url":"https://api.github.com/users/ekopylova/repos","events_url":"https://api.github.com/users/ekopylova/events{/privacy}","received_events_url":"https://api.github.com/users/ekopylova/received_events","type":"User","site_admin":false},"body":"yes","created_at":"2016-06-28T13:37:17Z","updated_at":"2016-06-28T13:37:17Z","html_url":"https://github.com/biocore/deblur/pull/33#discussion_r68757191","pull_request_url":"https://api.github.com/repos/biocore/deblur/pulls/33","_links":{"self":{"href":"https://api.github.com/repos/biocore/deblur/pulls/comments/68757191"},"html":{"href":"https://github.com/biocore/deblur/pull/33#discussion_r68757191"},"pull_request":{"href":"https://api.github.com/repos/biocore/deblur/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/biocore/deblur/pulls/33","id":71803278,"html_url":"https://github.com/biocore/deblur/pull/33","diff_url":"https://github.com/biocore/deblur/pull/33.diff","patch_url":"https://github.com/biocore/deblur/pull/33.patch","issue_url":"https://api.github.com/repos/biocore/deblur/issues/33","number":33,"state":"open","locked":false,"title":"resolve issue 28 (parallelize by sample)","user":{"login":"ekopylova","id":6933444,"avatar_url":"https://avatars.githubusercontent.com/u/6933444?v=3","gravatar_id":"","url":"https://api.github.com/users/ekopylova","html_url":"https://github.com/ekopylova","followers_url":"https://api.github.com/users/ekopylova/followers","following_url":"https://api.github.com/users/ekopylova/following{/other_user}","gists_url":"https://api.github.com/users/ekopylova/gists{/gist_id}","starred_url":"https://api.github.com/users/ekopylova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekopylova/subscriptions","organizations_url":"https://api.github.com/users/ekopylova/orgs","repos_url":"https://api.github.com/users/ekopylova/repos","events_url":"https://api.github.com/users/ekopylova/events{/privacy}","received_events_url":"https://api.github.com/users/ekopylova/received_events","type":"User","site_admin":false},"body":"Parallelize deblur by sample.\r\n\r\nClick needs to be development version since the option to hide click options (e.g. ```workflow_parallel``` via ```@deblur_cmds.command(hidden=True)```) will only be available in version 7.0 [see merged [PR](https://github.com/pallets/click/pull/500)].\r\n\r\nExample usage (works without issues):\r\n```\r\nparallel_deblur workflow --seqs-fp seqs.fna --output-dir seqs_deblur --ref-fp 70_otus.fasta --ref-db-fp 70_otus -O 4\r\n```\r\n\r\nUnit test (not working currently, even with 1 thread):\r\n```\r\npython test_parallel_deblur.py\r\n```\r\n\r\nThe issue arises during trimming reads to specified length. The output file is empty which causes errors downstream (e.g. Could not run SortMeRNA).","created_at":"2016-05-28T14:28:45Z","updated_at":"2016-06-28T13:37:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab183a87c3024ff5804aa13bc9b68ac7c2762ff8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/biocore/deblur/pulls/33/commits","review_comments_url":"https://api.github.com/repos/biocore/deblur/pulls/33/comments","review_comment_url":"https://api.github.com/repos/biocore/deblur/pulls/comments{/number}","comments_url":"https://api.github.com/repos/biocore/deblur/issues/33/comments","statuses_url":"https://api.github.com/repos/biocore/deblur/statuses/58e5a0a0242fdabdac7458df7417799281bbd07b","head":{"label":"ekopylova:issue_28","ref":"issue_28","sha":"58e5a0a0242fdabdac7458df7417799281bbd07b","user":{"login":"ekopylova","id":6933444,"avatar_url":"https://avatars.githubusercontent.com/u/6933444?v=3","gravatar_id":"","url":"https://api.github.com/users/ekopylova","html_url":"https://github.com/ekopylova","followers_url":"https://api.github.com/users/ekopylova/followers","following_url":"https://api.github.com/users/ekopylova/following{/other_user}","gists_url":"https://api.github.com/users/ekopylova/gists{/gist_id}","starred_url":"https://api.github.com/users/ekopylova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekopylova/subscriptions","organizations_url":"https://api.github.com/users/ekopylova/orgs","repos_url":"https://api.github.com/users/ekopylova/repos","events_url":"https://api.github.com/users/ekopylova/events{/privacy}","received_events_url":"https://api.github.com/users/ekopylova/received_events","type":"User","site_admin":false},"repo":{"id":31328080,"name":"deblur","full_name":"ekopylova/deblur","owner":{"login":"ekopylova","id":6933444,"avatar_url":"https://avatars.githubusercontent.com/u/6933444?v=3","gravatar_id":"","url":"https://api.github.com/users/ekopylova","html_url":"https://github.com/ekopylova","followers_url":"https://api.github.com/users/ekopylova/followers","following_url":"https://api.github.com/users/ekopylova/following{/other_user}","gists_url":"https://api.github.com/users/ekopylova/gists{/gist_id}","starred_url":"https://api.github.com/users/ekopylova/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ekopylova/subscriptions","organizations_url":"https://api.github.com/users/ekopylova/orgs","repos_url":"https://api.github.com/users/ekopylova/repos","events_url":"https://api.github.com/users/ekopylova/events{/privacy}","received_events_url":"https://api.github.com/users/ekopylova/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ekopylova/deblur","description":"","fork":true,"url":"https://api.github.com/repos/ekopylova/deblur","forks_url":"https://api.github.com/repos/ekopylova/deblur/forks","keys_url":"https://api.github.com/repos/ekopylova/deblur/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ekopylova/deblur/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ekopylova/deblur/teams","hooks_url":"https://api.github.com/repos/ekopylova/deblur/hooks","issue_events_url":"https://api.github.com/repos/ekopylova/deblur/issues/events{/number}","events_url":"https://api.github.com/repos/ekopylova/deblur/events","assignees_url":"https://api.github.com/repos/ekopylova/deblur/assignees{/user}","branches_url":"https://api.github.com/repos/ekopylova/deblur/branches{/branch}","tags_url":"https://api.github.com/repos/ekopylova/deblur/tags","blobs_url":"https://api.github.com/repos/ekopylova/deblur/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ekopylova/deblur/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ekopylova/deblur/git/refs{/sha}","trees_url":"https://api.github.com/repos/ekopylova/deblur/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ekopylova/deblur/statuses/{sha}","languages_url":"https://api.github.com/repos/ekopylova/deblur/languages","stargazers_url":"https://api.github.com/repos/ekopylova/deblur/stargazers","contributors_url":"https://api.github.com/repos/ekopylova/deblur/contributors","subscribers_url":"https://api.github.com/repos/ekopylova/deblur/subscribers","subscription_url":"https://api.github.com/repos/ekopylova/deblur/subscription","commits_url":"https://api.github.com/repos/ekopylova/deblur/commits{/sha}","git_commits_url":"https://api.github.com/repos/ekopylova/deblur/git/commits{/sha}","comments_url":"https://api.github.com/repos/ekopylova/deblur/comments{/number}","issue_comment_url":"https://api.github.com/repos/ekopylova/deblur/issues/comments{/number}","contents_url":"https://api.github.com/repos/ekopylova/deblur/contents/{+path}","compare_url":"https://api.github.com/repos/ekopylova/deblur/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ekopylova/deblur/merges","archive_url":"https://api.github.com/repos/ekopylova/deblur/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ekopylova/deblur/downloads","issues_url":"https://api.github.com/repos/ekopylova/deblur/issues{/number}","pulls_url":"https://api.github.com/repos/ekopylova/deblur/pulls{/number}","milestones_url":"https://api.github.com/repos/ekopylova/deblur/milestones{/number}","notifications_url":"https://api.github.com/repos/ekopylova/deblur/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ekopylova/deblur/labels{/name}","releases_url":"https://api.github.com/repos/ekopylova/deblur/releases{/id}","deployments_url":"https://api.github.com/repos/ekopylova/deblur/deployments","created_at":"2015-02-25T18:07:35Z","updated_at":"2016-01-15T01:30:13Z","pushed_at":"2016-06-27T14:00:57Z","git_url":"git://github.com/ekopylova/deblur.git","ssh_url":"git@github.com:ekopylova/deblur.git","clone_url":"https://github.com/ekopylova/deblur.git","svn_url":"https://github.com/ekopylova/deblur","homepage":"","size":339,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"biocore:master","ref":"master","sha":"2160de99419edf5992daf2ddf06953e82c0ecc06","user":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?v=3","gravatar_id":"","url":"https://api.github.com/users/biocore","html_url":"https://github.com/biocore","followers_url":"https://api.github.com/users/biocore/followers","following_url":"https://api.github.com/users/biocore/following{/other_user}","gists_url":"https://api.github.com/users/biocore/gists{/gist_id}","starred_url":"https://api.github.com/users/biocore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocore/subscriptions","organizations_url":"https://api.github.com/users/biocore/orgs","repos_url":"https://api.github.com/users/biocore/repos","events_url":"https://api.github.com/users/biocore/events{/privacy}","received_events_url":"https://api.github.com/users/biocore/received_events","type":"Organization","site_admin":false},"repo":{"id":29548011,"name":"deblur","full_name":"biocore/deblur","owner":{"login":"biocore","id":6241857,"avatar_url":"https://avatars.githubusercontent.com/u/6241857?v=3","gravatar_id":"","url":"https://api.github.com/users/biocore","html_url":"https://github.com/biocore","followers_url":"https://api.github.com/users/biocore/followers","following_url":"https://api.github.com/users/biocore/following{/other_user}","gists_url":"https://api.github.com/users/biocore/gists{/gist_id}","starred_url":"https://api.github.com/users/biocore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biocore/subscriptions","organizations_url":"https://api.github.com/users/biocore/orgs","repos_url":"https://api.github.com/users/biocore/repos","events_url":"https://api.github.com/users/biocore/events{/privacy}","received_events_url":"https://api.github.com/users/biocore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/biocore/deblur","description":"Deblur is a greedy deconvolution algorithm based on known read error profiles.","fork":false,"url":"https://api.github.com/repos/biocore/deblur","forks_url":"https://api.github.com/repos/biocore/deblur/forks","keys_url":"https://api.github.com/repos/biocore/deblur/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biocore/deblur/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biocore/deblur/teams","hooks_url":"https://api.github.com/repos/biocore/deblur/hooks","issue_events_url":"https://api.github.com/repos/biocore/deblur/issues/events{/number}","events_url":"https://api.github.com/repos/biocore/deblur/events","assignees_url":"https://api.github.com/repos/biocore/deblur/assignees{/user}","branches_url":"https://api.github.com/repos/biocore/deblur/branches{/branch}","tags_url":"https://api.github.com/repos/biocore/deblur/tags","blobs_url":"https://api.github.com/repos/biocore/deblur/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biocore/deblur/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biocore/deblur/git/refs{/sha}","trees_url":"https://api.github.com/repos/biocore/deblur/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biocore/deblur/statuses/{sha}","languages_url":"https://api.github.com/repos/biocore/deblur/languages","stargazers_url":"https://api.github.com/repos/biocore/deblur/stargazers","contributors_url":"https://api.github.com/repos/biocore/deblur/contributors","subscribers_url":"https://api.github.com/repos/biocore/deblur/subscribers","subscription_url":"https://api.github.com/repos/biocore/deblur/subscription","commits_url":"https://api.github.com/repos/biocore/deblur/commits{/sha}","git_commits_url":"https://api.github.com/repos/biocore/deblur/git/commits{/sha}","comments_url":"https://api.github.com/repos/biocore/deblur/comments{/number}","issue_comment_url":"https://api.github.com/repos/biocore/deblur/issues/comments{/number}","contents_url":"https://api.github.com/repos/biocore/deblur/contents/{+path}","compare_url":"https://api.github.com/repos/biocore/deblur/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biocore/deblur/merges","archive_url":"https://api.github.com/repos/biocore/deblur/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biocore/deblur/downloads","issues_url":"https://api.github.com/repos/biocore/deblur/issues{/number}","pulls_url":"https://api.github.com/repos/biocore/deblur/pulls{/number}","milestones_url":"https://api.github.com/repos/biocore/deblur/milestones{/number}","notifications_url":"https://api.github.com/repos/biocore/deblur/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biocore/deblur/labels{/name}","releases_url":"https://api.github.com/repos/biocore/deblur/releases{/id}","deployments_url":"https://api.github.com/repos/biocore/deblur/deployments","created_at":"2015-01-20T19:34:02Z","updated_at":"2016-03-13T19:36:17Z","pushed_at":"2016-06-27T13:10:43Z","git_url":"git://github.com/biocore/deblur.git","ssh_url":"git@github.com:biocore/deblur.git","clone_url":"https://github.com/biocore/deblur.git","svn_url":"https://github.com/biocore/deblur","homepage":"","size":337,"stargazers_count":2,"watchers_count":2,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":8,"forks":10,"open_issues":8,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biocore/deblur/pulls/33"},"html":{"href":"https://github.com/biocore/deblur/pull/33"},"issue":{"href":"https://api.github.com/repos/biocore/deblur/issues/33"},"comments":{"href":"https://api.github.com/repos/biocore/deblur/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/biocore/deblur/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/biocore/deblur/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/biocore/deblur/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/biocore/deblur/statuses/58e5a0a0242fdabdac7458df7417799281bbd07b"}}}}
{"actor":{"display_login":"ekopylova"}}