{"action":"created","comment":{"url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/pulls/comments/107901476","pull_request_review_id":28900623,"id":107901476,"diff_hunk":"@@ -0,0 +1,73 @@\n+#!/usr/bin/env/python\n+\n+import argparse\n+import os\n+import re\n+from collections import defaultdict\n+\n+\n+def do_the_thing(dest_dir,out_file,input_files):\n+   table_dict=defaultdict(dict)\n+   sample_names=[]\n+   gene_list=[]\n+   for input_file in input_files:\n+       if not gene_list:\n+           first_file=True\n+       print\"Reading from {}\".format(input_file)\n+       sample_name=os.path.basename(input_file)\n+       sample_name= sample_name.replace(\"Aligned.sortedByCoord.out_gene.featureCounts.txt\",\"\")\n+       sample_names.append(sample_name)\n+       table_dict[sample_name]=dict()\n+     \n+       #Extract the gene list from the first file\n+       if first_file:\n+           with open(input_file, 'r') as f:\n+               for line in f:\n+                   if not line.startswith('E'):\n+                       continue\n+                   line_info=line.split('\\t')\n+                   gene=line_info[0]\n+                   gene_list.append(gene)","path":"bin/merge_featurecounts.py","position":30,"original_position":30,"commit_id":"0e969c58d12228d389e74e8d77bb2e54e2fec4a3","original_commit_id":"0e969c58d12228d389e74e8d77bb2e54e2fec4a3","user":{"login":"ewels","id":465550,"avatar_url":"https://avatars0.githubusercontent.com/u/465550?v=3","gravatar_id":"","url":"https://api.github.com/users/ewels","html_url":"https://github.com/ewels","followers_url":"https://api.github.com/users/ewels/followers","following_url":"https://api.github.com/users/ewels/following{/other_user}","gists_url":"https://api.github.com/users/ewels/gists{/gist_id}","starred_url":"https://api.github.com/users/ewels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewels/subscriptions","organizations_url":"https://api.github.com/users/ewels/orgs","repos_url":"https://api.github.com/users/ewels/repos","events_url":"https://api.github.com/users/ewels/events{/privacy}","received_events_url":"https://api.github.com/users/ewels/received_events","type":"User","site_admin":false},"body":"Personally I'd probably just write this as `gene_list.append(line.split('\\t')[0])`","created_at":"2017-03-24T13:28:31Z","updated_at":"2017-03-24T13:40:28Z","html_url":"https://github.com/SciLifeLab/NGI-RNAseq/pull/100#discussion_r107901476","pull_request_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/pulls/100","_links":{"self":{"href":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/pulls/comments/107901476"},"html":{"href":"https://github.com/SciLifeLab/NGI-RNAseq/pull/100#discussion_r107901476"},"pull_request":{"href":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/pulls/100"}}},"pull_request":{"url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/pulls/100","id":112451120,"html_url":"https://github.com/SciLifeLab/NGI-RNAseq/pull/100","diff_url":"https://github.com/SciLifeLab/NGI-RNAseq/pull/100.diff","patch_url":"https://github.com/SciLifeLab/NGI-RNAseq/pull/100.patch","issue_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/issues/100","number":100,"state":"open","locked":false,"title":"FeatureCounts merging and stringTie verision update","user":{"login":"Hammarn","id":16774076,"avatar_url":"https://avatars1.githubusercontent.com/u/16774076?v=3","gravatar_id":"","url":"https://api.github.com/users/Hammarn","html_url":"https://github.com/Hammarn","followers_url":"https://api.github.com/users/Hammarn/followers","following_url":"https://api.github.com/users/Hammarn/following{/other_user}","gists_url":"https://api.github.com/users/Hammarn/gists{/gist_id}","starred_url":"https://api.github.com/users/Hammarn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hammarn/subscriptions","organizations_url":"https://api.github.com/users/Hammarn/orgs","repos_url":"https://api.github.com/users/Hammarn/repos","events_url":"https://api.github.com/users/Hammarn/events{/privacy}","received_events_url":"https://api.github.com/users/Hammarn/received_events","type":"User","site_admin":false},"body":"Third attempt at this PR. See  #97 and #95 For reference.\r\nThe script still has the issue of generating multiple copies of each line. Can you find the problem @ewels?","created_at":"2017-03-24T13:00:24Z","updated_at":"2017-03-24T13:40:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"477616d8153a9d1e5e450269e0f79ce602fff0e1","assignee":{"login":"ewels","id":465550,"avatar_url":"https://avatars0.githubusercontent.com/u/465550?v=3","gravatar_id":"","url":"https://api.github.com/users/ewels","html_url":"https://github.com/ewels","followers_url":"https://api.github.com/users/ewels/followers","following_url":"https://api.github.com/users/ewels/following{/other_user}","gists_url":"https://api.github.com/users/ewels/gists{/gist_id}","starred_url":"https://api.github.com/users/ewels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewels/subscriptions","organizations_url":"https://api.github.com/users/ewels/orgs","repos_url":"https://api.github.com/users/ewels/repos","events_url":"https://api.github.com/users/ewels/events{/privacy}","received_events_url":"https://api.github.com/users/ewels/received_events","type":"User","site_admin":false},"assignees":[{"login":"ewels","id":465550,"avatar_url":"https://avatars0.githubusercontent.com/u/465550?v=3","gravatar_id":"","url":"https://api.github.com/users/ewels","html_url":"https://github.com/ewels","followers_url":"https://api.github.com/users/ewels/followers","following_url":"https://api.github.com/users/ewels/following{/other_user}","gists_url":"https://api.github.com/users/ewels/gists{/gist_id}","starred_url":"https://api.github.com/users/ewels/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ewels/subscriptions","organizations_url":"https://api.github.com/users/ewels/orgs","repos_url":"https://api.github.com/users/ewels/repos","events_url":"https://api.github.com/users/ewels/events{/privacy}","received_events_url":"https://api.github.com/users/ewels/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/pulls/100/commits","review_comments_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/pulls/100/comments","review_comment_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/issues/100/comments","statuses_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/statuses/0e969c58d12228d389e74e8d77bb2e54e2fec4a3","head":{"label":"Hammarn:master","ref":"master","sha":"0e969c58d12228d389e74e8d77bb2e54e2fec4a3","user":{"login":"Hammarn","id":16774076,"avatar_url":"https://avatars1.githubusercontent.com/u/16774076?v=3","gravatar_id":"","url":"https://api.github.com/users/Hammarn","html_url":"https://github.com/Hammarn","followers_url":"https://api.github.com/users/Hammarn/followers","following_url":"https://api.github.com/users/Hammarn/following{/other_user}","gists_url":"https://api.github.com/users/Hammarn/gists{/gist_id}","starred_url":"https://api.github.com/users/Hammarn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hammarn/subscriptions","organizations_url":"https://api.github.com/users/Hammarn/orgs","repos_url":"https://api.github.com/users/Hammarn/repos","events_url":"https://api.github.com/users/Hammarn/events{/privacy}","received_events_url":"https://api.github.com/users/Hammarn/received_events","type":"User","site_admin":false},"repo":{"id":52969004,"name":"NGI-RNAseq","full_name":"Hammarn/NGI-RNAseq","owner":{"login":"Hammarn","id":16774076,"avatar_url":"https://avatars1.githubusercontent.com/u/16774076?v=3","gravatar_id":"","url":"https://api.github.com/users/Hammarn","html_url":"https://github.com/Hammarn","followers_url":"https://api.github.com/users/Hammarn/followers","following_url":"https://api.github.com/users/Hammarn/following{/other_user}","gists_url":"https://api.github.com/users/Hammarn/gists{/gist_id}","starred_url":"https://api.github.com/users/Hammarn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hammarn/subscriptions","organizations_url":"https://api.github.com/users/Hammarn/orgs","repos_url":"https://api.github.com/users/Hammarn/repos","events_url":"https://api.github.com/users/Hammarn/events{/privacy}","received_events_url":"https://api.github.com/users/Hammarn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Hammarn/NGI-RNAseq","description":"RNA Best Practice analysis pipeline, used at the SciLifeLab National Genomics Infrastructure.","fork":true,"url":"https://api.github.com/repos/Hammarn/NGI-RNAseq","forks_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/forks","keys_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/teams","hooks_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/hooks","issue_events_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/issues/events{/number}","events_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/events","assignees_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/assignees{/user}","branches_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/branches{/branch}","tags_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/tags","blobs_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/git/refs{/sha}","trees_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/statuses/{sha}","languages_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/languages","stargazers_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/stargazers","contributors_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/contributors","subscribers_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/subscribers","subscription_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/subscription","commits_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/commits{/sha}","git_commits_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/git/commits{/sha}","comments_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/comments{/number}","issue_comment_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/issues/comments{/number}","contents_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/contents/{+path}","compare_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/merges","archive_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/downloads","issues_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/issues{/number}","pulls_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/pulls{/number}","milestones_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/milestones{/number}","notifications_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/labels{/name}","releases_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/releases{/id}","deployments_url":"https://api.github.com/repos/Hammarn/NGI-RNAseq/deployments","created_at":"2016-03-02T14:26:39Z","updated_at":"2016-10-28T15:07:41Z","pushed_at":"2017-03-24T12:55:09Z","git_url":"git://github.com/Hammarn/NGI-RNAseq.git","ssh_url":"git@github.com:Hammarn/NGI-RNAseq.git","clone_url":"https://github.com/Hammarn/NGI-RNAseq.git","svn_url":"https://github.com/Hammarn/NGI-RNAseq","homepage":null,"size":5295,"stargazers_count":0,"watchers_count":0,"language":"Groovy","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":"SciLifeLab:master","ref":"master","sha":"33472bb7632cb801fdbc047bac6dff1490f1237a","user":{"login":"SciLifeLab","id":713611,"avatar_url":"https://avatars2.githubusercontent.com/u/713611?v=3","gravatar_id":"","url":"https://api.github.com/users/SciLifeLab","html_url":"https://github.com/SciLifeLab","followers_url":"https://api.github.com/users/SciLifeLab/followers","following_url":"https://api.github.com/users/SciLifeLab/following{/other_user}","gists_url":"https://api.github.com/users/SciLifeLab/gists{/gist_id}","starred_url":"https://api.github.com/users/SciLifeLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SciLifeLab/subscriptions","organizations_url":"https://api.github.com/users/SciLifeLab/orgs","repos_url":"https://api.github.com/users/SciLifeLab/repos","events_url":"https://api.github.com/users/SciLifeLab/events{/privacy}","received_events_url":"https://api.github.com/users/SciLifeLab/received_events","type":"Organization","site_admin":false},"repo":{"id":52964717,"name":"NGI-RNAseq","full_name":"SciLifeLab/NGI-RNAseq","owner":{"login":"SciLifeLab","id":713611,"avatar_url":"https://avatars2.githubusercontent.com/u/713611?v=3","gravatar_id":"","url":"https://api.github.com/users/SciLifeLab","html_url":"https://github.com/SciLifeLab","followers_url":"https://api.github.com/users/SciLifeLab/followers","following_url":"https://api.github.com/users/SciLifeLab/following{/other_user}","gists_url":"https://api.github.com/users/SciLifeLab/gists{/gist_id}","starred_url":"https://api.github.com/users/SciLifeLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SciLifeLab/subscriptions","organizations_url":"https://api.github.com/users/SciLifeLab/orgs","repos_url":"https://api.github.com/users/SciLifeLab/repos","events_url":"https://api.github.com/users/SciLifeLab/events{/privacy}","received_events_url":"https://api.github.com/users/SciLifeLab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SciLifeLab/NGI-RNAseq","description":"Nextflow RNA-Seq Best Practice analysis pipeline, used at the SciLifeLab National Genomics Infrastructure.","fork":true,"url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq","forks_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/forks","keys_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/teams","hooks_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/hooks","issue_events_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/issues/events{/number}","events_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/events","assignees_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/assignees{/user}","branches_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/branches{/branch}","tags_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/tags","blobs_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/git/refs{/sha}","trees_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/statuses/{sha}","languages_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/languages","stargazers_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/stargazers","contributors_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/contributors","subscribers_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/subscribers","subscription_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/subscription","commits_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/commits{/sha}","git_commits_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/git/commits{/sha}","comments_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/comments{/number}","issue_comment_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/issues/comments{/number}","contents_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/contents/{+path}","compare_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/merges","archive_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/downloads","issues_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/issues{/number}","pulls_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/pulls{/number}","milestones_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/milestones{/number}","notifications_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/labels{/name}","releases_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/releases{/id}","deployments_url":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/deployments","created_at":"2016-03-02T13:27:48Z","updated_at":"2017-03-23T11:13:23Z","pushed_at":"2017-03-24T13:06:29Z","git_url":"git://github.com/SciLifeLab/NGI-RNAseq.git","ssh_url":"git@github.com:SciLifeLab/NGI-RNAseq.git","clone_url":"https://github.com/SciLifeLab/NGI-RNAseq.git","svn_url":"https://github.com/SciLifeLab/NGI-RNAseq","homepage":"https://ngisweden.scilifelab.se/","size":5295,"stargazers_count":7,"watchers_count":7,"language":"Groovy","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8,"mirror_url":null,"open_issues_count":11,"forks":8,"open_issues":11,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/pulls/100"},"html":{"href":"https://github.com/SciLifeLab/NGI-RNAseq/pull/100"},"issue":{"href":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/issues/100"},"comments":{"href":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/issues/100/comments"},"review_comments":{"href":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/pulls/100/comments"},"review_comment":{"href":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/pulls/100/commits"},"statuses":{"href":"https://api.github.com/repos/SciLifeLab/NGI-RNAseq/statuses/0e969c58d12228d389e74e8d77bb2e54e2fec4a3"}}}}
{"actor":{"display_login":"ewels"}}