{"action":"opened","number":119,"pull_request":{"url":"https://api.github.com/repos/hammerlab/pyensembl/pulls/119","id":43560419,"html_url":"https://github.com/hammerlab/pyensembl/pull/119","diff_url":"https://github.com/hammerlab/pyensembl/pull/119.diff","patch_url":"https://github.com/hammerlab/pyensembl/pull/119.patch","issue_url":"https://api.github.com/repos/hammerlab/pyensembl/issues/119","number":119,"state":"open","locked":false,"title":"Rewrote GTF parsing to use less memory","user":{"login":"iskandr","id":48441,"avatar_url":"https://avatars.githubusercontent.com/u/48441?v=3","gravatar_id":"","url":"https://api.github.com/users/iskandr","html_url":"https://github.com/iskandr","followers_url":"https://api.github.com/users/iskandr/followers","following_url":"https://api.github.com/users/iskandr/following{/other_user}","gists_url":"https://api.github.com/users/iskandr/gists{/gist_id}","starred_url":"https://api.github.com/users/iskandr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iskandr/subscriptions","organizations_url":"https://api.github.com/users/iskandr/orgs","repos_url":"https://api.github.com/users/iskandr/repos","events_url":"https://api.github.com/users/iskandr/events{/privacy}","received_events_url":"https://api.github.com/users/iskandr/received_events","type":"User","site_admin":false},"body":"The Pandas CSV parser is, for unknown reasons, a memory hog under Python 2. Even if we optimize the memory consumed by the data we're storing, we're still risking running above Travis's 3gb limit just during parsing time. I poked around the Pandas source for a while trying to figure out what's going on but eventually gave up and wrote my own stripped down GTF parsing logic in pure python. Surprisingly, this is a little bit faster and keeps both Py2 & Py3 below 2gb of usage during parse time. \r\n\r\nOther changes:\r\n* interning strings to prevent memory explosion due to existence of millions of identical identifiers (e.g. \"gene\", \"1\", or even \"TP53\"). \r\n* Fixed double-writing of the parsed CSV in `gtf.py`\r\n* Changed some Ensembl77 tests to use latest GRCh38 release instead\r\n* Removed travis install dependency on Ensembl79, since that's not used at all\r\n* Removed our ill-fated attempt at assigning IDs to exons from old GTFs (`reconstruct_exon_id_column`) since that never actually worked. ","created_at":"2015-08-27T20:05:28Z","updated_at":"2015-08-27T20:05:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hammerlab/pyensembl/pulls/119/commits","review_comments_url":"https://api.github.com/repos/hammerlab/pyensembl/pulls/119/comments","review_comment_url":"https://api.github.com/repos/hammerlab/pyensembl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hammerlab/pyensembl/issues/119/comments","statuses_url":"https://api.github.com/repos/hammerlab/pyensembl/statuses/d8a9824ae12e37ebb23701d04e6e3077ef190e6e","head":{"label":"hammerlab:gtf_parsing_memory","ref":"gtf_parsing_memory","sha":"d8a9824ae12e37ebb23701d04e6e3077ef190e6e","user":{"login":"hammerlab","id":6563873,"avatar_url":"https://avatars.githubusercontent.com/u/6563873?v=3","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":18765629,"name":"pyensembl","full_name":"hammerlab/pyensembl","owner":{"login":"hammerlab","id":6563873,"avatar_url":"https://avatars.githubusercontent.com/u/6563873?v=3","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/pyensembl","description":"Python interface to ensembl reference genome metadata (exons, transcripts, etc...)","fork":false,"url":"https://api.github.com/repos/hammerlab/pyensembl","forks_url":"https://api.github.com/repos/hammerlab/pyensembl/forks","keys_url":"https://api.github.com/repos/hammerlab/pyensembl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hammerlab/pyensembl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hammerlab/pyensembl/teams","hooks_url":"https://api.github.com/repos/hammerlab/pyensembl/hooks","issue_events_url":"https://api.github.com/repos/hammerlab/pyensembl/issues/events{/number}","events_url":"https://api.github.com/repos/hammerlab/pyensembl/events","assignees_url":"https://api.github.com/repos/hammerlab/pyensembl/assignees{/user}","branches_url":"https://api.github.com/repos/hammerlab/pyensembl/branches{/branch}","tags_url":"https://api.github.com/repos/hammerlab/pyensembl/tags","blobs_url":"https://api.github.com/repos/hammerlab/pyensembl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hammerlab/pyensembl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hammerlab/pyensembl/git/refs{/sha}","trees_url":"https://api.github.com/repos/hammerlab/pyensembl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hammerlab/pyensembl/statuses/{sha}","languages_url":"https://api.github.com/repos/hammerlab/pyensembl/languages","stargazers_url":"https://api.github.com/repos/hammerlab/pyensembl/stargazers","contributors_url":"https://api.github.com/repos/hammerlab/pyensembl/contributors","subscribers_url":"https://api.github.com/repos/hammerlab/pyensembl/subscribers","subscription_url":"https://api.github.com/repos/hammerlab/pyensembl/subscription","commits_url":"https://api.github.com/repos/hammerlab/pyensembl/commits{/sha}","git_commits_url":"https://api.github.com/repos/hammerlab/pyensembl/git/commits{/sha}","comments_url":"https://api.github.com/repos/hammerlab/pyensembl/comments{/number}","issue_comment_url":"https://api.github.com/repos/hammerlab/pyensembl/issues/comments{/number}","contents_url":"https://api.github.com/repos/hammerlab/pyensembl/contents/{+path}","compare_url":"https://api.github.com/repos/hammerlab/pyensembl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hammerlab/pyensembl/merges","archive_url":"https://api.github.com/repos/hammerlab/pyensembl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hammerlab/pyensembl/downloads","issues_url":"https://api.github.com/repos/hammerlab/pyensembl/issues{/number}","pulls_url":"https://api.github.com/repos/hammerlab/pyensembl/pulls{/number}","milestones_url":"https://api.github.com/repos/hammerlab/pyensembl/milestones{/number}","notifications_url":"https://api.github.com/repos/hammerlab/pyensembl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hammerlab/pyensembl/labels{/name}","releases_url":"https://api.github.com/repos/hammerlab/pyensembl/releases{/id}","created_at":"2014-04-14T15:23:02Z","updated_at":"2015-08-19T07:46:14Z","pushed_at":"2015-08-27T19:56:40Z","git_url":"git://github.com/hammerlab/pyensembl.git","ssh_url":"git@github.com:hammerlab/pyensembl.git","clone_url":"https://github.com/hammerlab/pyensembl.git","svn_url":"https://github.com/hammerlab/pyensembl","homepage":null,"size":1746,"stargazers_count":35,"watchers_count":35,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":37,"forks":4,"open_issues":37,"watchers":35,"default_branch":"master"}},"base":{"label":"hammerlab:master","ref":"master","sha":"a2717397ccf27d83379de1b74ecaef08cf46b778","user":{"login":"hammerlab","id":6563873,"avatar_url":"https://avatars.githubusercontent.com/u/6563873?v=3","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":18765629,"name":"pyensembl","full_name":"hammerlab/pyensembl","owner":{"login":"hammerlab","id":6563873,"avatar_url":"https://avatars.githubusercontent.com/u/6563873?v=3","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/pyensembl","description":"Python interface to ensembl reference genome metadata (exons, transcripts, etc...)","fork":false,"url":"https://api.github.com/repos/hammerlab/pyensembl","forks_url":"https://api.github.com/repos/hammerlab/pyensembl/forks","keys_url":"https://api.github.com/repos/hammerlab/pyensembl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hammerlab/pyensembl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hammerlab/pyensembl/teams","hooks_url":"https://api.github.com/repos/hammerlab/pyensembl/hooks","issue_events_url":"https://api.github.com/repos/hammerlab/pyensembl/issues/events{/number}","events_url":"https://api.github.com/repos/hammerlab/pyensembl/events","assignees_url":"https://api.github.com/repos/hammerlab/pyensembl/assignees{/user}","branches_url":"https://api.github.com/repos/hammerlab/pyensembl/branches{/branch}","tags_url":"https://api.github.com/repos/hammerlab/pyensembl/tags","blobs_url":"https://api.github.com/repos/hammerlab/pyensembl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hammerlab/pyensembl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hammerlab/pyensembl/git/refs{/sha}","trees_url":"https://api.github.com/repos/hammerlab/pyensembl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hammerlab/pyensembl/statuses/{sha}","languages_url":"https://api.github.com/repos/hammerlab/pyensembl/languages","stargazers_url":"https://api.github.com/repos/hammerlab/pyensembl/stargazers","contributors_url":"https://api.github.com/repos/hammerlab/pyensembl/contributors","subscribers_url":"https://api.github.com/repos/hammerlab/pyensembl/subscribers","subscription_url":"https://api.github.com/repos/hammerlab/pyensembl/subscription","commits_url":"https://api.github.com/repos/hammerlab/pyensembl/commits{/sha}","git_commits_url":"https://api.github.com/repos/hammerlab/pyensembl/git/commits{/sha}","comments_url":"https://api.github.com/repos/hammerlab/pyensembl/comments{/number}","issue_comment_url":"https://api.github.com/repos/hammerlab/pyensembl/issues/comments{/number}","contents_url":"https://api.github.com/repos/hammerlab/pyensembl/contents/{+path}","compare_url":"https://api.github.com/repos/hammerlab/pyensembl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hammerlab/pyensembl/merges","archive_url":"https://api.github.com/repos/hammerlab/pyensembl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hammerlab/pyensembl/downloads","issues_url":"https://api.github.com/repos/hammerlab/pyensembl/issues{/number}","pulls_url":"https://api.github.com/repos/hammerlab/pyensembl/pulls{/number}","milestones_url":"https://api.github.com/repos/hammerlab/pyensembl/milestones{/number}","notifications_url":"https://api.github.com/repos/hammerlab/pyensembl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hammerlab/pyensembl/labels{/name}","releases_url":"https://api.github.com/repos/hammerlab/pyensembl/releases{/id}","created_at":"2014-04-14T15:23:02Z","updated_at":"2015-08-19T07:46:14Z","pushed_at":"2015-08-27T19:56:40Z","git_url":"git://github.com/hammerlab/pyensembl.git","ssh_url":"git@github.com:hammerlab/pyensembl.git","clone_url":"https://github.com/hammerlab/pyensembl.git","svn_url":"https://github.com/hammerlab/pyensembl","homepage":null,"size":1746,"stargazers_count":35,"watchers_count":35,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":37,"forks":4,"open_issues":37,"watchers":35,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hammerlab/pyensembl/pulls/119"},"html":{"href":"https://github.com/hammerlab/pyensembl/pull/119"},"issue":{"href":"https://api.github.com/repos/hammerlab/pyensembl/issues/119"},"comments":{"href":"https://api.github.com/repos/hammerlab/pyensembl/issues/119/comments"},"review_comments":{"href":"https://api.github.com/repos/hammerlab/pyensembl/pulls/119/comments"},"review_comment":{"href":"https://api.github.com/repos/hammerlab/pyensembl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hammerlab/pyensembl/pulls/119/commits"},"statuses":{"href":"https://api.github.com/repos/hammerlab/pyensembl/statuses/d8a9824ae12e37ebb23701d04e6e3077ef190e6e"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":11,"additions":197,"deletions":189,"changed_files":7}}