{"action":"created","comment":{"url":"https://api.github.com/repos/nextstrain/fauna/pulls/comments/98949649","pull_request_review_id":19608231,"id":98949649,"diff_hunk":"@@ -42,32 +43,39 @@ def read_flat(self, path, fstem, **kwargs):\n         else:\n             with open(file) as infile:\n                 table_reader = csv.reader(infile, delimiter=\"\\t\")\n-                header = {\n-                    0: 'virus_strain',\n-                    1: 'serum_strain',\n-                    2: 'ferret_id',\n-                    3: 'source',\n-                    4: 'titer'\n-                }\n+                header = table_reader.next()\n+                headers = {}\n+                for i in range(len(header)):\n+                    headers[i] = header[i]\n+                # header = {\n+                #     0: 'virus_strain',\n+                #     1: 'serum_strain',\n+                #     2: 'ferret_id',\n+                #     3: 'source',\n+                #     4: 'titer'\n+                # }\n                 for row in table_reader:\n-                    m = {key: row[ii] if ii < len(row) else \"\" for ii, key in header.items()}\n-                    if re.search(r'[Ee][Gg][Gg]', m['ferret_id']):  # TODO FIX THIS FOR LATER IMPORTS\n+                    m = {key: row[ii] if ii < len(row) else \"\" for ii, key in headers.items()}\n+                    if 'ferret_id' in m.keys():","path":"tdb/parse.py","position":47,"original_position":47,"commit_id":"fc6b59dada4a192b86393720a63a20bc5a8b3cc7","original_commit_id":"2c3eb4e39a1d2e82f8aec5db36ed714b34768f44","user":{"login":"barneypotter24","id":14949788,"avatar_url":"https://avatars.githubusercontent.com/u/14949788?v=3","gravatar_id":"","url":"https://api.github.com/users/barneypotter24","html_url":"https://github.com/barneypotter24","followers_url":"https://api.github.com/users/barneypotter24/followers","following_url":"https://api.github.com/users/barneypotter24/following{/other_user}","gists_url":"https://api.github.com/users/barneypotter24/gists{/gist_id}","starred_url":"https://api.github.com/users/barneypotter24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barneypotter24/subscriptions","organizations_url":"https://api.github.com/users/barneypotter24/orgs","repos_url":"https://api.github.com/users/barneypotter24/repos","events_url":"https://api.github.com/users/barneypotter24/events{/privacy}","received_events_url":"https://api.github.com/users/barneypotter24/received_events","type":"User","site_admin":false},"body":"@trvrb This one should actually be `ferret_id`, this is looking for names that were scraped from the table, and in the next lines it changed the `ferret_id` field to be `serum_id`.","created_at":"2017-02-01T17:34:52Z","updated_at":"2017-02-01T17:34:52Z","html_url":"https://github.com/nextstrain/fauna/pull/45#discussion_r98949649","pull_request_url":"https://api.github.com/repos/nextstrain/fauna/pulls/45","_links":{"self":{"href":"https://api.github.com/repos/nextstrain/fauna/pulls/comments/98949649"},"html":{"href":"https://github.com/nextstrain/fauna/pull/45#discussion_r98949649"},"pull_request":{"href":"https://api.github.com/repos/nextstrain/fauna/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/nextstrain/fauna/pulls/45","id":104056059,"html_url":"https://github.com/nextstrain/fauna/pull/45","diff_url":"https://github.com/nextstrain/fauna/pull/45.diff","patch_url":"https://github.com/nextstrain/fauna/pull/45.patch","issue_url":"https://api.github.com/repos/nextstrain/fauna/issues/45","number":45,"state":"open","locked":false,"title":"Cdc titer","user":{"login":"barneypotter24","id":14949788,"avatar_url":"https://avatars.githubusercontent.com/u/14949788?v=3","gravatar_id":"","url":"https://api.github.com/users/barneypotter24","html_url":"https://github.com/barneypotter24","followers_url":"https://api.github.com/users/barneypotter24/followers","following_url":"https://api.github.com/users/barneypotter24/following{/other_user}","gists_url":"https://api.github.com/users/barneypotter24/gists{/gist_id}","starred_url":"https://api.github.com/users/barneypotter24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barneypotter24/subscriptions","organizations_url":"https://api.github.com/users/barneypotter24/orgs","repos_url":"https://api.github.com/users/barneypotter24/repos","events_url":"https://api.github.com/users/barneypotter24/events{/privacy}","received_events_url":"https://api.github.com/users/barneypotter24/received_events","type":"User","site_admin":false},"body":"Divide tdb/upload.py into separate subclasses for NIMR documents, CDC documents, and eLife documents. ","created_at":"2017-02-01T00:53:44Z","updated_at":"2017-02-01T17:34:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"242ba3e1c501f79a61b13d2de79e33ede27bda72","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/nextstrain/fauna/pulls/45/commits","review_comments_url":"https://api.github.com/repos/nextstrain/fauna/pulls/45/comments","review_comment_url":"https://api.github.com/repos/nextstrain/fauna/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nextstrain/fauna/issues/45/comments","statuses_url":"https://api.github.com/repos/nextstrain/fauna/statuses/fc6b59dada4a192b86393720a63a20bc5a8b3cc7","head":{"label":"nextstrain:cdc_titer","ref":"cdc_titer","sha":"fc6b59dada4a192b86393720a63a20bc5a8b3cc7","user":{"login":"nextstrain","id":22159334,"avatar_url":"https://avatars.githubusercontent.com/u/22159334?v=3","gravatar_id":"","url":"https://api.github.com/users/nextstrain","html_url":"https://github.com/nextstrain","followers_url":"https://api.github.com/users/nextstrain/followers","following_url":"https://api.github.com/users/nextstrain/following{/other_user}","gists_url":"https://api.github.com/users/nextstrain/gists{/gist_id}","starred_url":"https://api.github.com/users/nextstrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nextstrain/subscriptions","organizations_url":"https://api.github.com/users/nextstrain/orgs","repos_url":"https://api.github.com/users/nextstrain/repos","events_url":"https://api.github.com/users/nextstrain/events{/privacy}","received_events_url":"https://api.github.com/users/nextstrain/received_events","type":"Organization","site_admin":false},"repo":{"id":51557651,"name":"fauna","full_name":"nextstrain/fauna","owner":{"login":"nextstrain","id":22159334,"avatar_url":"https://avatars.githubusercontent.com/u/22159334?v=3","gravatar_id":"","url":"https://api.github.com/users/nextstrain","html_url":"https://github.com/nextstrain","followers_url":"https://api.github.com/users/nextstrain/followers","following_url":"https://api.github.com/users/nextstrain/following{/other_user}","gists_url":"https://api.github.com/users/nextstrain/gists{/gist_id}","starred_url":"https://api.github.com/users/nextstrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nextstrain/subscriptions","organizations_url":"https://api.github.com/users/nextstrain/orgs","repos_url":"https://api.github.com/users/nextstrain/repos","events_url":"https://api.github.com/users/nextstrain/events{/privacy}","received_events_url":"https://api.github.com/users/nextstrain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nextstrain/fauna","description":"Rethink database to support real-time virus analysis","fork":false,"url":"https://api.github.com/repos/nextstrain/fauna","forks_url":"https://api.github.com/repos/nextstrain/fauna/forks","keys_url":"https://api.github.com/repos/nextstrain/fauna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nextstrain/fauna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nextstrain/fauna/teams","hooks_url":"https://api.github.com/repos/nextstrain/fauna/hooks","issue_events_url":"https://api.github.com/repos/nextstrain/fauna/issues/events{/number}","events_url":"https://api.github.com/repos/nextstrain/fauna/events","assignees_url":"https://api.github.com/repos/nextstrain/fauna/assignees{/user}","branches_url":"https://api.github.com/repos/nextstrain/fauna/branches{/branch}","tags_url":"https://api.github.com/repos/nextstrain/fauna/tags","blobs_url":"https://api.github.com/repos/nextstrain/fauna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nextstrain/fauna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nextstrain/fauna/git/refs{/sha}","trees_url":"https://api.github.com/repos/nextstrain/fauna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nextstrain/fauna/statuses/{sha}","languages_url":"https://api.github.com/repos/nextstrain/fauna/languages","stargazers_url":"https://api.github.com/repos/nextstrain/fauna/stargazers","contributors_url":"https://api.github.com/repos/nextstrain/fauna/contributors","subscribers_url":"https://api.github.com/repos/nextstrain/fauna/subscribers","subscription_url":"https://api.github.com/repos/nextstrain/fauna/subscription","commits_url":"https://api.github.com/repos/nextstrain/fauna/commits{/sha}","git_commits_url":"https://api.github.com/repos/nextstrain/fauna/git/commits{/sha}","comments_url":"https://api.github.com/repos/nextstrain/fauna/comments{/number}","issue_comment_url":"https://api.github.com/repos/nextstrain/fauna/issues/comments{/number}","contents_url":"https://api.github.com/repos/nextstrain/fauna/contents/{+path}","compare_url":"https://api.github.com/repos/nextstrain/fauna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nextstrain/fauna/merges","archive_url":"https://api.github.com/repos/nextstrain/fauna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nextstrain/fauna/downloads","issues_url":"https://api.github.com/repos/nextstrain/fauna/issues{/number}","pulls_url":"https://api.github.com/repos/nextstrain/fauna/pulls{/number}","milestones_url":"https://api.github.com/repos/nextstrain/fauna/milestones{/number}","notifications_url":"https://api.github.com/repos/nextstrain/fauna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nextstrain/fauna/labels{/name}","releases_url":"https://api.github.com/repos/nextstrain/fauna/releases{/id}","deployments_url":"https://api.github.com/repos/nextstrain/fauna/deployments","created_at":"2016-02-12T00:21:09Z","updated_at":"2016-12-01T21:17:13Z","pushed_at":"2017-02-01T02:19:20Z","git_url":"git://github.com/nextstrain/fauna.git","ssh_url":"git@github.com:nextstrain/fauna.git","clone_url":"https://github.com/nextstrain/fauna.git","svn_url":"https://github.com/nextstrain/fauna","homepage":"","size":2108,"stargazers_count":4,"watchers_count":4,"language":"Jupyter Notebook","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":4,"default_branch":"master"}},"base":{"label":"nextstrain:master","ref":"master","sha":"e39da26b4a3666004b098af8af02d6f53fa96e19","user":{"login":"nextstrain","id":22159334,"avatar_url":"https://avatars.githubusercontent.com/u/22159334?v=3","gravatar_id":"","url":"https://api.github.com/users/nextstrain","html_url":"https://github.com/nextstrain","followers_url":"https://api.github.com/users/nextstrain/followers","following_url":"https://api.github.com/users/nextstrain/following{/other_user}","gists_url":"https://api.github.com/users/nextstrain/gists{/gist_id}","starred_url":"https://api.github.com/users/nextstrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nextstrain/subscriptions","organizations_url":"https://api.github.com/users/nextstrain/orgs","repos_url":"https://api.github.com/users/nextstrain/repos","events_url":"https://api.github.com/users/nextstrain/events{/privacy}","received_events_url":"https://api.github.com/users/nextstrain/received_events","type":"Organization","site_admin":false},"repo":{"id":51557651,"name":"fauna","full_name":"nextstrain/fauna","owner":{"login":"nextstrain","id":22159334,"avatar_url":"https://avatars.githubusercontent.com/u/22159334?v=3","gravatar_id":"","url":"https://api.github.com/users/nextstrain","html_url":"https://github.com/nextstrain","followers_url":"https://api.github.com/users/nextstrain/followers","following_url":"https://api.github.com/users/nextstrain/following{/other_user}","gists_url":"https://api.github.com/users/nextstrain/gists{/gist_id}","starred_url":"https://api.github.com/users/nextstrain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nextstrain/subscriptions","organizations_url":"https://api.github.com/users/nextstrain/orgs","repos_url":"https://api.github.com/users/nextstrain/repos","events_url":"https://api.github.com/users/nextstrain/events{/privacy}","received_events_url":"https://api.github.com/users/nextstrain/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nextstrain/fauna","description":"Rethink database to support real-time virus analysis","fork":false,"url":"https://api.github.com/repos/nextstrain/fauna","forks_url":"https://api.github.com/repos/nextstrain/fauna/forks","keys_url":"https://api.github.com/repos/nextstrain/fauna/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nextstrain/fauna/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nextstrain/fauna/teams","hooks_url":"https://api.github.com/repos/nextstrain/fauna/hooks","issue_events_url":"https://api.github.com/repos/nextstrain/fauna/issues/events{/number}","events_url":"https://api.github.com/repos/nextstrain/fauna/events","assignees_url":"https://api.github.com/repos/nextstrain/fauna/assignees{/user}","branches_url":"https://api.github.com/repos/nextstrain/fauna/branches{/branch}","tags_url":"https://api.github.com/repos/nextstrain/fauna/tags","blobs_url":"https://api.github.com/repos/nextstrain/fauna/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nextstrain/fauna/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nextstrain/fauna/git/refs{/sha}","trees_url":"https://api.github.com/repos/nextstrain/fauna/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nextstrain/fauna/statuses/{sha}","languages_url":"https://api.github.com/repos/nextstrain/fauna/languages","stargazers_url":"https://api.github.com/repos/nextstrain/fauna/stargazers","contributors_url":"https://api.github.com/repos/nextstrain/fauna/contributors","subscribers_url":"https://api.github.com/repos/nextstrain/fauna/subscribers","subscription_url":"https://api.github.com/repos/nextstrain/fauna/subscription","commits_url":"https://api.github.com/repos/nextstrain/fauna/commits{/sha}","git_commits_url":"https://api.github.com/repos/nextstrain/fauna/git/commits{/sha}","comments_url":"https://api.github.com/repos/nextstrain/fauna/comments{/number}","issue_comment_url":"https://api.github.com/repos/nextstrain/fauna/issues/comments{/number}","contents_url":"https://api.github.com/repos/nextstrain/fauna/contents/{+path}","compare_url":"https://api.github.com/repos/nextstrain/fauna/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nextstrain/fauna/merges","archive_url":"https://api.github.com/repos/nextstrain/fauna/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nextstrain/fauna/downloads","issues_url":"https://api.github.com/repos/nextstrain/fauna/issues{/number}","pulls_url":"https://api.github.com/repos/nextstrain/fauna/pulls{/number}","milestones_url":"https://api.github.com/repos/nextstrain/fauna/milestones{/number}","notifications_url":"https://api.github.com/repos/nextstrain/fauna/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nextstrain/fauna/labels{/name}","releases_url":"https://api.github.com/repos/nextstrain/fauna/releases{/id}","deployments_url":"https://api.github.com/repos/nextstrain/fauna/deployments","created_at":"2016-02-12T00:21:09Z","updated_at":"2016-12-01T21:17:13Z","pushed_at":"2017-02-01T02:19:20Z","git_url":"git://github.com/nextstrain/fauna.git","ssh_url":"git@github.com:nextstrain/fauna.git","clone_url":"https://github.com/nextstrain/fauna.git","svn_url":"https://github.com/nextstrain/fauna","homepage":"","size":2108,"stargazers_count":4,"watchers_count":4,"language":"Jupyter Notebook","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nextstrain/fauna/pulls/45"},"html":{"href":"https://github.com/nextstrain/fauna/pull/45"},"issue":{"href":"https://api.github.com/repos/nextstrain/fauna/issues/45"},"comments":{"href":"https://api.github.com/repos/nextstrain/fauna/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/nextstrain/fauna/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/nextstrain/fauna/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nextstrain/fauna/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/nextstrain/fauna/statuses/fc6b59dada4a192b86393720a63a20bc5a8b3cc7"}}}}
{"actor":{"display_login":"barneypotter24"}}