{"action":"created","comment":{"url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/pulls/comments/40542074","id":40542074,"diff_hunk":"@@ -262,47 +262,29 @@ def construct_command(self):\n     def symlink_output_to_unaligned(self):\n         \"\"\"\n         Create a symlink from `runfolder/Unaligned` to what has been defined as the output directory.\n-        :return: None\n         :raises: OSError if there was any problem creating the symlink, except for that it was already\n                          there, in which case, do nothing.\n         \"\"\"\n+        link_path = self.config.runfolder_input + \"/Unaligned\"\n+        link_target_path = self.config.output\n+\n         try:\n-            os.symlink(self.config.output, self.config.runfolder_input + \"/Unaligned\")\n-            return None\n+            log.debug(\"Create symlink from {} to {}.\".\n+                      format(link_path,\n+                             link_target_path))\n+            os.symlink(link_target_path, link_path)\n         except OSError as e:\n             if e.errno == os.errno.EEXIST:\n-                log.warning(\"Symlink from {} to {} already exits, will not recreate it...\".\n-                            format(self.config.runfolder_input + \"/Unaligned\",\n-                                   self.config.output))\n+                log.warning(\"Symlink from {} to {} already exits, will remove it and recreate it...\".\n+                            format(link_path, link_target_path))\n+                log.warning(\"Removing link: {}\".format(link_path))","path":"bcl2fastq/lib/bcl2fastq_utils.py","position":25,"original_position":25,"commit_id":"c94adf5ebb6e6cb8672f8eb4fddfb87a5ea5b4bf","original_commit_id":"c94adf5ebb6e6cb8672f8eb4fddfb87a5ea5b4bf","user":{"login":"withrocks","id":800390,"avatar_url":"https://avatars.githubusercontent.com/u/800390?v=3","gravatar_id":"","url":"https://api.github.com/users/withrocks","html_url":"https://github.com/withrocks","followers_url":"https://api.github.com/users/withrocks/followers","following_url":"https://api.github.com/users/withrocks/following{/other_user}","gists_url":"https://api.github.com/users/withrocks/gists{/gist_id}","starred_url":"https://api.github.com/users/withrocks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/withrocks/subscriptions","organizations_url":"https://api.github.com/users/withrocks/orgs","repos_url":"https://api.github.com/users/withrocks/repos","events_url":"https://api.github.com/users/withrocks/events{/privacy}","received_events_url":"https://api.github.com/users/withrocks/received_events","type":"User","site_admin":false},"body":"Perhaps unnecessary, since there is that warning just above it?","created_at":"2015-09-28T11:30:54Z","updated_at":"2015-09-28T11:30:54Z","html_url":"https://github.com/arteria-project/arteria-bcl2fastq/pull/10#discussion_r40542074","pull_request_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/pulls/10","_links":{"self":{"href":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/pulls/comments/40542074"},"html":{"href":"https://github.com/arteria-project/arteria-bcl2fastq/pull/10#discussion_r40542074"},"pull_request":{"href":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/pulls/10"}}},"pull_request":{"url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/pulls/10","id":45794102,"html_url":"https://github.com/arteria-project/arteria-bcl2fastq/pull/10","diff_url":"https://github.com/arteria-project/arteria-bcl2fastq/pull/10.diff","patch_url":"https://github.com/arteria-project/arteria-bcl2fastq/pull/10.patch","issue_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/issues/10","number":10,"state":"open","locked":false,"title":"Fix symlink creation","user":{"login":"johandahlberg","id":1788862,"avatar_url":"https://avatars.githubusercontent.com/u/1788862?v=3","gravatar_id":"","url":"https://api.github.com/users/johandahlberg","html_url":"https://github.com/johandahlberg","followers_url":"https://api.github.com/users/johandahlberg/followers","following_url":"https://api.github.com/users/johandahlberg/following{/other_user}","gists_url":"https://api.github.com/users/johandahlberg/gists{/gist_id}","starred_url":"https://api.github.com/users/johandahlberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johandahlberg/subscriptions","organizations_url":"https://api.github.com/users/johandahlberg/orgs","repos_url":"https://api.github.com/users/johandahlberg/repos","events_url":"https://api.github.com/users/johandahlberg/events{/privacy}","received_events_url":"https://api.github.com/users/johandahlberg/received_events","type":"User","site_admin":false},"body":"Removing `run` as to not confuse folks. That also mean moving the creation of the symlink to a new place. Finally I also decided that it would be better if the symlink was removed and recreated if it exits, as people might change output dirs between runs and in that case it would make sense to take the most recent one.","created_at":"2015-09-23T15:32:19Z","updated_at":"2015-09-28T11:30:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"be5e4f4f9548bc5bf64c23f64bae9751d0fdda8f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/pulls/10/commits","review_comments_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/pulls/10/comments","review_comment_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/issues/10/comments","statuses_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/statuses/c94adf5ebb6e6cb8672f8eb4fddfb87a5ea5b4bf","head":{"label":"johandahlberg:fix_symlink_creation","ref":"fix_symlink_creation","sha":"c94adf5ebb6e6cb8672f8eb4fddfb87a5ea5b4bf","user":{"login":"johandahlberg","id":1788862,"avatar_url":"https://avatars.githubusercontent.com/u/1788862?v=3","gravatar_id":"","url":"https://api.github.com/users/johandahlberg","html_url":"https://github.com/johandahlberg","followers_url":"https://api.github.com/users/johandahlberg/followers","following_url":"https://api.github.com/users/johandahlberg/following{/other_user}","gists_url":"https://api.github.com/users/johandahlberg/gists{/gist_id}","starred_url":"https://api.github.com/users/johandahlberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johandahlberg/subscriptions","organizations_url":"https://api.github.com/users/johandahlberg/orgs","repos_url":"https://api.github.com/users/johandahlberg/repos","events_url":"https://api.github.com/users/johandahlberg/events{/privacy}","received_events_url":"https://api.github.com/users/johandahlberg/received_events","type":"User","site_admin":false},"repo":{"id":41308903,"name":"arteria-bcl2fastq","full_name":"johandahlberg/arteria-bcl2fastq","owner":{"login":"johandahlberg","id":1788862,"avatar_url":"https://avatars.githubusercontent.com/u/1788862?v=3","gravatar_id":"","url":"https://api.github.com/users/johandahlberg","html_url":"https://github.com/johandahlberg","followers_url":"https://api.github.com/users/johandahlberg/followers","following_url":"https://api.github.com/users/johandahlberg/following{/other_user}","gists_url":"https://api.github.com/users/johandahlberg/gists{/gist_id}","starred_url":"https://api.github.com/users/johandahlberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johandahlberg/subscriptions","organizations_url":"https://api.github.com/users/johandahlberg/orgs","repos_url":"https://api.github.com/users/johandahlberg/repos","events_url":"https://api.github.com/users/johandahlberg/events{/privacy}","received_events_url":"https://api.github.com/users/johandahlberg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/johandahlberg/arteria-bcl2fastq","description":"Provides a simple http-interface for Illumina bcl2fastq","fork":true,"url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq","forks_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/forks","keys_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/teams","hooks_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/hooks","issue_events_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/issues/events{/number}","events_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/events","assignees_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/assignees{/user}","branches_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/branches{/branch}","tags_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/tags","blobs_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/git/refs{/sha}","trees_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/statuses/{sha}","languages_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/languages","stargazers_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/stargazers","contributors_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/contributors","subscribers_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/subscribers","subscription_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/subscription","commits_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/commits{/sha}","git_commits_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/git/commits{/sha}","comments_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/comments{/number}","issue_comment_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/issues/comments{/number}","contents_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/contents/{+path}","compare_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/merges","archive_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/downloads","issues_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/issues{/number}","pulls_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/pulls{/number}","milestones_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/milestones{/number}","notifications_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/labels{/name}","releases_url":"https://api.github.com/repos/johandahlberg/arteria-bcl2fastq/releases{/id}","created_at":"2015-08-24T14:47:43Z","updated_at":"2015-08-24T14:47:45Z","pushed_at":"2015-09-28T07:25:41Z","git_url":"git://github.com/johandahlberg/arteria-bcl2fastq.git","ssh_url":"git@github.com:johandahlberg/arteria-bcl2fastq.git","clone_url":"https://github.com/johandahlberg/arteria-bcl2fastq.git","svn_url":"https://github.com/johandahlberg/arteria-bcl2fastq","homepage":null,"size":14278,"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":"arteria-project:master","ref":"master","sha":"5839df658925906ce8a6cf32b4fc22f3ee778df6","user":{"login":"arteria-project","id":13848054,"avatar_url":"https://avatars.githubusercontent.com/u/13848054?v=3","gravatar_id":"","url":"https://api.github.com/users/arteria-project","html_url":"https://github.com/arteria-project","followers_url":"https://api.github.com/users/arteria-project/followers","following_url":"https://api.github.com/users/arteria-project/following{/other_user}","gists_url":"https://api.github.com/users/arteria-project/gists{/gist_id}","starred_url":"https://api.github.com/users/arteria-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arteria-project/subscriptions","organizations_url":"https://api.github.com/users/arteria-project/orgs","repos_url":"https://api.github.com/users/arteria-project/repos","events_url":"https://api.github.com/users/arteria-project/events{/privacy}","received_events_url":"https://api.github.com/users/arteria-project/received_events","type":"Organization","site_admin":false},"repo":{"id":41307984,"name":"arteria-bcl2fastq","full_name":"arteria-project/arteria-bcl2fastq","owner":{"login":"arteria-project","id":13848054,"avatar_url":"https://avatars.githubusercontent.com/u/13848054?v=3","gravatar_id":"","url":"https://api.github.com/users/arteria-project","html_url":"https://github.com/arteria-project","followers_url":"https://api.github.com/users/arteria-project/followers","following_url":"https://api.github.com/users/arteria-project/following{/other_user}","gists_url":"https://api.github.com/users/arteria-project/gists{/gist_id}","starred_url":"https://api.github.com/users/arteria-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arteria-project/subscriptions","organizations_url":"https://api.github.com/users/arteria-project/orgs","repos_url":"https://api.github.com/users/arteria-project/repos","events_url":"https://api.github.com/users/arteria-project/events{/privacy}","received_events_url":"https://api.github.com/users/arteria-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/arteria-project/arteria-bcl2fastq","description":"Provides a simple http-interface for Illumina bcl2fastq","fork":false,"url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq","forks_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/forks","keys_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/teams","hooks_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/hooks","issue_events_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/issues/events{/number}","events_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/events","assignees_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/assignees{/user}","branches_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/branches{/branch}","tags_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/tags","blobs_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/git/refs{/sha}","trees_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/statuses/{sha}","languages_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/languages","stargazers_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/stargazers","contributors_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/contributors","subscribers_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/subscribers","subscription_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/subscription","commits_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/commits{/sha}","git_commits_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/git/commits{/sha}","comments_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/comments{/number}","issue_comment_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/issues/comments{/number}","contents_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/contents/{+path}","compare_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/merges","archive_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/downloads","issues_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/issues{/number}","pulls_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/pulls{/number}","milestones_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/milestones{/number}","notifications_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/labels{/name}","releases_url":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/releases{/id}","created_at":"2015-08-24T14:31:17Z","updated_at":"2015-08-24T14:31:53Z","pushed_at":"2015-09-28T07:25:43Z","git_url":"git://github.com/arteria-project/arteria-bcl2fastq.git","ssh_url":"git@github.com:arteria-project/arteria-bcl2fastq.git","clone_url":"https://github.com/arteria-project/arteria-bcl2fastq.git","svn_url":"https://github.com/arteria-project/arteria-bcl2fastq","homepage":null,"size":14325,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/pulls/10"},"html":{"href":"https://github.com/arteria-project/arteria-bcl2fastq/pull/10"},"issue":{"href":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/issues/10"},"comments":{"href":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/issues/10/comments"},"review_comments":{"href":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/pulls/10/comments"},"review_comment":{"href":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/pulls/10/commits"},"statuses":{"href":"https://api.github.com/repos/arteria-project/arteria-bcl2fastq/statuses/c94adf5ebb6e6cb8672f8eb4fddfb87a5ea5b4bf"}}}}