{"action":"created","comment":{"url":"https://api.github.com/repos/hammerlab/pileup.js/pulls/comments/198570079","pull_request_review_id":132523015,"id":198570079,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODU3MDA3OQ==","diff_hunk":"@@ -46,24 +46,31 @@ export type BigBedSource = {\n // The fields are described at http://genome.ucsc.edu/FAQ/FAQformat#format1\n function parseBedFeature(f): Gene {\n   var position = new ContigInterval(f.contig, f.start, f.stop),\n-      x = f.rest.split('\\t'),\n-      // exons arrays sometimes have trailing commas\n-      exonLengths = x[7].replace(/,*$/, '').split(',').map(Number),\n-      exonStarts = x[8].replace(/,*$/, '').split(',').map(Number),\n-      exons = _.zip(exonStarts, exonLengths)\n-               .map(function([start, length]) {\n-                 return new Interval(f.start + start, f.start + start + length);\n-               });\n-\n-  return {\n-    position,\n-    id: x[0],  // e.g. ENST00000359597\n-    strand: x[2],  // either + or -\n-    codingRegion: new Interval(Number(x[3]), Number(x[4])),\n-    geneId: x[9],\n-    name: x[10],\n-    exons\n-  };\n+      x = f.rest.split('\\t'), exons = [];\n+\n+\tif (x.length > 0 && x[0] !== \"\") {\n+\t\t// exons arrays sometimes have trailing commas\n+\t\tvar exonLengths = x[7].replace(/,*$/, '').split(',').map(Number),\n+\t\texonStarts = x[8].replace(/,*$/, '').split(',').map(Number);\n+\t\texons = _.zip(exonStarts, exonLengths)\n+\t\t\t\t\t.map(function([start, length]) {\n+\t\t\t\t\t\treturn new Interval(f.start + start, f.start + start + length);\n+\t\t\t\t\t});\n+\n+    return {\n+      position,\n+      id: x[0],  // e.g. ENST00000359597\n+      strand: x[2],  // either + or -\n+      codingRegion: new Interval(Number(x[3]), Number(x[4])),","path":"src/main/sources/BigBedDataSource.js","position":37,"original_position":37,"commit_id":"9647679aa05a18f65a1679478fc0fad97c5652fd","original_commit_id":"9647679aa05a18f65a1679478fc0fad97c5652fd","user":{"login":"akmorrow13","id":6503416,"node_id":"MDQ6VXNlcjY1MDM0MTY=","avatar_url":"https://avatars1.githubusercontent.com/u/6503416?v=4","gravatar_id":"","url":"https://api.github.com/users/akmorrow13","html_url":"https://github.com/akmorrow13","followers_url":"https://api.github.com/users/akmorrow13/followers","following_url":"https://api.github.com/users/akmorrow13/following{/other_user}","gists_url":"https://api.github.com/users/akmorrow13/gists{/gist_id}","starred_url":"https://api.github.com/users/akmorrow13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akmorrow13/subscriptions","organizations_url":"https://api.github.com/users/akmorrow13/orgs","repos_url":"https://api.github.com/users/akmorrow13/repos","events_url":"https://api.github.com/users/akmorrow13/events{/privacy}","received_events_url":"https://api.github.com/users/akmorrow13/received_events","type":"User","site_admin":false},"body":"This will still fail if you only have position information. x[0]-x[10] may be missing as well. I remember you mentioning that your bed files only had contig, start and end. Maybe I misunderstood.","created_at":"2018-06-27T17:03:53Z","updated_at":"2018-06-27T17:03:53Z","html_url":"https://github.com/hammerlab/pileup.js/pull/479#discussion_r198570079","pull_request_url":"https://api.github.com/repos/hammerlab/pileup.js/pulls/479","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/hammerlab/pileup.js/pulls/comments/198570079"},"html":{"href":"https://github.com/hammerlab/pileup.js/pull/479#discussion_r198570079"},"pull_request":{"href":"https://api.github.com/repos/hammerlab/pileup.js/pulls/479"}}},"pull_request":{"url":"https://api.github.com/repos/hammerlab/pileup.js/pulls/479","id":197572518,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3NTcyNTE4","html_url":"https://github.com/hammerlab/pileup.js/pull/479","diff_url":"https://github.com/hammerlab/pileup.js/pull/479.diff","patch_url":"https://github.com/hammerlab/pileup.js/pull/479.patch","issue_url":"https://api.github.com/repos/hammerlab/pileup.js/issues/479","number":479,"state":"open","locked":false,"title":"Update BED parsing","user":{"login":"denisemauldin","id":196261,"node_id":"MDQ6VXNlcjE5NjI2MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/196261?v=4","gravatar_id":"","url":"https://api.github.com/users/denisemauldin","html_url":"https://github.com/denisemauldin","followers_url":"https://api.github.com/users/denisemauldin/followers","following_url":"https://api.github.com/users/denisemauldin/following{/other_user}","gists_url":"https://api.github.com/users/denisemauldin/gists{/gist_id}","starred_url":"https://api.github.com/users/denisemauldin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denisemauldin/subscriptions","organizations_url":"https://api.github.com/users/denisemauldin/orgs","repos_url":"https://api.github.com/users/denisemauldin/repos","events_url":"https://api.github.com/users/denisemauldin/events{/privacy}","received_events_url":"https://api.github.com/users/denisemauldin/received_events","type":"User","site_admin":false},"body":"This is my version that I was working on before I saw yours @akmorrow13 !  Would you mind reviewing this anyway?  Do you think it would be useful for me to submit the tests as a separate PR?\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/hammerlab/pileup.js/479)\n<!-- Reviewable:end -->\n","created_at":"2018-06-26T22:47:39Z","updated_at":"2018-06-27T17:03:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"101942a28f4e76ca610196e52a599e928ea12987","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hammerlab/pileup.js/pulls/479/commits","review_comments_url":"https://api.github.com/repos/hammerlab/pileup.js/pulls/479/comments","review_comment_url":"https://api.github.com/repos/hammerlab/pileup.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hammerlab/pileup.js/issues/479/comments","statuses_url":"https://api.github.com/repos/hammerlab/pileup.js/statuses/9647679aa05a18f65a1679478fc0fad97c5652fd","head":{"label":"denisemauldin:update_bed_parsing","ref":"update_bed_parsing","sha":"9647679aa05a18f65a1679478fc0fad97c5652fd","user":{"login":"denisemauldin","id":196261,"node_id":"MDQ6VXNlcjE5NjI2MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/196261?v=4","gravatar_id":"","url":"https://api.github.com/users/denisemauldin","html_url":"https://github.com/denisemauldin","followers_url":"https://api.github.com/users/denisemauldin/followers","following_url":"https://api.github.com/users/denisemauldin/following{/other_user}","gists_url":"https://api.github.com/users/denisemauldin/gists{/gist_id}","starred_url":"https://api.github.com/users/denisemauldin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denisemauldin/subscriptions","organizations_url":"https://api.github.com/users/denisemauldin/orgs","repos_url":"https://api.github.com/users/denisemauldin/repos","events_url":"https://api.github.com/users/denisemauldin/events{/privacy}","received_events_url":"https://api.github.com/users/denisemauldin/received_events","type":"User","site_admin":false},"repo":{"id":138795501,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg3OTU1MDE=","name":"pileup.js","full_name":"denisemauldin/pileup.js","owner":{"login":"denisemauldin","id":196261,"node_id":"MDQ6VXNlcjE5NjI2MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/196261?v=4","gravatar_id":"","url":"https://api.github.com/users/denisemauldin","html_url":"https://github.com/denisemauldin","followers_url":"https://api.github.com/users/denisemauldin/followers","following_url":"https://api.github.com/users/denisemauldin/following{/other_user}","gists_url":"https://api.github.com/users/denisemauldin/gists{/gist_id}","starred_url":"https://api.github.com/users/denisemauldin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denisemauldin/subscriptions","organizations_url":"https://api.github.com/users/denisemauldin/orgs","repos_url":"https://api.github.com/users/denisemauldin/repos","events_url":"https://api.github.com/users/denisemauldin/events{/privacy}","received_events_url":"https://api.github.com/users/denisemauldin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/denisemauldin/pileup.js","description":"Interactive in-browser track viewer","fork":true,"url":"https://api.github.com/repos/denisemauldin/pileup.js","forks_url":"https://api.github.com/repos/denisemauldin/pileup.js/forks","keys_url":"https://api.github.com/repos/denisemauldin/pileup.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/denisemauldin/pileup.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/denisemauldin/pileup.js/teams","hooks_url":"https://api.github.com/repos/denisemauldin/pileup.js/hooks","issue_events_url":"https://api.github.com/repos/denisemauldin/pileup.js/issues/events{/number}","events_url":"https://api.github.com/repos/denisemauldin/pileup.js/events","assignees_url":"https://api.github.com/repos/denisemauldin/pileup.js/assignees{/user}","branches_url":"https://api.github.com/repos/denisemauldin/pileup.js/branches{/branch}","tags_url":"https://api.github.com/repos/denisemauldin/pileup.js/tags","blobs_url":"https://api.github.com/repos/denisemauldin/pileup.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/denisemauldin/pileup.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/denisemauldin/pileup.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/denisemauldin/pileup.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/denisemauldin/pileup.js/statuses/{sha}","languages_url":"https://api.github.com/repos/denisemauldin/pileup.js/languages","stargazers_url":"https://api.github.com/repos/denisemauldin/pileup.js/stargazers","contributors_url":"https://api.github.com/repos/denisemauldin/pileup.js/contributors","subscribers_url":"https://api.github.com/repos/denisemauldin/pileup.js/subscribers","subscription_url":"https://api.github.com/repos/denisemauldin/pileup.js/subscription","commits_url":"https://api.github.com/repos/denisemauldin/pileup.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/denisemauldin/pileup.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/denisemauldin/pileup.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/denisemauldin/pileup.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/denisemauldin/pileup.js/contents/{+path}","compare_url":"https://api.github.com/repos/denisemauldin/pileup.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/denisemauldin/pileup.js/merges","archive_url":"https://api.github.com/repos/denisemauldin/pileup.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/denisemauldin/pileup.js/downloads","issues_url":"https://api.github.com/repos/denisemauldin/pileup.js/issues{/number}","pulls_url":"https://api.github.com/repos/denisemauldin/pileup.js/pulls{/number}","milestones_url":"https://api.github.com/repos/denisemauldin/pileup.js/milestones{/number}","notifications_url":"https://api.github.com/repos/denisemauldin/pileup.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/denisemauldin/pileup.js/labels{/name}","releases_url":"https://api.github.com/repos/denisemauldin/pileup.js/releases{/id}","deployments_url":"https://api.github.com/repos/denisemauldin/pileup.js/deployments","created_at":"2018-06-26T21:29:41Z","updated_at":"2018-06-26T21:29:43Z","pushed_at":"2018-06-26T22:46:02Z","git_url":"git://github.com/denisemauldin/pileup.js.git","ssh_url":"git@github.com:denisemauldin/pileup.js.git","clone_url":"https://github.com/denisemauldin/pileup.js.git","svn_url":"https://github.com/denisemauldin/pileup.js","homepage":null,"size":9511,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"hammerlab:master","ref":"master","sha":"2c36d9925445363ef1563d344f51b8414be73f97","user":{"login":"hammerlab","id":6563873,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY1NjM4NzM=","avatar_url":"https://avatars2.githubusercontent.com/u/6563873?v=4","gravatar_id":"","url":"https://api.github.com/users/hammerlab","html_url":"https://github.com/hammerlab","followers_url":"https://api.github.com/users/hammerlab/followers","following_url":"https://api.github.com/users/hammerlab/following{/other_user}","gists_url":"https://api.github.com/users/hammerlab/gists{/gist_id}","starred_url":"https://api.github.com/users/hammerlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hammerlab/subscriptions","organizations_url":"https://api.github.com/users/hammerlab/orgs","repos_url":"https://api.github.com/users/hammerlab/repos","events_url":"https://api.github.com/users/hammerlab/events{/privacy}","received_events_url":"https://api.github.com/users/hammerlab/received_events","type":"Organization","site_admin":false},"repo":{"id":29933736,"node_id":"MDEwOlJlcG9zaXRvcnkyOTkzMzczNg==","name":"pileup.js","full_name":"hammerlab/pileup.js","owner":{"login":"hammerlab","id":6563873,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY1NjM4NzM=","avatar_url":"https://avatars2.githubusercontent.com/u/6563873?v=4","gravatar_id":"","url":"https://api.github.com/users/hammerlab","html_url":"https://github.com/hammerlab","followers_url":"https://api.github.com/users/hammerlab/followers","following_url":"https://api.github.com/users/hammerlab/following{/other_user}","gists_url":"https://api.github.com/users/hammerlab/gists{/gist_id}","starred_url":"https://api.github.com/users/hammerlab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hammerlab/subscriptions","organizations_url":"https://api.github.com/users/hammerlab/orgs","repos_url":"https://api.github.com/users/hammerlab/repos","events_url":"https://api.github.com/users/hammerlab/events{/privacy}","received_events_url":"https://api.github.com/users/hammerlab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hammerlab/pileup.js","description":"Interactive in-browser track viewer","fork":false,"url":"https://api.github.com/repos/hammerlab/pileup.js","forks_url":"https://api.github.com/repos/hammerlab/pileup.js/forks","keys_url":"https://api.github.com/repos/hammerlab/pileup.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hammerlab/pileup.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hammerlab/pileup.js/teams","hooks_url":"https://api.github.com/repos/hammerlab/pileup.js/hooks","issue_events_url":"https://api.github.com/repos/hammerlab/pileup.js/issues/events{/number}","events_url":"https://api.github.com/repos/hammerlab/pileup.js/events","assignees_url":"https://api.github.com/repos/hammerlab/pileup.js/assignees{/user}","branches_url":"https://api.github.com/repos/hammerlab/pileup.js/branches{/branch}","tags_url":"https://api.github.com/repos/hammerlab/pileup.js/tags","blobs_url":"https://api.github.com/repos/hammerlab/pileup.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hammerlab/pileup.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hammerlab/pileup.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/hammerlab/pileup.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hammerlab/pileup.js/statuses/{sha}","languages_url":"https://api.github.com/repos/hammerlab/pileup.js/languages","stargazers_url":"https://api.github.com/repos/hammerlab/pileup.js/stargazers","contributors_url":"https://api.github.com/repos/hammerlab/pileup.js/contributors","subscribers_url":"https://api.github.com/repos/hammerlab/pileup.js/subscribers","subscription_url":"https://api.github.com/repos/hammerlab/pileup.js/subscription","commits_url":"https://api.github.com/repos/hammerlab/pileup.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/hammerlab/pileup.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/hammerlab/pileup.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/hammerlab/pileup.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/hammerlab/pileup.js/contents/{+path}","compare_url":"https://api.github.com/repos/hammerlab/pileup.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hammerlab/pileup.js/merges","archive_url":"https://api.github.com/repos/hammerlab/pileup.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hammerlab/pileup.js/downloads","issues_url":"https://api.github.com/repos/hammerlab/pileup.js/issues{/number}","pulls_url":"https://api.github.com/repos/hammerlab/pileup.js/pulls{/number}","milestones_url":"https://api.github.com/repos/hammerlab/pileup.js/milestones{/number}","notifications_url":"https://api.github.com/repos/hammerlab/pileup.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hammerlab/pileup.js/labels{/name}","releases_url":"https://api.github.com/repos/hammerlab/pileup.js/releases{/id}","deployments_url":"https://api.github.com/repos/hammerlab/pileup.js/deployments","created_at":"2015-01-27T20:36:43Z","updated_at":"2018-06-26T08:20:33Z","pushed_at":"2018-06-27T17:01:27Z","git_url":"git://github.com/hammerlab/pileup.js.git","ssh_url":"git@github.com:hammerlab/pileup.js.git","clone_url":"https://github.com/hammerlab/pileup.js.git","svn_url":"https://github.com/hammerlab/pileup.js","homepage":null,"size":10316,"stargazers_count":208,"watchers_count":208,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":53,"mirror_url":null,"archived":false,"open_issues_count":77,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":53,"open_issues":77,"watchers":208,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hammerlab/pileup.js/pulls/479"},"html":{"href":"https://github.com/hammerlab/pileup.js/pull/479"},"issue":{"href":"https://api.github.com/repos/hammerlab/pileup.js/issues/479"},"comments":{"href":"https://api.github.com/repos/hammerlab/pileup.js/issues/479/comments"},"review_comments":{"href":"https://api.github.com/repos/hammerlab/pileup.js/pulls/479/comments"},"review_comment":{"href":"https://api.github.com/repos/hammerlab/pileup.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hammerlab/pileup.js/pulls/479/commits"},"statuses":{"href":"https://api.github.com/repos/hammerlab/pileup.js/statuses/9647679aa05a18f65a1679478fc0fad97c5652fd"}},"author_association":"NONE"}}
{"actor":{"display_login":"akmorrow13"}}